Commit Graph

2480 Commits

Author SHA1 Message Date
Luigi Rizzo
4a8b689486 indicate the time per packet in nanoseconds. 2012-05-03 21:03:21 +00:00
Luigi Rizzo
fb38ae2030 add support for pcap receive statistics (used by net-mgmt/darkstat) 2012-05-03 17:08:40 +00:00
Luigi Rizzo
b9cd48d64c add some performance data 2012-05-03 16:09:44 +00:00
Luigi Rizzo
99fb123f8d - add code to run pkt-gen on top of libpcap so we can see the
difference from a native API

- add some testing options, such as conditional prefetching and
  packet copy.
2012-05-03 15:37:05 +00:00
Luigi Rizzo
df76012c5b - correct a bug in pcap_dispatch(): a count of 0 means infinity.
- in pcap_dispatch(), issue a prefetch on the buffer before the
  callback, this may save a little bit of time if the client
  is very fast.

- in pcap_inject(), use a fast copy routine, which also helps
  saving a few nanoseconds with fast clients.
2012-05-03 15:34:44 +00:00
Baptiste Daroussin
2b42644bb2 Import m4 regression tests from OpenBSD
Obtained from:	OpenBSD
Approved by:	des (mentor)
2012-04-30 22:00:34 +00:00
Konstantin Belousov
4f20e4f263 Add src.conf option WITH_SHARED_TOOLCHAIN to enable building the
toolchain binaries as dynamically linked.  Option is disabled by
default.

Reviewed by:	ru (previous version)
MFC after:	2 weeks
2012-04-29 09:32:44 +00:00
Adrian Chadd
ab07718555 Change cc -> bc : "bc" is "busy count", which is the % of time the channel
is considered "busy but not doing any active TX or frame RX."

Just keep in mind that "frame RX" is "decoding what looks like a wifi
signal", not necessarily "frame successfully decoded for this particular
device."
2012-04-28 23:13:09 +00:00
Adrian Chadd
dd025d9a62 Add a tool to print out min, average and max channel survey information
from the current channel.

There seem to be some occasional issues with the extension channel
counters reporting more than 100% of use.  I'll investigate that
soon.
2012-04-28 08:17:19 +00:00
Dimitry Andric
4d04782c41 Add files and directories to be cleaned up if WITHOUT_GCC is in effect
to OptionalObsoleteFiles.inc.

MFC after:	1 week
2012-04-14 16:42:17 +00:00
Luigi Rizzo
d76bf4ff7b A bit of cleanup in the names of fields of netmap-related structures.
Use the name 'ring' instead of 'queue' in all fields.
Bump NETMAP_API.
2012-04-13 16:03:07 +00:00
Luigi Rizzo
aaca8f41f5 use getopt to parse options, add one option to set
the wait time for link-up events
2012-04-12 08:38:56 +00:00
Adrian Chadd
87632709bc Teach wlanstats about the new BAR TX statistics. 2012-04-08 04:51:43 +00:00
Adrian Chadd
d61c74edc5 Add AR_ISR_S5 and AR_ISR_S5_S. 2012-04-08 04:42:53 +00:00
David Schultz
afbcb86218 Add some tests from PR 166463. Also make sure that all of the tests,
old and new, check the sign bits of both the remainder and the
quotient.
2012-04-07 04:00:30 +00:00
Luigi Rizzo
87a9e4379e we need to specify a NETMAP_API version or the ioctl() will fail. 2012-04-06 14:26:05 +00:00
Adrian Chadd
2fe1131c7b Add a threadid to the ah_decode API.
This adds the current thread ID to each logged register and mark entry,
allowing for easier debugging of concurrent/overlapping NIC operations.
2012-04-04 20:46:20 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Stanislav Sedov
a146c2a961 - Add new kerberos libraries to the list of optional obsolete files. 2012-03-23 03:43:04 +00:00
Stanislav Sedov
0e46933c08 - Do not build libcom_err and compile_et when kerberos is disabled. They
depends on several heimdal libraries and not used by anything but kerberos
  tools.
2012-03-23 03:16:35 +00:00
Stanislav Sedov
ae77177087 - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.
2012-03-22 08:48:42 +00:00
Hans Petter Selasky
628fb5f412 Use new -n option when executing kldload, to
not warn about already loaded module(s).

MFC after:	1 week
2012-03-18 09:47:27 +00:00
Adrian Chadd
de7eaa191e Add a BINDIR so "make install" works. 2012-03-13 20:30:23 +00:00
Jilles Tjoelker
6d2b152f70 sh: Add a test for variables with underscores in arithmetic.
Things like $((_x+1)) are broken in stable/8 sh but work in stable/9 and
head.
2012-03-11 22:12:05 +00:00
Adrian Chadd
7223938408 Stop some of the output from wrapping at 80 characters. 2012-03-11 02:00:59 +00:00
Bjoern A. Zeeb
2460e894e3 Use = rather than == for expressions to test(1) builtin(1) in sh(1) to
comply with standards.

On modern branches there is an undocumented alias (see r219084) but on
stable/7 this is still an error.

Sponsored by:	Cisco Systems, Inc.
MFC after:	3 days
2012-03-06 14:19:36 +00:00
Hans Petter Selasky
53accc0452 Add regression test for USB enumeration.
MFC after:	1 week
2012-03-01 20:45:17 +00:00
Dimitry Andric
dfbaea8347 Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

Note this does *not* disable building and installing gcc, which will
still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.  If
you want to disable gcc completely, you must use WITHOUT_GCC.

MFC after:	2 weeks
2012-02-29 22:58:51 +00:00
Christian Brueffer
bb729f8549 Fix order of arguments to lseek().
PR:		160867
Submitted by:	Henning Petersen <henning.petersen@t-online.de>
MFC after:	1 week
2012-02-29 19:50:49 +00:00
Adrian Chadd
9fb41787f5 Add is_beacon_bad.
PR:		kern/165517
2012-02-28 04:06:42 +00:00
Luigi Rizzo
64ae02c365 A bunch of netmap fixes:
USERSPACE:
1. add support for devices with different number of rx and tx queues;

2. add better support for zero-copy operation, adding an extra field
   to the netmap ring to indicate how many buffers we have already processed
   but not yet released (with help from Eddie Kohler);

3. The two changes above unfortunately require an API change, so while
   at it add a version field and some spares to the ioctl() argument
   to help detect mismatches.

4. update the manual page for the two changes above;

5. update sample applications in tools/tools/netmap

KERNEL:

1. simplify the internal structures moving the global wait queues
   to the 'struct netmap_adapter';

2. simplify the functions that map kring<->nic ring indexes

3. normalize device-specific code, helps mainteinance;

4. start exploring the impact of micro-optimizations (prefetch etc.)
   in the ixgbe driver.
   Use 'legacy' descriptors on the tx ring and prefetch slots gives
   about 20% speedup at 900 MHz. Another 7-10% would come from removing
   the explict calls to bus_dmamap* in the core (they are effectively
   NOPs in this case, but it takes expensive load of the per-buffer
   dma maps to figure out that they are all NULL.

   Rx performance not investigated.

I am postponing the MFC so i can import a few more improvements
before merging.
2012-02-27 19:05:01 +00:00
Jilles Tjoelker
9901e05690 Check fchmod()/fchown() in fifo_misc test. 2012-02-26 15:32:02 +00:00
Bjoern A. Zeeb
0e7ed5d666 Update scripts to work around two sh(1) bugs found in stable/8:
1) _x=$((_x + 1)) does not work while x=$((x + 1)) does.
2) Parameter Expansion, esp. "${x%%bar}" does not work if quoted.

Correct typos and improve some details forwarding.sh already
had in initiator, esp. related to ipfw accepting if the default
is deny.

Add an extra stat call to the "delay" function in addition to the
touch which together is still a lot faster than sleep 1 but seems
to help a lot more to mitigate the unrelated kernel race seen.

Sponsored by:   Cisco Systems, Inc.
2012-02-24 14:13:06 +00:00
Jilles Tjoelker
45ff61e969 libc: Add some tests for fmtmsg(). 2012-02-21 23:46:41 +00:00
Adrian Chadd
caee7d9ca4 Fix up this local copy of statfoo to support > 128 statistics.
This allows all of the athstats statistics to work again.

Specifics:

* The previous code used chars < 0x80 as printable, and chars >= 0x80
  as "statistics"
* .. which meant any statistic above 127 would wrap around to 0;
* .. so once I added the 802.11n TX/RX statistics to athstats, the tail
  end of the statistics list weren't accessible.

This patch:

* adds a define which represents the magic character, rather than a hard
  coded one
* the statistic in question is little endian encoded after the magic
  character.

Notes:

* statfoo is useful enough to possibly warrant turning into a library API.
2012-02-17 08:24:58 +00:00
Bjoern A. Zeeb
d3373029e2 Add regression tests scripts for multi-IP FIBs exercising the send,
receive and forward path tagging packets with both the ifconfig fib
option or using ipfw, running ICMP6, TCP/v6 and UDP/v6 tests and
testing both setfib(2) as well as the SO_SETFIB socket option.

At 16 FIBs a total of over 64k return codes/replies/stati are checked,
sometimes multiple times (in different ways, e.g. the reflected request
as well as ipfw counter values).

The scripts need two or three machines to run and are thus not added
to the tools/regression framework but only to tools/test.

Sponsored by:	Cisco Systems, Inc.
2012-02-17 04:26:24 +00:00
Bjoern A. Zeeb
e6f0fd5898 Add regression tests for the setsockopt(2) SO_SETFIB socket option.
Check that the expected domain(9) families all handle the socket option
correctly and do proper bounds checks.  This would catch bugs as fixed
in (r230938,)r230981.

Sponsored by:	Cisco Systems, Inc.
2012-02-17 03:25:26 +00:00
Adrian Chadd
3c7c299133 Add some missing radar config parameters. 2012-02-14 20:08:50 +00:00
George V. Neville-Neil
77b7d3b2e6 Remove UCP from the list of counters 2012-02-14 18:57:10 +00:00
George V. Neville-Neil
f9166e7c3d Add options for program (-p) and to turn off waiting (-w) which is now
on by default.

The default is to wait after each counter is tested.  Since the prompt
would go to stdout you won't see it if you're redirecting the output
of the executed sub-program to /dev/null, so just press return to
continue or Ctrl-D to stop.
2012-02-14 18:51:21 +00:00
George V. Neville-Neil
2542e55879 Add a rudimentary test to run through all the available counters on a
system and then execute a program with pmcstat in counting mode.

The program will verify that all counters fire and that the code neither
panics the system nor locks it up.  This should be considered a first pass
conformance test for new sets of counters being added to hwpmc(4).
2012-02-14 04:18:59 +00:00
Max Khon
42e4b4f7df Include target names in diagnostic output.
Submitted by:	Garrett Cooper
2012-02-12 05:34:01 +00:00
Jilles Tjoelker
c0b3cf0676 sh: Make 'hash' return 1 if at least one utility is not found.
Reported by:	lme
2012-02-11 21:06:45 +00:00
Ed Schouten
71d8432f98 Replace utxrm(8) by utx(8).
At first, I added a utility called utxrm(8) to remove stale entries from
the user accounting database. It seems there are cases in which we need
to perform different operations on the database as well. Simply rename
utxrm(8) to utx(8) and place the old code under the "rm" command.

In addition to "rm", this tool supports "boot" and "shutdown", which are
going to be used by an rc-script which I am going to commit separately.
2012-02-11 20:28:42 +00:00
Konstantin Belousov
e1976efd69 Add a test program for recently added ptrace(2) interfaces.
MFC after:	1 week
2012-02-10 21:33:12 +00:00
Luigi Rizzo
5819da83ce - change the buffer size from a constant to a
TUNABLE variable (hw.netmap.buf_size) so we can experiment
  with values different from 2048 which may give better cache performance.

- rearrange the memory allocation code so it will be easier
  to replace it with a different implementation. The current code
  relies on a single large contiguous chunk of memory obtained through
  contigmalloc.
  The new implementation (not committed yet) uses multiple
  smaller chunks which are easier to fit in a fragmented address
  space.
2012-02-08 11:43:29 +00:00
Ed Schouten
e048cf369a Add a `fix' for another whitespace bug.
If the sentence starts with a multiple of eight spaces, the sentence
should in almost all practical cases have started with tabs instead.
Replace these spaces by tabs.
2012-02-06 18:52:40 +00:00
Ed Schouten
509b0c2039 Add fixwhite(1).
This small utility can be used to `sanitize' the whitespace in source
code. It does the following things:

Global:
- Remove empty lines at the beginning and the end of a file.
- Merge successive empty lines into a single empty line.

Per-line:
- Remove trailing whitespace.
- Merge spaces preceeding tabs into the tabs.

It operated on stdin/stdout. This means that if you use vi(1), you can
just run :%!fixwhite to reorganize the file.
2012-02-06 10:23:11 +00:00
Dimitry Andric
6bb1cadd56 Add a WITH_CLANG_EXTRAS option for src.conf(5), disabled by default,
that builds the following additional llvm/clang tools:

- bugpoint
- llc
- lli
- llvm-ar
- llvm-as
- llvm-bcanalyzer
- llvm-diff
- llvm-dis
- llvm-extract
- llvm-ld
- llvm-link
- llvm-mc
- llvm-nm
- llvm-objdump
- llvm-prof
- llvm-ranlib
- llvm-rtdyld
- llvm-stub
- macho-dump
- opt

These tools are mainly useful for people that want to manipulate llvm
bitcode (.bc) and llvm assembly language (.ll) files, or want to tinker
with llvm and clang themselves.

MFC after:	2 weeks
2012-02-05 23:56:22 +00:00
Robert Millan
4a47892c81 Add MK_SOURCELESS build option. Setting MK_SOURCELESS to "no" will disable
kernel modules that include binary-only code.

More fine-grained control is provided via MK_SOURCELESS_HOST (for native code
that runs on host CPU) and MK_SOURCELESS_UCODE (for microcode).

Reviewed by:	julian, delphij, freebsd-arch
Approved by:	kib (mentor)
MFC after:	2 weeks
2012-02-04 00:54:43 +00:00