dragonfly.git
2 years agovarsym - Add -x option
Matthew Dillon [Tue, 17 Jan 2012 02:41:24 +0000 (18:41 -0800)]
varsym - Add -x option

* Add the -x option which causes varsym to set per-process variables and
  then exec the command line from the first non-varsym-assign.  For example:

  varsym -x UNAME_n=fubar uname
  varsym -x UNAME_n=fubar /bin/csh
  etc

2 years agoFix the ktr(4) formats for pid_t and lwpid_t on x86_64
Aggelos Economopoulos [Mon, 16 Jan 2012 20:58:37 +0000 (12:58 -0800)]
Fix the ktr(4) formats for pid_t and lwpid_t on x86_64

2 years agoFix a few bugs in the new ktrdump code
Aggelos Economopoulos [Mon, 16 Jan 2012 20:57:05 +0000 (12:57 -0800)]
Fix a few bugs in the new ktrdump code

- Pass in the correct machine_valist pointer on i386 (which means we need
  some indirection on x86_64).
- Keep references to all memory blocks that we allocate and free them
  when we're done with the machine_valist.
- Make sure we don't leak any memory on the error paths either.

2 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Mon, 16 Jan 2012 20:03:13 +0000 (12:03 -0800)]
Merge branch 'vendor/LIBARCHIVE'

2 years agoImport libarchive-3.0.3.
Peter Avalos [Mon, 16 Jan 2012 19:55:56 +0000 (11:55 -0800)]
Import libarchive-3.0.3.

-Errors saving sparse files to pax archives.
-allow archive_*_free(NULL)
-empty contents extracting Zip files with bsdcpio
-truncated filenames in listings

2 years agobsd-family-tree: Sync with FreeBSD.
Sascha Wildner [Mon, 16 Jan 2012 19:54:36 +0000 (20:54 +0100)]
bsd-family-tree: Sync with FreeBSD.

2 years agokernel - Fix 3:00 a.m. crashes (deadlocks) related to HAMMER VM use
Matthew Dillon [Mon, 16 Jan 2012 19:33:33 +0000 (11:33 -0800)]
kernel - Fix 3:00 a.m. crashes (deadlocks) related to HAMMER VM use

When memory is low and the pageout daemon needs to write things out we still
need to have at least some reserve to perform the supporting operations for
the pageout.  HAMMER is particularly memory intensive and could get into a
situation where insufficient reserve memory was available, deadlocking the
system.

With these changes DragonFly should run stable on systems with as little
as 256M of ram, and possibly a bit lower.

* The getblk/bread/bwrite/etc brelse/bqrelse sequence used to manage buffers
  had several bugs in it that prevented the low memory handling code from
  operating properly.  The b[q]relse() sequence was not properly detecting
  the low memory condition and freeing or caching the underlying VM pages
  (when possible).

* Also change the low memory test used by the buffer cache from 'severe'
  to 'min' in kern/vfs_bio.c.  We may be able to change this back to 'severe'
  at a later date with further testing.  These tests are in brelse(),
  bqrelse(), and vfs_vmio_release().

* Rewrite bio_page_alloc().  It effectively does the same thing that it did
  before but should operate more smoothly.  We also no longer try to recover
  pages from unrelated buffer cache buffers from this function, which could
  lead to deadlocks.  The warning kprintf is now also rate-limited.

* Add a buffer overload test in the hammer dedup ioctl.  A hammer dedup
  could cause a buffer cache deadlock by allowing too many dirty buffers
  to build up.

* Add a VM memory test to the core hammer flusher code that was previously
  only checking for the UNDO meta-data and buffer overload limits.  This
  is now done on a per-record basis and should prevent HAMMER from allocating
  too much memory during a flusher operation when the VM system is already
  too low on memory.

* Add some vm_wait_nominal() calls in critical I/O paths, but make sure we
  do not use these calls in any I/O path used by the HAMMER pageout code.

  Probably the most important path is the vm_object_page_clean*() code
  path, effectively called via either msync() or via the 30-60 second
  system sync.

* Properly bawrite() a buffer in hammer_vop_write() when IO_ASYNC is set
  (which is used by the pageout daemon), otherwise the pageout daemon will
  not be able to directly recover memory in low memory situations when
  paging to a HAMMER file mapped SHARED/RW.

Testing-by: tuxillo, lentferj, ftigeot, dillon
2 years agohammer - Properly pass -S option to hammer run via remote ssh
Matthew Dillon [Mon, 16 Jan 2012 19:30:22 +0000 (11:30 -0800)]
hammer - Properly pass -S option to hammer run via remote ssh

* Properly pass -S option to hammer run via remote ssh

Reported-by: someone not me, sorry I forgot.
2 years agoumass(4): Remove an unneeded include.
Sascha Wildner [Mon, 16 Jan 2012 19:21:28 +0000 (20:21 +0100)]
umass(4): Remove an unneeded include.

2 years agokern: Update traps, sigbus->sigsegv, cleanup and fixes
John Marino [Mon, 16 Jan 2012 14:56:07 +0000 (15:56 +0100)]
kern: Update traps, sigbus->sigsegv, cleanup and fixes

The primary purpose of this changeset is to change the signal from
bus error to segfault when an attempt to access protected memory is
made.  In the process of doing this, it was noticed that there were
differences between i386 and x86_64 as well as differences between
the actual and virtual kernels.

Several of these differences were addressed.  Extra whitespace was
removed and some syncing between the divergent FreeBSD version was
made.  Some "#if 0" sections were removed.  The virtual kernels were
tested along with the real kernels.  A conservative approach was
taken as there seems to more cruft that could come out.

2 years agortld: add RELRO support
John Marino [Mon, 16 Jan 2012 14:39:15 +0000 (15:39 +0100)]
rtld: add RELRO support

"RELRO" means PLT (partial) or PLT+GOT (full) data is shifted to a
dedicated page by the linker which triggers the dynamic linker to
protect the page by setting the memory to read-only.  This feature
assists in detecting memory corruption and also prevents some types
of buffer overflow exploits.

Until now, this feature was only supported by Linux's glibc.  No BSD
had relro support in their dynamic linker.  I proposed the patch and
it was reviewed by a FreeBSD dynamic linker expert.  Attempts to
access protected data currently results in a bus error signal, but the
next commit will update the kernel trap files to cause the segfault
signal to be emitted instead.

Reviewed-by: Kostik Belousov
2 years agortld: Reorganize reloc_plt and reloc_jmpslots
John Marino [Sat, 14 Jan 2012 15:19:06 +0000 (16:19 +0100)]
rtld: Reorganize reloc_plt and reloc_jmpslots

In the future, more reloc types than just R_$ARCH_JMP_SLOT will be
supported.  FreeBSD already has them and converted to a switch statement
and introduced a new rtld_error message rather than use an ASSERT.
Follow suit and fix a mismatching const as well.

2 years agoMakefile_upgrade.inc: Remove some MLINKS added in 2008 which do now exist.
Sascha Wildner [Mon, 16 Jan 2012 11:15:43 +0000 (12:15 +0100)]
Makefile_upgrade.inc: Remove some MLINKS added in 2008 which do now exist.

2 years agohptiop(4): Sync with FreeBSD.
Sascha Wildner [Mon, 16 Jan 2012 11:11:47 +0000 (12:11 +0100)]
hptiop(4): Sync with FreeBSD.

Set the sense residual properly.

2 years agohptiop(4): Add MODULE_VERSION.
Sascha Wildner [Sun, 15 Jan 2012 11:36:18 +0000 (12:36 +0100)]
hptiop(4): Add MODULE_VERSION.

2 years agohptiop(4): Remove an unused define.
Sascha Wildner [Sat, 14 Jan 2012 22:58:55 +0000 (23:58 +0100)]
hptiop(4): Remove an unused define.

2 years agohptiop(4): Remove an unneeded variable.
Sascha Wildner [Sat, 14 Jan 2012 22:38:26 +0000 (23:38 +0100)]
hptiop(4): Remove an unneeded variable.

device_printf() will already print the unit.

2 years agomsi/msix: Don't allocate MSI/MSI-X if the device does not support any messages
Sepherosa Ziehau [Mon, 16 Jan 2012 10:56:23 +0000 (18:56 +0800)]
msi/msix: Don't allocate MSI/MSI-X if the device does not support any messages

2 years agomsix: Remove MSI-X allocation, step 3/many
Sepherosa Ziehau [Mon, 16 Jan 2012 10:41:49 +0000 (18:41 +0800)]
msix: Remove MSI-X allocation, step 3/many

Add alloc_msix_vector pci method, which allocate one MSI-X at the
specified position on the target CPU

2 years agomsix: Rework MSI-X allocation, step 2/3
Sepherosa Ziehau [Mon, 16 Jan 2012 08:38:36 +0000 (16:38 +0800)]
msix: Rework MSI-X allocation, step 2/3

Add pci_{enable,disable}_msix(), which enable/disable MSI-X globally

2 years agomsix: Rework MSI-X allocation, step 1/3
Sepherosa Ziehau [Mon, 16 Jan 2012 07:10:27 +0000 (15:10 +0800)]
msix: Rework MSI-X allocation, step 1/3

Add pci_{setup,teardown}_msix(), which prepare/cleanup necessary
information for MSI-X allocation operation.

2 years agomsix/pcib: Pass cpuid to {alloc,release}_msix pcib methods
Sepherosa Ziehau [Mon, 16 Jan 2012 05:34:47 +0000 (13:34 +0800)]
msix/pcib: Pass cpuid to {alloc,release}_msix pcib methods

2 years agombuf: Don't raise mbuf limit for jcluster
Sepherosa Ziehau [Mon, 16 Jan 2012 04:06:10 +0000 (12:06 +0800)]
mbuf: Don't raise mbuf limit for jcluster

jcluster's space is shared with normal cluster's space

2 years agombuf: Avoid kmalloc "limit" overflow
Sepherosa Ziehau [Mon, 16 Jan 2012 03:51:54 +0000 (11:51 +0800)]
mbuf: Avoid kmalloc "limit" overflow

Cast stack variable cl_limit and mb_limit to size_t when calculate
the kmalloc limit, so large kern.ipc.nmbclusters will not cause
the calculated value overflow.

2 years agovmstat: ks_limit is size_t not ssize_t
Sepherosa Ziehau [Mon, 16 Jan 2012 03:48:39 +0000 (11:48 +0800)]
vmstat: ks_limit is size_t not ssize_t

2 years agoroute: Add net.route.kmalloc_limit tunable to raise M_RTABLE limit
Sepherosa Ziehau [Mon, 16 Jan 2012 03:11:52 +0000 (11:11 +0800)]
route: Add net.route.kmalloc_limit tunable to raise M_RTABLE limit

2 years agoAdd vfs_accounting to etc/rc.d/Makefile
François Tigeot [Sun, 15 Jan 2012 23:02:35 +0000 (00:02 +0100)]
Add vfs_accounting to etc/rc.d/Makefile

2 years agorc.d: default values for vfs_accounting variables
François Tigeot [Sun, 15 Jan 2012 22:09:27 +0000 (23:09 +0100)]
rc.d: default values for vfs_accounting variables

2 years agorc.d: Add a vfs_accounting script
François Tigeot [Sun, 15 Jan 2012 21:33:08 +0000 (22:33 +0100)]
rc.d: Add a vfs_accounting script

* Its only function for now is to synchronize counters with the real
  disk usage of a list of mount points

* Small rc.conf example:
  vfs_accounting_enable="YES"
  vfs_accounting_sync="/home /mnt/data"

2 years agomake upgrade: Remove some more libarchive manpages.
Sascha Wildner [Sun, 15 Jan 2012 20:38:34 +0000 (21:38 +0100)]
make upgrade: Remove some more libarchive manpages.

2 years agoatphy: Explicitly clear 1000baseT control register for 10/100 only F1 PHY
Sepherosa Ziehau [Sun, 15 Jan 2012 14:04:18 +0000 (22:04 +0800)]
atphy: Explicitly clear 1000baseT control register for 10/100 only F1 PHY

Obtained-from: FreeBSD 221817

  "Explicitly clear 1000baseT control register for F1 PHY used in
   AR8132 FastEthernet controller.  The PHY has no ability to
   establish a gigabit link. Previously only link parters which
   support down-shifting was able to establish link.
   This change should fix a long standing link establishment issue
   of AR8132."

2 years agoatphy: Recognize another F1 PHY
Sepherosa Ziehau [Sun, 15 Jan 2012 13:33:18 +0000 (21:33 +0800)]
atphy: Recognize another F1 PHY

2 years agomiidev: regen
Sepherosa Ziehau [Sun, 15 Jan 2012 13:32:46 +0000 (21:32 +0800)]
miidev: regen

2 years agomiidev: Add PHY ID for Atheros F1 10/100/1000
Sepherosa Ziehau [Sun, 15 Jan 2012 13:32:05 +0000 (21:32 +0800)]
miidev: Add PHY ID for Atheros F1 10/100/1000

2 years agomsi-x: Suffix operation on vectors w/ _vector
Sepherosa Ziehau [Sun, 15 Jan 2012 13:15:53 +0000 (21:15 +0800)]
msi-x: Suffix operation on vectors w/ _vector

2 years agomsi: Don't release MSI-X on MSI releasing path
Sepherosa Ziehau [Sun, 15 Jan 2012 11:59:12 +0000 (19:59 +0800)]
msi: Don't release MSI-X on MSI releasing path

2 years agopci; Remove pci_remap_msix_method declaration; it was nuked
Sepherosa Ziehau [Sun, 15 Jan 2012 11:46:59 +0000 (19:46 +0800)]
pci; Remove pci_remap_msix_method declaration; it was nuked

2 years agortld: Fix TLS inconsistency, cleanups
John Marino [Sat, 14 Jan 2012 13:32:07 +0000 (14:32 +0100)]
rtld: Fix TLS inconsistency, cleanups

Fixes FreeBSD PR kern/160721: TLS is inconsistent
Uses the proper TLS block to calculate the TLS variable address in the
event the TLS data generation was updated.  (FreeBSD SVN 225582)

Also cleaned up a typo and added some parentheses around return
values to sync up with FreeBSD.

2 years agortld: Clang fixes
John Marino [Sat, 14 Jan 2012 12:28:14 +0000 (13:28 +0100)]
rtld: Clang fixes

1) Fix clang warnings
2) Fix r_debug_state function

The r_debug_state function is a hook required for gdb.  Clang will inline
the function, but because it is empty, it won't generate any calls to it.
This results in gdb backtraces being corrupted.  Fixed with the following
hack obtained from FreeBSD SVN 225366.

Fix it by marking the function __noinline, and inserting an empty asm
statement that pretends to clobber memory.  This forces the compiler to
emit calls to the r_debug_state() function throughout rtld.c

2 years agopci: Remove unused MSI remap method
Sepherosa Ziehau [Sat, 14 Jan 2012 12:49:37 +0000 (20:49 +0800)]
pci: Remove unused MSI remap method

2 years agortld: remove broken functionality to build exec. version
John Marino [Sat, 14 Jan 2012 11:38:01 +0000 (12:38 +0100)]
rtld: remove broken functionality to build exec. version

If anyone had tried to build an executable version of the dynamic linker
using the source makefiles, it would have failed.  The i386 version had
bad CFLAGS and the x86_64 was missing the ldscript.  Moreever, as the
gold linker doesn't use ldscripts, it was GNU linker (ld.bfd) specific.

If somebody decides this functionality is still desired, the ldscript
files from FreeBSD (elf_rtld.x) can be imported from FreeBSD likely
without modification.  The now-dummy makefiles were alterated with
similar comments.

2 years agortld: fix some typos
John Marino [Sat, 14 Jan 2012 11:07:49 +0000 (12:07 +0100)]
rtld: fix some typos

2 years agortld: Fix improper sync of map_object.c (17 July 2009)
John Marino [Fri, 13 Jan 2012 20:13:59 +0000 (21:13 +0100)]
rtld: Fix improper sync of map_object.c (17 July 2009)

DragonFly rtld synced FreeBSD commit SVN 195743, but this minor
condition change was missed.

2 years agortld: Revert mprotect optimization during .bss creation
John Marino [Fri, 13 Jan 2012 19:53:42 +0000 (20:53 +0100)]
rtld: Revert mprotect optimization during .bss creation

Using only mprotect over .bss prevented it from writing .bss to the core
files as the whole region for the dso is mmapped with MAP_NOCORE flag.
Revert to previous mmap implementation.
Comes from FreeBSD SVN 225699

2 years agortld: Fix file descriptor leak
John Marino [Fri, 13 Jan 2012 19:43:58 +0000 (20:43 +0100)]
rtld: Fix file descriptor leak

2 years agotest - Correct bug in tuxload and document second bug
Matthew Dillon [Fri, 13 Jan 2012 22:47:17 +0000 (14:47 -0800)]
test - Correct bug in tuxload and document second bug

* Correct a file creation bug in tuxload

* Document that the msync() is not working as originally intended, but
  we like the bugged version better so we're running with it.

2 years agotest - Add tuxload.c
Matthew Dillon [Fri, 13 Jan 2012 20:46:56 +0000 (12:46 -0800)]
test - Add tuxload.c

* Tuxload tries to stress the VM system's free memory.

Submitted-by: Antonio Huete Jimenez <tuxillo@quantumachine.net>
2 years agoMachIntrABI: intr_{config,cpuid} -> legacy_intr_{config,cpuid}
Sepherosa Ziehau [Fri, 13 Jan 2012 08:43:24 +0000 (16:43 +0800)]
MachIntrABI: intr_{config,cpuid} -> legacy_intr_{config,cpuid}

So these two functions will not be misused on MSI. No functional changes

2 years agoUpdate files for libarchive-3.0.2 import.
Peter Avalos [Thu, 12 Jan 2012 23:46:15 +0000 (15:46 -0800)]
Update files for libarchive-3.0.2 import.

2 years agoMerge branch 'vendor/LIBARCHIVE'
Peter Avalos [Thu, 12 Jan 2012 23:42:17 +0000 (15:42 -0800)]
Merge branch 'vendor/LIBARCHIVE'

2 years agoImport libarchive-3.0.2.
Peter Avalos [Mon, 9 Jan 2012 02:07:11 +0000 (18:07 -0800)]
Import libarchive-3.0.2.

*libarchive 3.0.2 released
*Various fixes merged from FreeBSD
*Symlink support in Zip reader and writer
*Robustness fixes to 7Zip reader

*libarchive 3.0.1b released
*7Zip reader
*Small fixes to ISO and Zip to improve robustness with corrupted input
*Improve streaming Zip reader's support for uncompressed entries
*New seeking Zip reader supports SFX Zip archives

*libarchive 3.0.0a released
*Update shared-library version calculations for libarchive 3.x
*Fix tar -s; follow GNU tar for controlling hardlink/symlink substitutions
*Fix reading ISO images built by NetBSD's mkisofs
*Old archive_read_support_compression_XXX functions are deprecated and
 will disappear in libarchive 4.0.
*RAR reader
*Add tar:compat-2x option to emulate broken libarchive 2.x
 handling of pax UTF-8 headers
*Refactor read_open() into a collection of single-item setters;
 support the old interfaces as wrappers
*Split disk writer into separate POSIX and Windows implementations
*More work to return errors instead of calling abort()
*Add charset option to many writers to control MBCS filenames
*Overhauled support for per-format extension options
*Track character set used for mbcs strings, support
 translating to/from user-specified locale
*Recognize mtree files without requiring a signature
*Use iconv to convert to/from Unicode instead of making bad
 assumptions about the C90 character set translation functions
*CAB reader
*LHA/LZH reader
*Many improvements to ISO reader compatibility
*Use larger buffers when copy files into an archive
*archive_read_disk now supports traversals
*XAR writer
*Fix ^T handling; don't exit on interrupted reads and writes
*Improved detection of platform-specific crypto support
*lzip read and write filters
*tar --gid --gname --uid --uname
*Use Red-black tree for ISO reader/writer to improve performance
*Minimal writer for legacy GNU tar format
*Relax handling of state failures; misuse by clients now generally
 results in a sticky ARCHIVE_FATAL rather than a visit to abort()
*ISO writer
*Split many man pages into smaller chunks.
*Cheat on block sizes when reading archives from disk.
*Use int64_t instead of off_t, dev_t, ino_t, uid_t, and gid_t
*Document new ACL functions.
*Support multiple write filters
*Remove some legacy libarchive 1.x APIs
*Read afio headers
*Archive sparse files compatibly with GNU tar
*Support cpio -V

2 years agovknetd - Ignore SIGPIPE
Matthew Dillon [Thu, 12 Jan 2012 19:06:59 +0000 (11:06 -0800)]
vknetd - Ignore SIGPIPE

* Ignore SIGPIPE, fixing an undesired kill of vknetd when a write()
  races a vkernel termination.

Reported-by: tuxillo
2 years agoioapic_abi: More consistent function name w/ legacy interrupt
Sepherosa Ziehau [Thu, 12 Jan 2012 10:48:29 +0000 (18:48 +0800)]
ioapic_abi: More consistent function name w/ legacy interrupt

No functional changes

2 years agotcp_output: Move output mbuf related variables' cleanup to the again label
Sepherosa Ziehau [Thu, 12 Jan 2012 03:09:20 +0000 (11:09 +0800)]
tcp_output: Move output mbuf related variables' cleanup to the again label

Though not all cleanups are necessary if we loop back to again label,
better safe than sorry

2 years agoroute: Log R_Malloc failure in rtrequest1()
Sepherosa Ziehau [Thu, 12 Jan 2012 02:14:44 +0000 (10:14 +0800)]
route: Log R_Malloc failure in rtrequest1()

2 years agodrm.4: Add some info about what to do when acceleration fails to initialize.
Sascha Wildner [Wed, 11 Jan 2012 04:49:17 +0000 (05:49 +0100)]
drm.4: Add some info about what to do when acceleration fails to initialize.

Submitted-by: Andrea Magliano <masterblaster@tiscali.it>
Dragonfly-bug: <http://bugs.dragonflybsd.org/issues/2230>

2 years agonetgraph: remove unused variable.
Nuno Antunes [Tue, 10 Jan 2012 13:31:17 +0000 (13:31 +0000)]
netgraph: remove unused variable.

2 years agonetgraph: handle M_PREPEND failure.
Nuno Antunes [Mon, 9 Jan 2012 13:56:06 +0000 (13:56 +0000)]
netgraph: handle M_PREPEND failure.

Noticed-by: Sepherosa Ziehau
2 years agonetgraph7: move static to the front and remove MALLOC/FREE macro usage.
Nuno Antunes [Sat, 10 Dec 2011 18:20:24 +0000 (18:20 +0000)]
netgraph7: move static to the front and remove MALLOC/FREE macro usage.

2 years agonetgraph7: uncomment ng_tcpmss cookie.
Nuno Antunes [Sat, 10 Dec 2011 08:42:49 +0000 (08:42 +0000)]
netgraph7: uncomment ng_tcpmss cookie.

* Forgotten in last commit.

2 years agonetgraph7: welcome ng_tcpmss.
Nuno Antunes [Sat, 10 Dec 2011 08:16:51 +0000 (08:16 +0000)]
netgraph7: welcome ng_tcpmss.

2 years agonetgraph7: welcome ng_rfc1490.
Nuno Antunes [Fri, 9 Dec 2011 22:37:28 +0000 (22:37 +0000)]
netgraph7: welcome ng_rfc1490.

2 years agonetgraph7: welcome ng_hub.
Nuno Antunes [Fri, 9 Dec 2011 22:19:07 +0000 (22:19 +0000)]
netgraph7: welcome ng_hub.

2 years agonetgraph7: conditionalize netgraph modules build.
Nuno Antunes [Fri, 9 Dec 2011 20:27:38 +0000 (20:27 +0000)]
netgraph7: conditionalize netgraph modules build.

* If WANT_NETRAPH7 make variable is set then build netgraph7 modules,
  otherwise build netgraph modules.

2 years agonetgraph7: convert lockmgr locks into mutexes.
Nuno Antunes [Fri, 18 Nov 2011 20:45:06 +0000 (20:45 +0000)]
netgraph7: convert lockmgr locks into mutexes.

2 years agoRevert "netgraph7: Make netgraph7 kernel modules names unique."
Nuno Antunes [Sun, 12 Dec 2010 13:22:40 +0000 (13:22 +0000)]
Revert "netgraph7: Make netgraph7 kernel modules names unique."

This reverts commit b3caef111369521fa1099de35840437191aa1436.

* Now that netgraph7 kernel buils is under the WANT_NETGRAPH7 make
  variable, this commit can be reverted.

2 years agonetgraph7: Put netgraph7 kernel build under WANT_NETGRAPH7 make variable too.
Nuno Antunes [Sun, 12 Dec 2010 08:45:42 +0000 (08:45 +0000)]
netgraph7: Put netgraph7 kernel build under WANT_NETGRAPH7 make variable too.

* When the WANT_NETGRAPH7 make variable is set, libnetgraph7 and the
  netgraph7 kernel parts instead of their legacy couterparts.
  Previously, only the libnetgraph7 build was controled by this variable.
  This commit puts the kernel build part under the same variable as well
  so that the legacy kernel modules are not overwriten by the new ones.

2 years agonetgraph7: ng_socket: use lksleep() instead of home brewed version.
Nuno Antunes [Wed, 22 Sep 2010 14:40:24 +0000 (15:40 +0100)]
netgraph7: ng_socket: use lksleep() instead of home brewed version.

* This eliminates the last function in netgraph7/dragonfly.c.
  Remove the file because it is no longer needed.

2 years agonetgraph7: staticize linker_api_avaliable() and move it to ng_socket.c.
Nuno Antunes [Wed, 22 Sep 2010 14:11:48 +0000 (15:11 +0100)]
netgraph7: staticize linker_api_avaliable() and move it to ng_socket.c.

2 years agonetgraph7: Remove unused functions.
Nuno Antunes [Wed, 22 Sep 2010 14:02:30 +0000 (15:02 +0100)]
netgraph7: Remove unused functions.

2 years agonetgraph7: Include the correct header file in dragonfly.c.
Nuno Antunes [Wed, 22 Sep 2010 00:50:20 +0000 (01:50 +0100)]
netgraph7: Include the correct header file in dragonfly.c.

* The dragonfly.c file was #including the legacy netgraph
  ng_message.h header instead of the new one.

* Add missing include to netgraph7 ng_message.h.

2 years agonetgraph7: Make netgraph7 kernel modules names unique.
Nuno Antunes [Wed, 22 Sep 2010 00:35:16 +0000 (01:35 +0100)]
netgraph7: Make netgraph7 kernel modules names unique.

* This way, netgraph (legacy) and netgraph7 kernel modules names
  do not colide and do not overwrite each other in /boot/<blah> during
  make installkernel.

2 years agonetgraph7: curthread visibility is needed, so #include <sys/globaldata.h>
Nuno Antunes [Sat, 18 Sep 2010 14:33:02 +0000 (15:33 +0100)]
netgraph7: curthread visibility is needed, so #include <sys/globaldata.h>

2 years agonetgraph7: Welcome ng_pppoe.
Nuno Antunes [Sat, 18 Sep 2010 11:20:12 +0000 (12:20 +0100)]
netgraph7: Welcome ng_pppoe.

2 years agonetgraph7: Welcome ng_one2many.
Nuno Antunes [Sat, 18 Sep 2010 01:45:25 +0000 (02:45 +0100)]
netgraph7: Welcome ng_one2many.

2 years agonetgraph7: Welcome ng_mppc.
Nuno Antunes [Sat, 18 Sep 2010 01:37:29 +0000 (02:37 +0100)]
netgraph7: Welcome ng_mppc.

2 years agouipc: Import mbuf utility function m_unshare() from FreeBSD.
Nuno Antunes [Sat, 18 Sep 2010 01:28:50 +0000 (02:28 +0100)]
uipc: Import mbuf utility function m_unshare() from FreeBSD.

* This function creates a version of the specified mbuf chain whose
  contents can be safely modified without affecting other users.

Taken-from: FreeBSD

2 years agonetgraph7: Welcome ng_ppp.
Nuno Antunes [Fri, 17 Sep 2010 23:15:42 +0000 (00:15 +0100)]
netgraph7: Welcome ng_ppp.

2 years agonetgraph7: Welcome ng_lmi.
Nuno Antunes [Fri, 17 Sep 2010 22:34:39 +0000 (23:34 +0100)]
netgraph7: Welcome ng_lmi.

2 years agonetgraph7: Welcome ng_l2tp.
Nuno Antunes [Fri, 17 Sep 2010 22:28:25 +0000 (23:28 +0100)]
netgraph7: Welcome ng_l2tp.

2 years agonetgraph7: ng_ksocket: lwkt_{get,rel}token() -> lwkt_{get,rel}pooltoken().
Nuno Antunes [Fri, 17 Sep 2010 15:04:16 +0000 (16:04 +0100)]
netgraph7: ng_ksocket: lwkt_{get,rel}token() -> lwkt_{get,rel}pooltoken().

2 years agonetgraph7: Properly lock ng_ksocket during accept phase.
Nuno Antunes [Fri, 17 Sep 2010 14:46:55 +0000 (15:46 +0100)]
netgraph7: Properly lock ng_ksocket during accept phase.

* Use ssb_token to protect the TAILQ.

2 years agonetgraph7: welcome ng_frame_relay.
Nuno Antunes [Fri, 17 Sep 2010 00:16:04 +0000 (01:16 +0100)]
netgraph7: welcome ng_frame_relay.

2 years agonetgraph7: Welcome ng_etf.
Nuno Antunes [Fri, 17 Sep 2010 00:05:47 +0000 (01:05 +0100)]
netgraph7: Welcome ng_etf.

2 years agonetgraph7: Welcome ng_echo.
Nuno Antunes [Thu, 16 Sep 2010 23:53:48 +0000 (00:53 +0100)]
netgraph7: Welcome ng_echo.

2 years agonetgraph7: Welcome ng_pptpgre.
Nuno Antunes [Thu, 16 Sep 2010 23:40:37 +0000 (00:40 +0100)]
netgraph7: Welcome ng_pptpgre.

2 years agonetgraph7: catch up with pr_* -> netmsg changes.
Nuno Antunes [Thu, 16 Sep 2010 22:54:05 +0000 (23:54 +0100)]
netgraph7: catch up with pr_* -> netmsg changes.

2 years agonetgraph7: fix netgraph7 build
Nuno Antunes [Mon, 13 Sep 2010 23:42:20 +0000 (00:42 +0100)]
netgraph7: fix netgraph7 build

* add missing socketvar2.h header #include's.

* fix comment.

2 years agoNETGRAPH7: ng_ksocket: Use atomic ops for ssb_flags handling.
Nuno Antunes [Tue, 7 Sep 2010 18:18:48 +0000 (19:18 +0100)]
NETGRAPH7: ng_ksocket: Use atomic ops for ssb_flags handling.

2 years agoNETGRAPH: Simplify ng_ether_input_orphan().
Nuno Antunes [Tue, 7 Sep 2010 17:48:42 +0000 (18:48 +0100)]
NETGRAPH: Simplify ng_ether_input_orphan().

* Restore ethernet header on mbuf before passing it to
  ng_ether_input_orphan(), instead of doing it later. This improves
  API consistency between legacy netgraph and netgraph7.

Taken-from: FreeBSD

2 years agoNETGRAPH7: Welcome ng_ksocket.
Nuno Antunes [Sun, 5 Sep 2010 00:58:32 +0000 (01:58 +0100)]
NETGRAPH7: Welcome ng_ksocket.

* Put ng_ksocket in its own subdirectory and attach it to the build

2 years agoNETGRAPH7: Fix kernel build with options NETGRAPH7.
Nuno Antunes [Fri, 3 Sep 2010 20:30:04 +0000 (21:30 +0100)]
NETGRAPH7: Fix kernel build with options NETGRAPH7.

* Pass flags to tsleep_interlock.
* Silence gcc warning being treated as error.
* Remove socket polling.

2 years agoNETGRAPH7: libnetgraph7: fix compilation.
Nuno Antunes [Fri, 3 Sep 2010 18:51:38 +0000 (19:51 +0100)]
NETGRAPH7: libnetgraph7: fix compilation.

2 years agolibnetgraph7: remove extra WARNS from the Makefile
Nuno Antunes [Fri, 3 Sep 2010 18:04:15 +0000 (19:04 +0100)]
libnetgraph7: remove extra WARNS from the Makefile

* Remove superfluous WARNS?= declaration.

2 years agoWelcome ng_deflate.
Nuno Antunes [Tue, 23 Jun 2009 19:27:48 +0000 (20:27 +0100)]
Welcome ng_deflate.

2 years agoWelcome ng_bridge.
Nuno Antunes [Tue, 23 Jun 2009 17:12:50 +0000 (18:12 +0100)]
Welcome ng_bridge.

And also add netgraph7 include files to the Makefile. These somehow
were omited in the previous commit.

2 years agoApply netgraph7 megapatch.
Nuno Antunes [Sun, 21 Jun 2009 12:58:01 +0000 (13:58 +0100)]
Apply netgraph7 megapatch.

* Translate objcache calls.
* Translate uma_zone to objcache.
* Introduce libnetgraph7 (is compiled when WANT_NETGRAPH7 is defined).
* Welcome ng_socket.
* Convert netgraph netisr to a real taskqueue. This fixes a deadlock
  specific to dragonfly.
* Welcome ng_async.
* Welcome ng_UI.
* Welcome ng_ether.
* Fix mtx_assert translation.
* Welcome ng_hole.
* Welcome ng_cisco.
* Welcome ng_iface.
* Welcome ng_tee.
* Welcome ng_atmllc.
* Welcome ng_bpf.
* Welcome ng_vjc.

2 years agoIntroduce WANT_NETGRAPH7 make variable.
Nuno Antunes [Sat, 20 Jun 2009 23:13:47 +0000 (00:13 +0100)]
Introduce WANT_NETGRAPH7 make variable.

The WANT_NETGRAPH7 make option tells us to build libnetgraph7 instead of the lecagy libnetgraph library.

2 years agoi386: LINE interrupt -> LEGACY interrupt
Sepherosa Ziehau [Tue, 10 Jan 2012 12:51:52 +0000 (20:51 +0800)]
i386: LINE interrupt -> LEGACY interrupt

2 years agox86_64: LINE interrupt -> LEGACY interrupt
Sepherosa Ziehau [Tue, 10 Jan 2012 11:36:06 +0000 (19:36 +0800)]
x86_64: LINE interrupt -> LEGACY interrupt