aboutsummaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeFilesLines
* 1. Fix the handling of link reset while in netmap more.Luigi Rizzo2011-12-051-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A link reset now is completely transparent for the netmap client: even if the NIC resets its own ring (e.g. restarting from 0), the client will not see any change in the current rx/tx positions, because the driver will keep track of the offset between the two. 2. make the device-specific code more uniform across different drivers There were some inconsistencies in the implementation of the netmap support routines, now drivers have been aligned to a common code structure. 3. import netmap support for ixgbe . This is implemented as a very small patch for ixgbe.c (233 lines, 11 chunks, mostly comments: in total the patch has only 54 lines of new code) , as most of the code is in an external file sys/dev/netmap/ixgbe_netmap.h , following some initial comments from Jack Vogel about making changes less intrusive. (Note, i have emailed Jack multiple times asking if he had comments on this structure of the code; i got no reply so i assume he is fine with it). Support for other drivers (em, lem, re, igb) will come later. "ixgbe" is now the reference driver for netmap support. Both the external file (sys/dev/netmap/ixgbe_netmap.h) and the device-specific patches (in sys/dev/ixgbe/ixgbe.c) are heavily commented and should serve as a reference for other device drivers. Tested on i386 and amd64 with the pkt-gen program in tools/tools/netmap, the sender does 14.88 Mpps at 1050 Mhz and 14.2 Mpps at 900 MHz on an i7-860 with 4 cores and 82599 card. Haven't tried yet more aggressive optimizations such as adding 'prefetch' instructions in the time-critical parts of the code. Notes: svn path=/head/; revision=228276
* Fix some uninitialized variables in pipe regression tests that result inEitan Adler2011-12-053-3/+5
| | | | | | | | | | | | failure. PR: misc/161175 Submitted by: gianni@ Approved by: nwhitehorn@ MFC after: 1 week Notes: svn path=/head/; revision=228274
* Support domain-search in dhclient(8)Jean-Sébastien Pédron2011-12-044-1/+405
| | | | | | | | | | | | | | | | | | | | | | | | The "domain-search" option (option 119) allows a DHCP server to publish a list of implicit domain suffixes used during name lookup. This option is described in RFC 3397. For instance, if the domain-search option says: ".example.org .example.com" and one wants to resolve "foobar", the resolver will try: 1. "foobar.example.org" 2. "foobar.example.com" The file /etc/resolv.conf is updated with a "search" directive if the DHCP server provides "domain-search". A regression test suite is included in this patch under tools/regression/sbin/dhclient. PR: bin/151940 Sponsored by Yakaz (http://www.yakaz.com) Notes: svn path=/head/; revision=228259
* Revert to conservative defaults. WITH_PROFILE is a default now.Max Khon2011-12-022-2/+2
| | | | | | | | NO_PROFILE overrides in Makefile.inc1 and bsd.own.m are left intact so that the reversal to the WITHOUT_PROFILE will be easier in future. Notes: svn path=/head/; revision=228196
* Add a simple test for pipe inode numbers reported by fstat(2).Konstantin Belousov2011-12-011-0/+66
| | | | | | | | Submitted by: gianni MFC after: 1 week Notes: svn path=/head/; revision=228177
* Add WITH_CTF description.Max Khon2011-11-301-0/+4
| | | | Notes: svn path=/head/; revision=228159
* Add three execution tests for make(1):Max Khon2011-11-3015-0/+102
| | | | | | | | | | | | | | | | - plus: execute "+command" when run with -jX -n - ellipsis: ellipsis ("...") from variable - empty: empty command (from variable) Currently make(1) fails all three tests: - plus: segmentation fault due to incorrect command list handling - ellipsis: works in compat mode but fails in job (-jX) mode - empty: - compat mode: prints error message - job mode: works but prints empty string Notes: svn path=/head/; revision=228149
* Turn off profiled libs build by default.Max Khon2011-11-292-2/+2
| | | | | | | Can be enabled back using WITH_PROFILE=yes in /etc/src.conf Notes: svn path=/head/; revision=228143
* test: Add more testcases.Jilles Tjoelker2011-11-281-4/+38
| | | | | | | | | | The new testcases pass even on old stable/7, but some other implementations manage to get them wrong. Also remove a few duplicate testcases. Notes: svn path=/head/; revision=228109
* Add WITH_LIBCPLUSPLUS under tools/build/options; the knob itself wasDimitry Andric2011-11-281-0/+2
| | | | | | | already added in a previous revision. Notes: svn path=/head/; revision=228082
* Add a comment that shows how to limit the build to the specific list of arches.Max Khon2011-11-281-0/+2
| | | | Notes: svn path=/head/; revision=228066
* sh: Add tests for some corner cases of 'case' exit status.Jilles Tjoelker2011-11-262-0/+12
| | | | | | | These already work properly. Notes: svn path=/head/; revision=228007
* Add missing ;;Max Khon2011-11-241-0/+1
| | | | Notes: svn path=/head/; revision=227937
* Utility script to build specific parts of the source tree on all archesMax Khon2011-11-241-0/+58
| | | | Notes: svn path=/head/; revision=227935
* Tidy up the statistic documentation.Adrian Chadd2011-11-231-2/+2
| | | | | | | Sponsored by: Hobnob, Inc. Notes: svn path=/head/; revision=227870
* Add the new statistics introduced in r227868.Adrian Chadd2011-11-231-7/+14
| | | | | | | Sponsored by: Hobnob, Inc. Notes: svn path=/head/; revision=227869
* sh: Allow unsetting OPTIND.Jilles Tjoelker2011-11-201-0/+3
| | | | | | | Note that only assigning the decimal value 1 resets getopts, as before. Notes: svn path=/head/; revision=227773
* Revert r227538, since it doesn't compile with clang at all (it doesn'tDimitry Andric2011-11-172-60/+0
| | | | | | | | | | | | | | allow the built-in operations to be redefined, at least not without excessive force). Instead, just disable LLVM's support for atomic operations for now. Nothing in either clang or the tablegen tools currently depends on it. This still allows users of head built before r198344 to upgrade to top-of-head seamlessly. Notes: svn path=/head/; revision=227636
* Bring in support for netmap, a framework for very efficient packetLuigi Rizzo2011-11-177-0/+2294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I/O from userspace, capable of line rate at 10G, see http://info.iet.unipi.it/~luigi/netmap/ At this time I am bringing in only the generic code (sys/dev/netmap/ plus two headers under sys/net/), and some sample applications in tools/tools/netmap. There is also a manpage in share/man/man4 [1] In order to make use of the framework you need to build a kernel with "device netmap", and patch individual drivers with the code that you can find in sys/dev/netmap/head.diff The file will go away as the relevant pieces are committed to the various device drivers, which should happen in a few days after talking to the driver maintainers. Netmap support is available at the moment for Intel 10G and 1G cards (ixgbe, em/lem/igb), and for the Realtek 1G card ("re"). I have partial patches for "bge" and am starting to work on "cxgbe". Hopefully changes are trivial enough so interested third parties can submit their patches. Interested people can contact me for advice on how to add netmap support to specific devices. CREDITS: Netmap has been developed by Luigi Rizzo and other collaborators at the Universita` di Pisa, and supported by EU project CHANGE (http://www.change-project.eu/) The code is distributed under a BSD Copyright. [1] In my opinion is a bad idea to have all manpage in one directory. We should place kernel documentation in the same dir that contains the code, which would make it much simpler to keep doc and code in sync, reduce the clutter in share/man/ and incidentally is the policy used for all of userspace code. Makefiles and doc tools can be trivially adjusted to find the manpages in the relevant subdirs. Notes: svn path=/head/; revision=227614
* LLVM uses atomic operations, which are not supported on i386 and GCCDimitry Andric2011-11-152-0/+60
| | | | | | | | | | | | | | emits calls for them, rather than expanding them inline. Older FreeBSD versions compile for i386 by default and as such we end up with unresolved symbols when we build LLVM's TableGen utility as a build tool on them. Add the functions that GCC emits here, but don't bother to make them atomic. Such is not needed. Submitted by: marcel MFC after: 1 week Notes: svn path=/head/; revision=227538
* A regression test to ensure that arc4random returns different sequencesDavid Schultz2011-11-152-1/+91
| | | | | | | in parent and child processes after a fork. Notes: svn path=/head/; revision=227522
* Add IPv6 support to netblast/netsend/netreceiveOlivier Houchard2011-11-083-50/+159
| | | | | | | | PR: bin/161368 Submitted by: Olivier Cochard-Labbe <olivier AT cochard doT me> Notes: svn path=/head/; revision=227345
* fifo_misc test: Fix swapped lseek arguments.Jilles Tjoelker2011-11-051-1/+1
| | | | | | | It worked regardless because SEEK_CUR happens to be 1. Notes: svn path=/head/; revision=227124
* sh: Add test for exit status of for loop without items.Jilles Tjoelker2011-10-281-0/+4
| | | | | | | | | POSIX says the exit status of a for loop without any items shall be 0. There are no exceptions if the exit status of the previous command was not 0 or if the item list contains a command substitution with non-zero exit status. Notes: svn path=/head/; revision=226892
* Bring over the new aggregate statistics from the 11n branch.Adrian Chadd2011-10-261-12/+85
| | | | | | | | Some of these values are currently updated by the driver (the 11n RX related statistics) so they are immediately useful. Notes: svn path=/head/; revision=226799
* Fix resize regressions tests - we need to destroy BSDlabel before we canPawel Jakub Dawidek2011-10-251-0/+1
| | | | | | | | | create GPT. MFC after: 3 days Notes: svn path=/head/; revision=226729
* Add a "-P olddistfiles" facility to prefetch ports distfiles, using anPoul-Henning Kamp2011-10-231-12/+43
| | | | | | | | | | | | | | | | old distfile directory as primary source: mkdir /freebsd/ports/distfiles.old mv /freebsd/ports/distfiles/* /freebsd/ports/distfiles.old sh sysbuild.sh -c $yourconfig -P /freebsd/ports/distfiles.old rm -rf /freebsd/ports/distfiles.old Unfortunately bsd.ports.mk does not attempt to use a hard-link so while this runs you need diskspace for both your old and your "new" distfiles. Notes: svn path=/head/; revision=226672
* Because ZFS boot code was very fragile in the past and real PITA to debug,Pawel Jakub Dawidek2011-10-212-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce zfsboottest.sh script that will verify if it will be possible to boot from the given pool. # zfsboottest.sh system Where "system" is pool name of the pool we want to boot from. What is being verified by the script: - Does the pool exist? - Does it have bootfs property configured? - Is mountpoint property of the boot dataset set to 'legacy'? Dataset configured in bootfs property has to be mounted to perform more checks: - Does the /boot directory in boot dataset exist? - Is this dataset configured as root file system in /etc/fstab or set in vfs.root.mountfrom variable in /boot/loader.conf? By using zfsboottest tool the script will read all the files in /boot directory using ZFS boot code and calculate their checksums. Then, it will walk /boot directory using find(1) though regular file sytem and also read all the files in /boot directory and calculate their checksums. If any of the files cannot be looked up, read or checksum is invalid it will be reported and booting off of this pool is probably not possible. Some additional checks may be interesting as well. For example if the disks contain proper pmbr and gptzfsboot code or if all expected files in /boot/ are present. When upgrading FreeBSD, one should snapshot datasets that contain operating system, upgrade (install new world and kernel) and use zfsboottest.sh to verify if it will be possible to boot from new configuration. If all is good one should upgrade boot blocks, by eg.: # gpart -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1 If something is wrong, one should rollback datasets and report the problems. MFC after: 3 days Notes: svn path=/head/; revision=226612
* - Allow to specify multiple files to check, eg.Pawel Jakub Dawidek2011-10-212-35/+69
| | | | | | | | | | | | | zfsboottest gpt/system0 gpt/system1 - /boot/kernel/kernel /boot/zfsloader - Instead of printing file's content calculate MD5 hash of the file, so it can be easly compared to the hash calculated via file system. - Some other minor improvements. MFC after: 3 days Notes: svn path=/head/; revision=226611
* Add regression tests for modf{,f,l}().David Schultz2011-10-211-26/+108
| | | | Notes: svn path=/head/; revision=226605
* Tests for complex trig and hyperbolic functions.David Schultz2011-10-213-1/+552
| | | | Notes: svn path=/head/; revision=226603
* Tests for cancellation in fma(). Also include more tests for 128-bitDavid Schultz2011-10-211-3/+63
| | | | | | | | long doubles. Thanks for clusteradm (simon) for making the needed hardware available. Notes: svn path=/head/; revision=226602
* Fix some memory errors in *at() regression tests.Jilles Tjoelker2011-10-181-6/+9
| | | | Notes: svn path=/head/; revision=226523
* Add some tests for corner cases of log() in unusual rounding modes.David Schultz2011-10-151-2/+29
| | | | | | | I wrote these ages ago, but they've been failing until now. Notes: svn path=/head/; revision=226378
* Add some tests for double-rounding bugs in fma().David Schultz2011-10-151-1/+54
| | | | Notes: svn path=/head/; revision=226377
* Fix build after TARGET_BIG_ENDIAN was nuked from orbit.Andrew Thompson2011-10-111-2/+1
| | | | Notes: svn path=/head/; revision=226242
* - Add missing interdependencies to kerberos libraries. Some of theStanislav Sedov2011-09-271-1/+1
| | | | | | | | | | | | kerberos libraries were not linked properly (missing dependencies), which causes 3rd party applications linking to fail when --as-needed ld flag is used. I also added the --no-undefined ld(1) flag to make sure that there're no missing dependencies. MFC after: 3 days Notes: svn path=/head/; revision=225778
* zfsboottest: some additional enhancementsAndriy Gapon2011-09-161-5/+10
| | | | | | | | | | | | | - redirect diagnostics printfs in the boot code to stderr - do not read trailing garbage from a trailing block of a file Also add my copyright to the file after making so many changes. Approved by: re (kib) MFC after: 1 week Notes: svn path=/head/; revision=225609
* zfstest: rename to zfsboottest and move to toolsAndriy Gapon2011-09-162-0/+167
| | | | | | | | Approved by: re (kib) MFC after: 1 week Notes: svn path=/head/; revision=225608
* Fix alignment assumptions.Marius Strobl2011-09-022-6/+4
| | | | | | | | | PR: 160289 Approved by: re (kib) MFC after: 3 days Notes: svn path=/head/; revision=225334
* Add support for IPv6 to ipfw fwd:Bjoern A. Zeeb2011-08-201-0/+369
| | | | | | | | | | | | | | | | | | | | | | Distinguish IPv4 and IPv6 addresses and optional port numbers in user space to set the option for the correct protocol family. Add support in the kernel for carrying the new IPv6 destination address and port. Add support to TCP and UDP for IPv6 and fix UDP IPv4 to not change the address in the IP header. Add support for IPv6 forwarding to a non-local destination. Add a regession test uitilizing VIMAGE to check all 20 possible combinations I could think of. Obtained from: David Dolson at Sandvine Incorporated (original version for ipfw fwd IPv6 support) Sponsored by: Sandvine Incorporated PR: bin/117214 MFC after: 4 weeks Approved by: re (kib) Notes: svn path=/head/; revision=225044
* Test process descriptors.Jonathan Anderson2011-08-185-0/+221
| | | | | | | | | | | | | Ensure that process descriptors work as expected. We should be able to: - pdfork(), like regular fork(), but producing a process descriptor - pdgetpid() to convert a PD into a PID - pdkill() to send signals to a process identified by a PD Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc Notes: svn path=/head/; revision=224989
* poll(2) implementation for capabilities.Jonathan Anderson2011-08-161-2/+16
| | | | | | | | | | | When calling poll(2) on a capability, unwrap first and then poll the underlying object. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc Notes: svn path=/head/; revision=224910
* Rename CAP_*_KEVENT to CAP_*_EVENT.Jonathan Anderson2011-08-121-2/+2
| | | | | | | | | | | Change the names of a couple of capability rights to be less FreeBSD-specific. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc Notes: svn path=/head/; revision=224797
* Test *at(2) calls with capability-mode lookup.Jonathan Anderson2011-08-124-3/+157
| | | | | | | | | | | | | | | | This commit adds regression testing for openat(), fstatat(), etc. with capability scoping ("strict relative" lookup), which applies: - in capability mode - when performing any *at() lookup relative to a capability These tests will fail until the *at() code is committed; on my local instance, with the *at() changes, they all pass. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc Notes: svn path=/head/; revision=224793
* Use the right printf() format string without a cast to maxint_t.Jonathan Anderson2011-08-111-4/+4
| | | | | | | | | | | As per kib's suggestion, we also change test_count from a size_t to an int; its value at the moment is 4, and we only expect it to go up to 7. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc Notes: svn path=/head/; revision=224784
* Second-to-last commit implementing Capsicum capabilities in the FreeBSDRobert Watson2011-08-112-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel for FreeBSD 9.0: Add a new capability mask argument to fget(9) and friends, allowing system call code to declare what capabilities are required when an integer file descriptor is converted into an in-kernel struct file *. With options CAPABILITIES compiled into the kernel, this enforces capability protection; without, this change is effectively a no-op. Some cases require special handling, such as mmap(2), which must preserve information about the maximum rights at the time of mapping in the memory map so that they can later be enforced in mprotect(2) -- this is done by narrowing the rights in the existing max_protection field used for similar purposes with file permissions. In namei(9), we assert that the code is not reached from within capability mode, as we're not yet ready to enforce namespace capabilities there. This will follow in a later commit. Update two capability names: CAP_EVENT and CAP_KEVENT become CAP_POST_KEVENT and CAP_POLL_KEVENT to more accurately indicate what they represent. Approved by: re (bz) Submitted by: jonathan Sponsored by: Google Inc Notes: svn path=/head/; revision=224778
* Move cxgbtool from usr.sbin to tools/tools.Navdeep Parhar2011-08-108-0/+11278
| | | | | | | | Approved by: re (kib) MFC after: 1 month Notes: svn path=/head/; revision=224768
* Properly initialise the "len" argument to getsockname(2) in the tcpdropRobert Watson2011-08-061-0/+1
| | | | | | | | | | regression test so that it works (more) consistently. Approved by: re (bz) Sponsored by: Juniper Networks Notes: svn path=/head/; revision=224688
* Expect fchflags(2) to fail with EOPNOTSUPP on NFS.Jonathan Anderson2011-08-051-2/+11
| | | | | | | | | | | | | | | Even if we have CAP_FCHFLAGS, fchflags(2) fails on NFS. This is normal and expected, so don't fail the test because of it. Note that, whether or not we are on NFS, fchflags(2) should always fail with ENOTCAPABLE if we are using a capability that does not have the CAP_FCHFLAGS right. Approved by: re (kib), mentor (rwatson) Sponsored by: Google Inc Notes: svn path=/head/; revision=224660