Joe Talbott [Fri, 4 Mar 2011 23:09:22 +0000 (18:09 -0500)]
Merge branch 'master' of git://crater.dragonflybsd.org/dragonfly
Sascha Wildner [Fri, 4 Mar 2011 21:52:14 +0000 (22:52 +0100)]
ie(4): Fix a gcc44 warning.
Venkatesh Srinivas [Fri, 4 Mar 2011 14:40:39 +0000 (06:40 -0800)]
kernel -- vm_object locking Part 2: Lockup a few vm_object users.
Sascha Wildner [Fri, 4 Mar 2011 13:16:52 +0000 (14:16 +0100)]
UPGRADING: Fix typo.
Sascha Wildner [Fri, 4 Mar 2011 11:19:25 +0000 (12:19 +0100)]
At long last, switch us to using GCC 4.4 as the default compiler.
[I've put some notes into UPGRADING which I quote here.]
That means that any settings that set CCVER to 'gcc44' are not needed
anymore. Instead, CCVER can be set to 'gcc41' to go back to using
GCC 4.1.
The NO_GCC44 options has been removed and will not affect the build
anymore. There is now a NO_GCC41 option that will prevent GCC 4.1 from
building in a similar fashion.
Also, we recommend to do a full buildworld/buildkernel for upgrading.
Thanks-to: sephe, Max Herrgard and everybody else who helped with
testing and fixing.
Venkatesh Srinivas [Fri, 4 Mar 2011 07:07:47 +0000 (23:07 -0800)]
kernel -- vm_object locking Part 1: Primitives
* Create per-vm_object 'hold count'; the hold count ensures that a
vm_object is not deallocated or collapsed till it transitions 1->0.
Hold count is waited for in vm_object_terminate and _collapse.
* Convert vm_object_lock/_unlock to use pool tokens; pool tokens do not
share storage with the vm_object, simplifying lifetime.
Cleanups:
* Remove first attempts at vm_object locking; it just wasn't clear
what each token was protecting earlier.
* Eliminate vestigial fields from vm_object structure.
* Clean vm_object_pip_wakeup (just call _wakeupn)
* Remove vm_page_(un)lock for now
Discussed-with: dillon@
Venkatesh Srinivas [Fri, 4 Mar 2011 06:55:11 +0000 (22:55 -0800)]
kernel -- POSIX Message Queues: Remove objcache for MQ messages.
The MQ code was using objcache for messages upto the default max size;
objcache was not really useful over kmalloc here, however. The messages did
not have any constructed object state to store and using kmalloc leads to using
appropriately sized message buffers each time.
Venkatesh Srinivas [Fri, 4 Mar 2011 03:27:21 +0000 (19:27 -0800)]
kernel -- Prevent POSIX MQ from overflowing malloc zones.
Sascha Wildner [Thu, 3 Mar 2011 22:15:59 +0000 (23:15 +0100)]
UPDATING: Use '-' instead of '=' for underlining to avoid git confusion.
Sascha Wildner [Thu, 3 Mar 2011 21:27:43 +0000 (22:27 +0100)]
<float.h>: Use compiler builtins for some constants, if they are available.
I've left the original values in as fallbacks, should any compiler have
no builtins. But they are no longer used for the GCCs with this commit.
Sascha Wildner [Thu, 3 Mar 2011 21:27:03 +0000 (22:27 +0100)]
groff: Fix a gcc44 warning.
Sascha Wildner [Thu, 3 Mar 2011 18:42:25 +0000 (19:42 +0100)]
csh(1): Remove redundant check (silences gcc44 warning).
Sascha Wildner [Thu, 3 Mar 2011 16:59:42 +0000 (17:59 +0100)]
Fix buildworld (netstat(1)).
Taken-from: FreeBSD
Sepherosa Ziehau [Thu, 3 Mar 2011 14:14:40 +0000 (22:14 +0800)]
mptable: Assign index for each IOAPIC
IOAPIC information is saved into list ordered by ascending order
of IOAPIC's APIC ID and each IOAPIC is assigned an index according
to the order.
In this way we could use IOAPIC information extracted from ACPI
MADT and MPTABLE in the same fashion when routing PCI interrupts,
i.e. using index instead of APIC ID. It has been observed that on
some machines, the APIC ID of IOAPIC in ACPI MADT is different from
the one in MPTABLE, but the order (index) is same.
PCI interrupt routing information now saves IOAPIC's index instead
of IOAPIC's APIC ID.
Sascha Wildner [Thu, 3 Mar 2011 13:43:43 +0000 (14:43 +0100)]
growfs(8): Silence a gcc44 warning.
Sepherosa Ziehau [Thu, 3 Mar 2011 11:24:26 +0000 (19:24 +0800)]
mptable: Simplify bus id duplication check logic
Peter Avalos [Thu, 3 Mar 2011 10:49:52 +0000 (00:49 -1000)]
Update queue(3) for the REMOVE_NEXT -> REMOVE_AFTER rename.
While I'm here, sync with FreeBSD:
-Remove extra note about O(n) removal.
Obtained-from: FreeBSD
Peter Avalos [Thu, 3 Mar 2011 10:31:36 +0000 (00:31 -1000)]
Fix forgotten _REMOVE_NEXT -> _REMOVE_AFTER rename.
Sascha Wildner [Thu, 3 Mar 2011 09:48:44 +0000 (10:48 +0100)]
atmarpd(8) & scspd(8): Silence some gcc44 warnings.
Sascha Wildner [Thu, 3 Mar 2011 09:40:41 +0000 (10:40 +0100)]
ppp(8): Silence some gcc44 warnings.
Sascha Wildner [Thu, 3 Mar 2011 09:28:01 +0000 (10:28 +0100)]
spppcontrol(8): Silence some gcc44 warnings.
Sascha Wildner [Thu, 3 Mar 2011 09:13:11 +0000 (10:13 +0100)]
window(1): Fix a gcc44 warning.
While here, remove an unused file which I missed when I upgraded it to
NetBSD's.
Peter Avalos [Thu, 3 Mar 2011 08:09:06 +0000 (22:09 -1000)]
<sys/queue.h>: Sync with FreeBSD
-Add _SWAP macros.
-Avoid corrupting the list or queue if _REMOVE is invoked with a
reference to the head and QUEUE_MACRO_DEBUG is defined.
-Rename _REMOVE_NEXT to _REMOVE_AFTER since the name matches the _INSERT
macros.
Obtained-from: FreeBSD
Peter Avalos [Thu, 3 Mar 2011 05:34:00 +0000 (19:34 -1000)]
Remove insque()/remque() from kernel code.
This transitions everything over to using the appropriate macros from
<sys/queue.h>.
Peter Avalos [Thu, 3 Mar 2011 03:48:17 +0000 (17:48 -1000)]
IPX/SPX: Remove unused code.
Joe Talbott [Wed, 2 Mar 2011 23:20:24 +0000 (18:20 -0500)]
Merge branch 'master' of git://crater.dragonflybsd.org/dragonfly
Sascha Wildner [Wed, 2 Mar 2011 22:34:42 +0000 (23:34 +0100)]
kernel: Fix the remaining gcc44 warnings for the kernel.
Sascha Wildner [Wed, 2 Mar 2011 19:50:11 +0000 (20:50 +0100)]
aicasm: Add two YY_NO_INPUTs (silences gcc44 warnings).
Sepherosa Ziehau [Wed, 2 Mar 2011 13:11:29 +0000 (21:11 +0800)]
gcc44: Don't emit warning about inline failure due to optimization
gcc44 tries to guess the hotness of the code path and refuses to inline
functions on cold code path even if the function has __inline attribute.
The warning caused by this kind of inline failure is extremely annoying
and it actually has nothing to do with possible software bugs.
Matthew Dillon [Tue, 1 Mar 2011 23:52:19 +0000 (15:52 -0800)]
kernel - Refactor dsched ref/unref routines
* Refactor the dsched ref/unref routines to handle 1->0 transitions
atomically and to properly deal with 1->0 races related to any
re-referencing of the structure which can occur concurrently.
Such races can occur because the structure must acquire other locks
while removing itself from the various lists it is on and thus can
be accessed via those lists in the mean time.
Instead of using -0x400 as a separate atomic op after a 1->0 transition
we directly transition from 1 to 0x80000000, removing a race condition.
This also allows temporary references to be made during destruction.
* Get a temporary ref and re-check flag state after acquiring a lock to
determine if the structure in question is still on the list we are trying
to remove it from.
Matthew Dillon [Tue, 1 Mar 2011 22:47:38 +0000 (14:47 -0800)]
kernel - Use do/while sequences to protect multi-line dsched macros
* Use do/while sequences to protect multi-line dsched macros in case
they are used in statement sequences without braces, as in
'if (fubar) dsched_macro;', or similar circumstances.
Sascha Wildner [Tue, 1 Mar 2011 19:58:44 +0000 (20:58 +0100)]
libstand/printf.c: Oops, fix a braino.
Sascha Wildner [Tue, 1 Mar 2011 19:54:41 +0000 (20:54 +0100)]
libstand: Sync libstand's printf() with FreeBSD.
The main change is to add various missing conversions, such as %ll, %j, %q,
%z, %X, %h, %hh etc.
Sepherosa Ziehau [Tue, 1 Mar 2011 15:39:08 +0000 (23:39 +0800)]
kern.mk: Prevent gcc4.4 from generating SSSE3, SSE4 and AVX instructions
Sepherosa Ziehau [Tue, 1 Mar 2011 14:44:16 +0000 (22:44 +0800)]
kernel: Don't store FPU status into the reserved area of fxsave
Since each time before the old sv_ex_sw is accessed, fnstsw() is
always called, it no longer makes any sense to save the temporary
in the reserved area for fxsave. And more important: saving the
FPU status into fxsave area overwrites saved xmm register value.
Sascha Wildner [Tue, 1 Mar 2011 12:17:26 +0000 (13:17 +0100)]
ps(1): Use alias syntax for the 'comm' alias.
Matthew Dillon [Mon, 28 Feb 2011 17:47:56 +0000 (09:47 -0800)]
kernel - Major bridging functionality added (bug fixes)
* The root bridge was not taking into account the peer's weightings when
calculating path costs.
In order to do this the root bridge must use available peer info. The
peer info should already include both the local and remote's path costs
since 'we' are the root, so our path cost will already be directly
incorporated in the path cost the peer reports to us.
* Fixes issue where not-weighted path costs on root bridge were not
synchronized with the weighted path costs of one or more of its peers.
Sascha Wildner [Mon, 28 Feb 2011 16:45:15 +0000 (17:45 +0100)]
Use g++ 4.4 from base for CCVER=gcc46.
Sascha Wildner [Mon, 28 Feb 2011 16:44:04 +0000 (17:44 +0100)]
Add 'pcc' as a CCVER value (using /usr/pkgsrc/lang/pcc-current).
It doesn't compile a full world or kernel yet but is quite fast and
a lot of our stuff builds with it (bin/, games/, secure/, most of
sbin/ and usr.bin/ and probably more).
If anyone wants to look at the remaining issues, be our guest.
Joe Talbott [Mon, 28 Feb 2011 16:18:02 +0000 (11:18 -0500)]
Merge branch 'master' of git://crater.dragonflybsd.org/dragonfly
Sascha Wildner [Sun, 27 Feb 2011 19:21:28 +0000 (20:21 +0100)]
kernel: Use the system's offsetof() macro instead of cooking our own.
While here, #undef ROUNDUP again after usage.
Sascha Wildner [Sun, 27 Feb 2011 18:25:38 +0000 (19:25 +0100)]
gnu/lib/csu: Add -fno-asynchronous-unwind-tables to the CFLAGS.
Quoth FreeBSD's commit msg:
Often reported issue with newer ld is:
error in /usr/lib/crtendS.o(.eh_frame); no .eh_frame_hdr table will
be created.
The issue is that crtend is compiled with unwind table, and also it
places the special CIE into the .eh_frame indicating the end of
section, that is located before generated unwind table. New ld has
assertion that verifies that closing CIE is indeed the last CIE,
causing the crypting message to be issued, and refusing to generate
dwarf unwind.
Add -fno-asynchronous-unwind-tables to disable unwind table generation
for crtbegin/crtend.
Taken-from: FreeBSD
Sascha Wildner [Sun, 27 Feb 2011 15:22:35 +0000 (16:22 +0100)]
kernel: Remove some variables that are set but not used.
Sepherosa Ziehau [Sun, 27 Feb 2011 14:31:57 +0000 (22:31 +0800)]
lib/csu: Fix typo
Sascha Wildner [Sun, 27 Feb 2011 11:56:52 +0000 (12:56 +0100)]
lib/csu: Remove a redundant -Wall in the Makefile.
Sascha Wildner [Sun, 27 Feb 2011 01:09:54 +0000 (02:09 +0100)]
kernel: Comment out some unused functions.
Sascha Wildner [Sun, 27 Feb 2011 01:06:32 +0000 (02:06 +0100)]
mly(4): Put mly_timeout() under MLY_DEBUG where it belongs.
Matthew Dillon [Sat, 26 Feb 2011 17:32:40 +0000 (09:32 -0800)]
kernel - Fix incorrect inode wait code in HAMMER
* Fix incorrect code t wait for an inode flush to finish. This should also
fix the reported assertion.
Any bugs in this new code would likely result in process stalls instead
of panics, so watch for that possibility.
Reported-by: Venkatesh Srinivas <vsrinivas@dragonflybsd.org>,
Peter Avalos <peter@theshell.com>
Sascha Wildner [Sat, 26 Feb 2011 09:29:13 +0000 (10:29 +0100)]
librt: Fix buildworld by putting some unused variables in #if 0.
While here, use #if 0 for #ifdef notyet in the committed part, too.
Sascha Wildner [Sat, 26 Feb 2011 08:30:01 +0000 (09:30 +0100)]
ifconfig(8): Change constructor priorities from 100 to 101.
This silences some gcc44 warnings.
Constructor priorities are bounded between 101 and 65535 inclusive.
0 to 100 are reserved for the implementation.
See also:
http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html
http://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Attributes.html
Sascha Wildner [Sat, 26 Feb 2011 08:14:54 +0000 (09:14 +0100)]
Add YY_NO_INPUT to a number of lex(1) input files (silences gcc44 warnings).
Venkatesh Srinivas [Sat, 26 Feb 2011 03:40:31 +0000 (19:40 -0800)]
librt -- AIO: Implement SIGEV_THREAD for AIO completion notification.
SIGEV_THREAD launches a libthread thread in response to I/O completion.
We link librt against libthread to allow access to the pthread_*
routines.
Sascha Wildner [Fri, 25 Feb 2011 19:51:36 +0000 (20:51 +0100)]
libevtr: Add YY_NO_INPUT to ktrfmt.l and regenerate (silences gcc44 warning).
Sascha Wildner [Fri, 25 Feb 2011 17:20:18 +0000 (18:20 +0100)]
Add 'gcc46' as a CCVER value (using /usr/pkgsrc/lang/gnat-aux).
So far I've tested building and running our kernel (which both works).
World hasn't been tested and would fail using default values, since
gnat-aux so far only supports C and Ada.
Many thanks to John Marino <john@marino.st> who did and maintains the
lang/gnat-aux package.
Sepherosa Ziehau [Fri, 25 Feb 2011 03:36:57 +0000 (11:36 +0800)]
gcc44: Make i486 the default arch
Sepherosa Ziehau [Thu, 24 Feb 2011 09:15:19 +0000 (17:15 +0800)]
mk: Rearrange bsd.cpu.gcc44.mk
- Don't always set -march=xxx
- Support CPUTYPE=native
- Support several new -march argument, e.g. barcelona
- Split CPUTYPE adjustment into compat CPUTYPE adjustment and
CPUTYPE alias adjustment
Sepherosa Ziehau [Thu, 24 Feb 2011 06:13:24 +0000 (14:13 +0800)]
mk: Add FORCE_CPUTYPE which overrides user's CPUTYPE or forcefully sets CPUTYPE
Sascha Wildner [Fri, 25 Feb 2011 11:37:04 +0000 (12:37 +0100)]
Remove an old header via 'make upgrade'.
Matthew Dillon [Thu, 24 Feb 2011 22:16:52 +0000 (14:16 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Thu, 24 Feb 2011 22:14:42 +0000 (14:14 -0800)]
kernel - Major bridging functionality added (bonding)
* Add channel bonding support to if_bridge. This utilizes the link2 flag
on the bridge interface. Participating member interfaces must be
programmed to the same MAC address. Multiple bonding groups can be
created.
Note that both sides of participating member interfaces must implement
the link2 feature. If the other side does not it will likely be blocking
(due to the spanning tree protocol) some of the member interfaces and
you will get packet loss.
* Document all the link flags and new features.
Sascha Wildner [Thu, 24 Feb 2011 18:19:34 +0000 (19:19 +0100)]
Remove the meteor(4) driver.
It stopped building when -msoft-float was added to the options for building
the kernel.
FreeBSD removed it over 7 years ago, and so far I've heard of no one using
DragonFly because he had one of those old cards and we still had a driver,
so I guess it's safe to follow suit.
However, the <dev/video/meteor/ioctl_meteor.h> header is used by other,
working drivers (bktr(4) and cxm(4)) so we keep it. We also keep the
/usr/share/examples/meteor directory because the bktr(4) driver is based
on meteor(4) and bktr(4)'s manual page references these examples as being
mostly valid for bktr(4), too.
Antonio Huete Jimenez [Thu, 24 Feb 2011 10:58:36 +0000 (11:58 +0100)]
procfs - Fix open() for procfs.
* PFIND() macro has been replaced with function pfs_pfind()
which will hold a reference to the found proc via pfind()
or on proc0 in the case no process is found.
* Fix a case where there was no PRELE() after a pfind()
Matthew Dillon [Thu, 24 Feb 2011 08:28:23 +0000 (00:28 -0800)]
kernel - Major bridging functionality completed
* Rewrite the spanning tree algorithm. Not well tested but both sides
properly calculate the blocking pairs for the ports whereas before
they did not.
Document the code as needed. The poor documentation created a lot of
unnecessary headaches.
Separate out the peer state from the aggregated state.
* Greatly enhance the 'ifconfig [-v] bridgeN' status output so one
can see exactly what the state of the sub-interfaces is.
* The bridge interface's ether address can now be modified. It is also
possible to add IP addresses to the bridge interface but this has
not been tested well and might not work.
* Nearly all traffic sourced from interfaces attached to the bridge
now use the bridge's MAC address. This includes ARP. Theoretically
this means that ganged links between bridges (bonding is NOT yet
supported! Strictly master/backup)... should be able to failover
without destroying the ARP tables on various systems.
* Add an experimental LINK2 option to the bridge. This will eventually
be channel bonding but doesn't work so hot right now. At the moment
it just round-robins output on sub-interfaces with the same MAC (usually
TAP interfaces). Ill gets aggregated using the bridge's MAC but the
comparison is used to create bonding groups.
This one needs considerably more work on properly adjusting its state
to DESIGNATED instead of hacking packets over members in the BLOCKING
state.
* Clean up some of the state transitions used by the LINK1 failover
feature.
* Change the bridge interface to IFT_ETHER to allow IP and MAC assignments
and for it to be properly handled in the rest of the stack.
* Aggregate input from all member interfaces into the bridge proper and
re-output/forward/route as appropriate using the stateful information
available in the bif lists to handle failover and other features.
* ARP handles MAC snafus due to bridging a little better.
* Changeover to TAILQs from LISTs for bifs.
* Move bif_flags to the bif_info structure so we can use it to hold
active state.
* Implement SIOCGIFMEDIA in IF_TAP (still needs some work). This
is required by the bridge code to properly be able to use TAP
interfaces as members.
Sascha Wildner [Thu, 24 Feb 2011 08:35:33 +0000 (09:35 +0100)]
LINT: Comment out meteor(4) for now (it doesn't build with -msoft-float).
Matthew Dillon [Thu, 24 Feb 2011 04:59:59 +0000 (20:59 -0800)]
kernel - Fix serious bug w/non-blocking commit
* NDELAY isn't supposed to make HAMMER do non-block disk I/O,
NRDELAY is the only one that does that.
* Fixes tons and tons of confusion (named, vi, tons of other
programs that open regular files O_NONBLOCK).
Requested-by: Venkatesh Srinivas <me@endeavour.zapto.org>
Peter Avalos [Thu, 24 Feb 2011 02:37:27 +0000 (16:37 -1000)]
Fix typo in last commit.
Requested-by: Venkatesh Srinivas <me@endeavour.zapto.org>
Venkatesh Srinivas [Wed, 23 Feb 2011 15:12:20 +0000 (07:12 -0800)]
kernel -- Add O_FRNONBLOCKING, to allow reads which do not block on disk accesses.
Using extpread() or extpreadv() with O_FRNONBLOCKING on HAMMER file systems now allows
reads to return EWOULDBLOCK when the requested data is not in the buffer cache.
Sascha Wildner [Wed, 23 Feb 2011 14:40:37 +0000 (15:40 +0100)]
my(4): Add a missing '=' (although in an #if 0'd section).
Matthew Dillon [Wed, 23 Feb 2011 04:56:42 +0000 (20:56 -0800)]
kernel - Greatly enhance if_bridge
* Document the link0 feature, which enables transparent bridging.
* Implement the link1 feature, automatic failover using a slight mangling
of the 802.11d protocol. Both ends must implement the feature for this
to work. Essentially this causes CFG 802.11d messages to be generated
on the hello interval even if a bridge is not the root bridge.
The bridge also monitors for this traffic and places the link in a special
L1BLOCKING state if it fails to receive any frames in (10 x hello) (around
20 seconds usually). This will automatically cause the bridge to failover
to other links.
This only operates on links participating in the STP protocol (see man
ifconfig), when link1 is set on the bridge interface. For ethernet
bridging the link interfaces are typically multiple TAP interfaces.
* Allow all link interfaces participating in a bridge to have the same
MAC address (used with TAP interfaces typically). This is mandatory
if you also intend to use the link1 feature and want your failover to
be reasonably smooth. The feature can be useful regardless.
* The ifconfig bridge output now shows additional information about
link state and who it thinks the root node is.
Sascha Wildner [Tue, 22 Feb 2011 17:31:49 +0000 (18:31 +0100)]
rtld(1), headers, manual pages: Bring in some whitespace, comment etc. fixes.
These are all non-functional changes that reduce diffs to FreeBSD.
Submitted-by: John Marino <john@marino.st>
Taken-from: FreeBSD
Sascha Wildner [Tue, 22 Feb 2011 17:31:08 +0000 (18:31 +0100)]
<sys/link_elf.h>: Fix include guard.
Submitted-by: John Marino <john@marino.st>
Taken-from: FreeBSD
Matthew Dillon [Tue, 22 Feb 2011 16:54:48 +0000 (08:54 -0800)]
kernel - Unconditionally clear BRIDGE_MBUF_TAGGED in two cases
* First unconditionally clear BRIDGE_MBUF_TAGGED if the target MAC
in the link header points to us, regardless of what we do with the
packet.
* Second, unconditionally clear BRIDGE_MBUF_TAGGED if IPFW2 redirects
the packet destination, bad things will happen if the original source
MAC is kept in the link header. i.e. the packet becomes routed at
that point.
Sepherosa Ziehau [Tue, 22 Feb 2011 14:24:01 +0000 (22:24 +0800)]
kernel/i386: Add -msoft-float to CFLAGS
Sepherosa Ziehau [Tue, 22 Feb 2011 12:03:40 +0000 (20:03 +0800)]
libstand: Make sure that -march=i386 is specified
This unbreaks the loader compiled by gcc44
Sepherosa Ziehau [Tue, 22 Feb 2011 12:03:11 +0000 (20:03 +0800)]
dloader: Make sure that -march=i386 is specified
Venkatesh Srinivas [Tue, 22 Feb 2011 11:35:54 +0000 (03:35 -0800)]
Merge branch 'master' of /repository/git/dragonfly
Sepherosa Ziehau [Tue, 22 Feb 2011 10:59:14 +0000 (18:59 +0800)]
mptable: Implement stub I/O APIC enumerator
Matthew Dillon [Tue, 22 Feb 2011 00:02:30 +0000 (16:02 -0800)]
kernel - More if_bridge work + misc fixes
* When bridging packets sent from one of our own MACs we always override
the ether_shost in the output packet so it comes from the actual
interface the packet is being sent out on.
* LINK0 will still nominally keep the ether_shost intact when forwarding
across a bridge, except in the above case. That is, any foreign MAC
set as the source coming in on one interface will be retained as the
source when being thrown out on another interface. But any local MAC
will be replaced with the MAC of the outgoing interface.
* When receiving a unicast frame on one interface which is targetted to
another interface, retain the original rcvif for any vlan or arp
processing. Otherwise (for example) if this were an ARP reply the ARP
code would associate the reply with the wrong interface. We would want
the ARP entry to be associated with the first interface, not the second,
because the first interface is the one the reply actually came in on.
* Adjust the ARP code in if_ether.c to use rcvif and not ifp, and don't
log if non-matching interfaces are part of the same bridge (unless
log_arp_wrong_iface is set to 2).
* Augment the ether_reinput_cpu() API to pass additional flags in,
allowing the caller to specify that m->m_pkthdr.rcvif not be
overwritten. Used to support the above features.
* Clear M_HASH in a few more cases in pf.c
Venkatesh Srinivas [Mon, 21 Feb 2011 23:07:16 +0000 (15:07 -0800)]
Add definitions for SIGEV_THREAD.
Sascha Wildner [Mon, 21 Feb 2011 20:47:42 +0000 (21:47 +0100)]
rtld.1: Staticize the variable in the _rtld_functrace example.
Pointed-out-by: corecode
Sascha Wildner [Mon, 21 Feb 2011 20:38:54 +0000 (21:38 +0100)]
rtld.1: Add an example on how to set up _rtld_functrace.
While here, put the function's prototype into the SYNOPSIS and add a
_rtld_functrace(3) MLINK.
Sepherosa Ziehau [Mon, 21 Feb 2011 05:42:28 +0000 (13:42 +0800)]
tcp: Allow listen(2) to be called on the same socket for any number of times
DragonFly-bug: http://bugs.dragonflybsd.org/issue1993
Matthew Dillon [Mon, 21 Feb 2011 03:36:00 +0000 (19:36 -0800)]
Merge branch 'master' of ssh://crater.dragonflybsd.org/repository/git/dragonfly
Matthew Dillon [Mon, 21 Feb 2011 03:35:12 +0000 (19:35 -0800)]
kernel - Fix extra rel_mplock() in if_tap
* Fix crash/panic when running openvpn w/if_tap due to dangling
rel_mplock().
Sepherosa Ziehau [Mon, 21 Feb 2011 02:52:20 +0000 (10:52 +0800)]
inpcb: Exclusive the usage of wildcard hash and connect hash
DragonFly-bug: http://bugs.dragonflybsd.org/issue1993
Matthew Dillon [Mon, 21 Feb 2011 02:26:17 +0000 (18:26 -0800)]
HAMMER - Fix long stalls when writing out core files
* Fix a long-stall case (hmrwww) due to a broken pipelining algorithm when
using large write()s to write out large files.
Peter Avalos [Sun, 20 Feb 2011 22:14:03 +0000 (12:14 -1000)]
newsyslog: Sync with FreeBSD.
-Don't consider non-existence of a PID file an error.
-Add -P flag which prevents further action if the pidfile is empty or
doesn't exist.
-Add a -S switch to override the default syslog pid file.
-Add support for creating the archived log filenames using a time-stamp
instead of the traditional simple counter.
-Add xz(1) support.
-Rewrite and simplify logfile compression code.
-Convert newsyslog to using queue(3) macros.
-Add file include processing.
Obtained-from: FreeBSD
Peter Avalos [Sun, 20 Feb 2011 21:33:23 +0000 (11:33 -1000)]
Sync /bin/sh regression tests with FreeBSD.
-Add some tests for omitting whitespace.
-Split off some special behaviour into separate tests.
-Do not use "local" in the test runner.
-Make execution/fork1.0 work even if the basename of ${SH} is not "sh".
-Test that the read builtin passes through all byte values except NUL,
newline and backslash.
-Unset some locale vars in two tests that may cause them to break.
Obtained-from: FreeBSD
Sascha Wildner [Sun, 20 Feb 2011 12:22:08 +0000 (13:22 +0100)]
<sys/elf_generic.h>: Fix typo in a #warning.
Sascha Wildner [Sun, 20 Feb 2011 09:36:45 +0000 (10:36 +0100)]
Remove some kref(9) related files via 'make upgrade'.
Sascha Wildner [Sun, 20 Feb 2011 02:02:42 +0000 (03:02 +0100)]
LINT: Fix wording and remove a duplicate option from the comments.
Matthew Dillon [Sat, 19 Feb 2011 22:04:42 +0000 (14:04 -0800)]
kernel - Clear BRIDGE_MBUF_TAGGED for NAT translations
* Clear the new BRIDGE_MBUF_TAGGED flag when a NAT or other translation
changes the source IP for a packet, otherwise packets traversing a bridged
interface may wind up with a source MAC that has nothing to do with
the translated source IP.
Matthew Dillon [Sat, 19 Feb 2011 20:57:56 +0000 (12:57 -0800)]
kernel - Add a transparent MAC bridging feature to if_bridge
* Defaults to non-transparent (historical) operation, which is safer.
Set link0 to use in transparent MAC mode.
* Transparent MAC mode will attempt to retain the MAC source in the
link address header when retransmitting a packet on a different
interface.
Only IP/IPV6 packets will retain the MAC. ARP and other ether types
will get the outgoing interface's MAC address, which is usually
desireable.
* Note that transparent MAC mode is a bit dangerous, which is why it
isn't turned on by default. If a packet with the originating MAC
winds up being sent out the same interface it came in on with the
MAC intact, any switches between the two boxes will suddenly think
the originating machine is somewhere else and will get confused.
The code tries to avoid this situation.
Bridging loops can also cause this sort of behavior even with the spanning
tree protocol. link0 is not recommended if you have loops.
* Coded because I needed this for braindead at&t uverse routers which
do MAC-based security and only allow one IP association for each MAC,
and whos firewalls cannot be completely disabled, and which cannot deal
with IPs on routed networks (it expects everything to be directly connected
on a switched network. sigh).
Matthew Dillon [Sat, 19 Feb 2011 09:02:26 +0000 (01:02 -0800)]
kernel - Fix minor mistake corrupting an allocation in recent MPTable work
* Fix an allocation which was too small (sizeof pointer vs structure),
which fixes an early-boot panic.
Reported-by: Peter Avalos <peter@theshell.com>
Matthew Dillon [Sat, 19 Feb 2011 04:49:20 +0000 (20:49 -0800)]
kernel - Fix fairq, PF table hash was not being initialized
* fairq depends on the PF table entry hash, which was not being
initialized.
* Fixes problems with fairq not queueing fairly.
Matthew Dillon [Sat, 19 Feb 2011 04:44:03 +0000 (20:44 -0800)]
kernel - Allow rn_inithead() to be called early
* Allow rn_inithead() to be called earlier than rn_init(). rn_init() is
called very late and was responsible for creating the all-ones and
all-zeros keys. It also required the proto domains to be initialized(?).
* A PF module preload was calling rn_inithead() before the all-ones and
all-zeros keys could be allocated, resulting in a crash.
Antonio Huete Jimenez [Fri, 18 Feb 2011 09:05:41 +0000 (10:05 +0100)]
vkernel64 - Enable function name resolution in DDB.
Sepherosa Ziehau [Fri, 18 Feb 2011 07:54:17 +0000 (15:54 +0800)]
mptable: Save PCI interrupt pin to I/O APIC pin maps
Peter Avalos [Fri, 18 Feb 2011 01:23:49 +0000 (15:23 -1000)]
ps: Update man page for adding comm as an alias for ucomm.
Peter Avalos [Sun, 13 Feb 2011 22:00:12 +0000 (12:00 -1000)]
ps: Add the comm keyword which is an alias for ucomm.
While I'm here, don't pad the output of ucomm if it's the last column.