rrs [Sat, 11 Nov 2006 15:59:01 +0000 (15:59 +0000)]
Turns out we would reset the TSN seq counter during
a colliding INIT. This if fine except when we have
data outstanding... we basically reset it to the
previous value it was.. so then we end up assigning
the same TSN to two different data chunks.
This patch:
1) Finds a missing lock for when we change the stream
numbers during COOKIE and INIT-ACK processing.. we
were NOT locking the send_buffer.. which COULD cause
problems (found by inspection looking for <2>)
2) Fixes a case during a colliding INIT where we incorrectly
reset the sending Sequence thus in some cases duplicately
assigning a TSN.
3) Additional enhancments to logging so we can see strm/tsn in
the receiver AND new tracking to watch what the sender
is doing with TSN and STRM seq's.
kmacy [Sat, 11 Nov 2006 03:18:07 +0000 (03:18 +0000)]
MUTEX_PROFILING has been generalized to LOCK_PROFILING. We now profile
wait (time waited to acquire) and hold times for *all* kernel locks. If
the architecture has a system synchronized TSC, the profiling code will
use that - thereby minimizing profiling overhead. Large chunks of profiling
code have been moved out of line, the overhead measured on the T1 for when
it is compiled in but not enabled is < 1%.
Approved by: scottl (standing in for mentor rwatson)
Reviewed by: des and jhb
emaste [Fri, 10 Nov 2006 20:06:03 +0000 (20:06 +0000)]
Clarify the error message when trying to build an ACPI module on amd64
or ia64.
The old message implied to me that ACPI can't be compiled in on platforms
other than amd64 and ia64. The amd64@ mailing list archive has messages
from users with the same confusion.
rrs [Fri, 10 Nov 2006 13:34:55 +0000 (13:34 +0000)]
This patch fixes a LOR that happens during INIT-ACK collision.
We were calling select_a_tag() inside sctp_send_initate_ack().
During collision cases we have a stcb and thus a SCTP_LOCK. When
we call select_a_tag it (below it) locks the INFO lock. We now
1) pre-select the nonce-tie-tags in sctputil.c during setup of
a tcb.
2) In the other case where we have to select tags, we unlock after
incr the ref cnt (so assoc won't go away0 and then do the
tag selection followed by a relock and decr the refcnt.
Approved by: gnn
kientzle [Fri, 10 Nov 2006 06:39:46 +0000 (06:39 +0000)]
Portability and style fixes:
* Actually use the HAVE_<header>_H macros to conditionally include
system headers. They've been defined for a long time, but only
used in a few places. Now they're used pretty consistently
throughout.
* Fill in a lot of missing casts for conversions from void*.
Although Standard C doesn't require this, some people have been
trying to use C++ compilers with this code, and they do require it.
Bit-for-bit, the compiled object files are identical, except for
one assert() whose line number changed, so I'm pretty confident I
didn't break anything. ;-)
thompsa [Thu, 9 Nov 2006 22:50:49 +0000 (22:50 +0000)]
MFp4
- Each stp port is added sequentially so it was possible for our bridgeid to
change every time because the new port has a lower MAC address. Instead
just find the lowest MAC address from all Ethernet adapters in the machine
as the value only needs to be unique, this stops a lot of churn on the
protocol.
- Update the states after enabling or disabling a port.
- Keep tabs if we have been stopped or started by our parent bridge.
- The callout only needs to be drained before destroying the mutex, move it to
bstp_detach.
rrs [Thu, 9 Nov 2006 21:01:07 +0000 (21:01 +0000)]
Fixes an issue with handling of stream reset. When a
reset comes in we need to calculate the length and
therefore the number of listed streams (if any) based
on the TLV type. Otherwise if we get a retran we could
in theory panic by sending a notification to a user with
a incorrect list and thus no memory listing the streams.
Found in IOS by devtest :-)
Approved by: gnn
glebius [Thu, 9 Nov 2006 16:00:18 +0000 (16:00 +0000)]
Instead of using the legacy if_timer/if_watchdog interface create
our own watchdog that piggybacks on the em_local_timer() routine.
We suppose that the if_timer/if_watchdog interface should be
obsoleted, since it doesn't fit the modern SMP network stack.
NIC drivers should create their own watchdogs, that check and
clear the timers always holding driver's lock.
bms [Thu, 9 Nov 2006 11:39:34 +0000 (11:39 +0000)]
Rewrite the format of pirtool output to match what the kernel currently
prints out if bootverbose is set. This is to facilitate the code being
removed from the kernel at a later date.
While we're here, fix the __packed structures, and add some other
PCI interrupt router IDs.
Submitted by: jhb (with some tweaks)
MFC after: 3 weeks
thompsa [Thu, 9 Nov 2006 06:32:38 +0000 (06:32 +0000)]
Add a new address cache type called sticky. On an interface marked sticky any
address learned by the bridge is made permanent, the address will not age out
and most importantly will not migrate to another interface.
This can be used to stop mac address poisoning or clients roaming in much the
same way as static entries without the hassle of preloading the table.
kmacy [Wed, 8 Nov 2006 22:09:58 +0000 (22:09 +0000)]
Fix for ithread interrupt handling. Don't reset the interrupt vector until
after the interrupt has been handled. Also move panic_bad_hcall to local to
avoid complaints from the linker on the tinderbox.
Approved by: scottl (substituting for mentor rwatson)
alc [Wed, 8 Nov 2006 18:43:47 +0000 (18:43 +0000)]
Simplify the construction of the free queues in vm_page_startup(). Add
an assertion to test a hypothesis concerning other redundant computation
in vm_page_startup().
bde [Wed, 8 Nov 2006 15:15:05 +0000 (15:15 +0000)]
Don't always print a space character in show_stat(), since a space
shouldn't be printed after the last column. This restores the
formatting to 79 columns.
harti [Wed, 8 Nov 2006 10:36:57 +0000 (10:36 +0000)]
Make the generated oid.h dependend on the Makefile. The Makefile defines
the symbols to be extracted from the MIB and if that list of symbols is
changed, oid.h should be re-generated.
alc [Wed, 8 Nov 2006 06:31:28 +0000 (06:31 +0000)]
MFamd64/ia64/i386/sun4v
Use cnt.v_page_count, the actual count of available physical pages,
instead of vm_page_array_size to compute the maximum number of pv
entries.
rrs [Wed, 8 Nov 2006 00:21:13 +0000 (00:21 +0000)]
-Fixes first of all the getcred on IPv6 and V4. The
copy's were incorrect and so was the locking.
-A bug was also found that would create a race and
panic when an abort arrived on a socket being read
from.
-Also fix the reader to get MSG_TRUNC when a partial
delivery is aborted.
-Also addresses a couple of coverity caught error path
memory leaks and a couple of other valid complaints
Approved by: gnn
jhb [Tue, 7 Nov 2006 19:45:05 +0000 (19:45 +0000)]
Simplify operations with sync_mtx in sched_sync():
- Don't drop the lock just to reacquire it again to check rushjob, this
only wastes time.
- Use msleep() to drop the mutex while sleeping instead of explicitly
unlocking around tsleep.
marius [Tue, 7 Nov 2006 19:44:41 +0000 (19:44 +0000)]
- Don't bother to include IDs of PCnet chips which are not supported
by this driver and largely are not even PCI devices in pcn_chipid.
- Use device_printf(9)/if_printf(9) rather than implementing their
functionality with printf(9).
- Sprinkle some const.