Since r186119 IP6 input counters for octets and packets were not
working anymore. In addition more checks and operations were missing.
In case lla_lookup results in a match, get the ifaddr to update the
statistics counters, and check that the address is neither tentative,
duplicate or otherwise invalid before accepting the packet. If ok,
record the address information in the mbuf. [ as is done in case
lla_lookup does not return a result and we go through the FIB ].
Document the mandatory argument to the arptimer() and
nd6_llinfo_timer() functions with a KASSERT().
Note: there is no need to return after panic.
In the legacy IP case, only assign the arg after the check,
in the IPv6 case, remove the extra checks for the table and
interface as they have to be there unless we freed and forgot
to cancel the timer. It doesn't matter anyway as we would
panic on the NULL pointer deref immediately and the bug is
elsewhere.
This unifies the code of both address families to some extend.
brian [Fri, 6 Aug 2010 08:17:44 +0000 (08:17 +0000)]
MFC r209756:
Log dhclient's reason for exiting and change the 10 second
ignore-routing-messages dhclient-script timeout to be effective
from script completion rather than from script start time.
Ignore RTM_DELADDR and RTM_NEWADDR messages when the message
contains no interface address (which should not happen) rather than
exiting.
jhb [Thu, 5 Aug 2010 22:01:14 +0000 (22:01 +0000)]
MFC 210623:
Mark the __curthread() functions as __pure2 and remove the volatile keyword
from the inline assembly. This allows the compiler to cache invocations of
curthread since it's value does not change within a thread context.
jhb [Thu, 5 Aug 2010 20:39:52 +0000 (20:39 +0000)]
MFC 210505:
- Change the warning about PCI-e links narrower than x8 to only apply to
10G cards. 1G cards are x4 only.
- Use constants from pcireg.h for reading the current link width.
- Use pci_set_max_read_req() rather than implementing it by hand.
jhb [Thu, 5 Aug 2010 19:40:48 +0000 (19:40 +0000)]
MFC 210136:
Retire the NFS access cache timestamp structure. It was used in VOP_OPEN()
to avoid sending multiple ACCESS/GETATTR RPCs during a single open()
between VOP_LOOKUP() and VOP_OPEN(). Now we always send the RPC in
VOP_LOOKUP() and not VOP_OPEN() in the cases that multiple RPCs could be
sent.
To preserve the ABI I have left the structure in place, but renamed it
to 'n_unused' and just removed the code that updates it.
jhb [Thu, 5 Aug 2010 19:11:13 +0000 (19:11 +0000)]
MFC 210135:
Move attribute cache flushes from VOP_OPEN() to VOP_LOOKUP() to provide
more graceful recovery for stale filehandles and eliminate the need for
conditionally clearing the attribute cache in the !NMODIFIED case in
VOP_OPEN().
delphij [Wed, 4 Aug 2010 01:36:48 +0000 (01:36 +0000)]
MFC r210358:
Apply vendor version 1.20.00.17.
This version adds support for ARC1880; additionally this version fixed
an issue where all devices on a SAS port gets offlined when any device
failed on the port [1].
Many thanks to Areca for continuing to support FreeBSD.
rmacklem [Mon, 2 Aug 2010 23:57:50 +0000 (23:57 +0000)]
MFC: r210268
For the experimental NFSv4 server's dumplocks operation, add the
MPSAFE flag to cn_flags so that it doesn't panic. The panics weren't
seen since nfsdumpstate(8) is broken for the "-l" case, so this
was never done. I'll do a separate commit to fix nfsdumpstate(8).
gnn [Mon, 2 Aug 2010 19:56:07 +0000 (19:56 +0000)]
MFC: 210428
Fix a bug in the statistics code for tracking the head and
tail pointers of the tx and rx queues. We needed a SYSCTL_PROC
to correctly get the values at run time.
Submitted by: Andrew Boyer aboyer at averesystems.com
In reallocf(3), free the memory only when size != 0. Otherwise, when the
System V compatibility option (malloc "V" flag) is in effect a zero sized
reallocf() could cause a double free.
- Don't assign the return value from read(2) to a variable of type
int.
- Use errx(3) instead of err(3) to print the error message on short
reads in readlabel(). errno won't be set on short reads which can
easily occur here due to the fixed size read request.
rmacklem [Mon, 2 Aug 2010 00:37:33 +0000 (00:37 +0000)]
MFC: r210227
Add a call to nfscl_mustflush() in nfs_close() of the experimental
NFSv4 client, so that attributes are not acquired from the server
when a delegation for the file is held. This can reduce the number
of Getattr Ops significantly.
rmacklem [Sun, 1 Aug 2010 23:58:26 +0000 (23:58 +0000)]
MFC: r210201
Change the nfscl_mustflush() function in the experimental NFSv4
client to return a boolean_t in order to make it more compatible
with style(9).
rmacklem [Sun, 1 Aug 2010 23:36:39 +0000 (23:36 +0000)]
MFC: r210178
Patch the experimental NFSv4 server so that it acquires a reference
count on nfsv4rootfs_lock when dumping state, since these functions
are not called by nfsd threads. Without this reference count, it
is possible for an nfsd thread to acquire an exclusive lock on
nfsv4rootfs_lock while the dump is in progress and then change the
lists, potentially causing a crash.
rmacklem [Sun, 1 Aug 2010 15:34:29 +0000 (15:34 +0000)]
MFC: r210102
This patch fixes a bug in the experimental NFSv4 server where it
released a reference count on nfsv4rootfs_lock erroneously when
administrative revocation of state was done.
bcr [Sun, 1 Aug 2010 11:12:42 +0000 (11:12 +0000)]
MFC r210482:
Add an example to encourage people to have a look at either
make(1) or /usr/ports/ports-mgmt/portconf for port-specific
variables/options to compile a port.
PR: docs/145655
Submitted by: Armin Pirkovitsch (armin at frozen dash zone dot org)
Discussed with: dougb
edwin [Sun, 1 Aug 2010 09:08:33 +0000 (09:08 +0000)]
MFC of 210718, tzdata2010k:
- Daylight Saving Time will not be used in Egypt during Ramadan.
- Proper names for Pacific/Pohnpei and Pacific/Chuuk
- Fix historical information for Finland for 1981 and 1982
- No leap-second for December 2010.
- Fix historical information for Ontario (Canada)
rmacklem [Sun, 1 Aug 2010 02:11:12 +0000 (02:11 +0000)]
MFC: r210034
For the experimental NFSv4 client, make sure that attributes that
predate the issue of a delegation are not cached once the delegation
is held. This is necessary, since cached attributes remain valid
while the delegation is held.
MFC r210114:
Handle RUN->ASSOC->RUN transition correctly, as in not trigger a
firmware error. Convert if statements to a switch statement while
I'm here.
MFC r210209:
- Add new IDs for 6000 series devices.
- The 6000 series WiMAX devices need a separate firmware.
- The b-gen devices are not hooked because the hardware revision type
is not know.
Fix deadlock between GEOM class unloading and withering. Withering can't
proceed while g_unload_class() blocks the event thread. Fix this by not
running g_unload_class() as a GEOM event and dropping the topology lock
when withering needs to proceed.
- Use errx(3) instead of err(3) when checking if snprintf(3) succeeded.
snprintf(3) doesn't set errno in the tested cases.
- If the same argument reference (for example %1) was specified more than
once, the command didn't necessarily fit to the final command buffer. Fix
this using a dynamic sbuf buffer. Add a few regression tests for the case.
MFC r210408:
Document that SI unit suffixes are supported for -b and -s options
of add verb. Mention about maximum size limit for "freebsd-boot"
partition. It should be smaller than 545 KB (hardcoded in pmbr).
Show usage of SI unit suffixes in example.
MFC r210063, r210065:
Fix the way the segments are included in the gcore outputs (with the
default invokation):
- Right now if segments are not writable are not included. Remove this.
- Right now if a segment is mapped with NOCORE the check is not honoured.
Change this by checking the newly added flag, from libutil,
KVME_FLAG_NOCOREDUMP.
Besides that, add a new flag (-f) that forces a 'full' dump of all the
segments excluding just the malformed ones.
MFC r210443:
Remove extra commas from KTR_EVENT4() macro to match number of CTR6() args.
Comparing to other macros there should be strings concatenation, not a
separate arguments.
MFC 209948:
A previous change moved the GETATTR RPC for open() calls that hit in the
name cache up into nfs_lookup() instead of nfs_open(). Continue this
trend by flushing the attribute cache for leaf nodes in nfs_lookup() during
an open() if we do a LOOKUP RPC. For NFSv3 this should generally be a NOP
as the attributes are flushed before fetching the post-op attributes from
the LOOKUP RPC which most (all?) NFSv3 servers provide, so the post-op
attributes should populate the cache.
Now all NFS open() calls will always clear the cached attributes during the
nfs_lookup() prior to nfs_open() in the !NMODIFIED case to provide CTOC.
As a result, we can remove the conditional flushing of the attribute
cache from nfs_open().
MFC r209523:
Import the acpi_aibs(4) driver written by Constantine A. Murenin.
It has more features than acpi_aiboost(4) and it will eventually
replace acpi_aiboost(4).
Submitted by: Constantine A. Murenin <cnst at FreeBSD.org>
Reviewed by: freebsd-acpi, imp
MFC r209016, r209022:
Some odd APs send beacons on the same TX queue as non-beacons. This breaks
802.11 duplicate detection. Upon looking at the standard, we discover
that 802.11-2007 says:
"A receiving QoS STA is also required to keep only the most recent
cache entry per<Address 2, TID, sequence-number> triple, storing only
the most recently received fragment number for that triple. A receiving
STA may omit tuples obtained from broadcast/multicast or ATIM frames
from the cache."
To fix this, we just disable duplicate detection for multicast/broadcast
frames.
Truncate read request rather than returning EIO if the request is
larger than MAXPHYS + 1. This fixes a problem with cat(1) when it
uses a large I/O buffer.