tuexen [Sat, 16 Jan 2016 18:59:10 +0000 (18:59 +0000)]
MFC r291364:
When receiving an SCTP/UDP packet and the interface performed
the UDP checksum computation and signals that it was OK,
clear this bit when passing the packet to SCTP. Since the
bits indicating a valid UDP checksum and a valid SCTP
checksum are the same, the SCTP stack would assume
that also an SCTP checksum check has been performed.
tuexen [Sat, 16 Jan 2016 18:13:33 +0000 (18:13 +0000)]
MFC r291137:
Don't send SHUTDOWN chunk when the association is in a front state
and the applications calls shutdown(..., SHUT_WR) or
shutdown(..., SHUT_RDWR).
tuexen [Sat, 16 Jan 2016 18:03:12 +0000 (18:03 +0000)]
MFC r290442:
Fix typos in field names of struct sctp_extrcvinfo.
Provide defines to allow applications to compile.
Thanks to Jens Hoelscher for making me aware of the typos.
tuexen [Sat, 16 Jan 2016 18:00:47 +0000 (18:00 +0000)]
MFC r290023:
When processing a cookie, any mismatch in port numbers or the vtag results
in failing the check.
This fixes https://github.com/nplab/ETSI-SCTP-Conformance-Testsuite/blob/master/sctp-imh-tests/sctp-imh-i-3-3.pkt
tuexen [Sat, 16 Jan 2016 16:46:00 +0000 (16:46 +0000)]
MFC r287717:
Cleanup the handling of error causes for ERROR chunks. This fixes
an inconsistency of the padding handling. The final padding is
now considered to be a chunk padding.
tuexen [Sat, 16 Jan 2016 16:42:40 +0000 (16:42 +0000)]
MFC r287669:
Ensure that ERROR chunks are always padded by implementing this
in the routine, which queues an ERROR chunk, instead on relyinh
on the callers to do so. Since one caller missed this, this actially
fixes a bug.
tuexen [Sat, 16 Jan 2016 14:56:30 +0000 (14:56 +0000)]
MFC r287619:
Zero out a local variable also when PURIFY is not defined.
This silence a warning brought up by valgrind whenever if_nametoindex
is used. This was already discussed in PR 166483, but the code
committed in r234329 guards the initilization with #ifdef PURIFY.
Therefore, valgrind still complains. Since this code is not performance
critical, always zero out the local variable to silence valgrind.
tuexen [Sat, 16 Jan 2016 14:54:43 +0000 (14:54 +0000)]
MFC r287535:
RFC 4960 requires that packets containing an INIT chunk bundled with
another chunk are silently discarded. Do so, instead of sending an
ABORT.
tuexen [Sat, 16 Jan 2016 14:46:27 +0000 (14:46 +0000)]
MFC r287294:
Use 5 times RTO.Max as the default for the shutdown guard timer
as required by RFC 4960. The sysctl variable can be used to
overwrite this.
tuexen [Sat, 16 Jan 2016 12:33:45 +0000 (12:33 +0000)]
MFC r285877:
Move including netinet/icmp6.h around to avoid a problem when including
netinet/icmp6.h and net/netmap.h. Both use ni_flags...
This allows to build multistack with SCTP support.
tuexen [Sat, 16 Jan 2016 12:20:47 +0000 (12:20 +0000)]
MFC r285837, r285838
Fix an issue with MAC OS locking and also optimize the case
where we are sending back a stream-reset and a sack timer is running, in
that case we should just send the SACK.
Fix silly syntax error emacs chugged in for me.. gesh.
tuexen [Sat, 16 Jan 2016 12:15:07 +0000 (12:15 +0000)]
MFC r285792:
Fix several problems with Stream Reset.
1) We were not handling (or sending) the IN_PROGRESS case if
the other side (or our side) was not able to reset (awaiting more data).
2) We would improperly send a stream-reset when we should not. Not
waiting until the TSN had been assigned when data was inqueue.
jilles [Fri, 15 Jan 2016 20:55:44 +0000 (20:55 +0000)]
MFC r293783: futimens/utimensat: Use the new system calls.
Update the __FreeBSD_version check in lib/libc/sys/futimens.c and
lib/libc/sys/utimensat.c. Before this, fallback code using
futimes/futimesat/lutimes was used except when running on a sufficiently
recent 11-current kernel.
rpokala [Fri, 15 Jan 2016 04:05:56 +0000 (04:05 +0000)]
[PR 206219] Kernel panic from lagg_ioctl and lagg_port_ioctl
r287723 removed some cleanup from lagg(4), which leads to panics when
changing configuration. Restore the spirit of the code which was removed.
This issue has been refactored out of existence in -HEAD, so this patch is
directly against stable/10.
PR: 206219
Submitted by: Fred Lewis < flewis @ panasas.com >
Reviewed by: hiren, Daniel O'Connor < darius @ dons.net.au >
Approved by: jhb
Sponsored by: Panasas, Inc.
Differential Revision: https://reviews.freebsd.org/D4929
ngie [Fri, 15 Jan 2016 02:13:55 +0000 (02:13 +0000)]
MFC r293028,r293029:
r293028:
- Use geom <class> load instead of g<class> load; g<class> doesn't exist
for all geom classes, e.g. geom_uzip(4)
- These tests require root. Skip all of the tests if they're run as non-root
r293029:
Add functions for managing md(4) devices and cleaning up said md(4) devices
These will be used soon in the various test scripts that source geom_subr.sh
jtl [Thu, 14 Jan 2016 22:02:21 +0000 (22:02 +0000)]
MFC r290811:
Fix hwpmc "stalled" behavior
Currently, there is a single pm_stalled flag that tracks whether a
performance monitor was "stalled" due to insufficent ring buffer
space for samples. However, because the same performance monitor
can run on multiple processes or threads at the same time, a single
pm_stalled flag that impacts them all seems insufficient.
In particular, you can hit corner cases where the code fails to stop
performance monitors during a context switch out, because it thinks
the performance monitor is already stopped. However, in reality,
it may be that only the monitor running on a different CPU was stalled.
This patch attempts to fix that behavior by tracking on a per-CPU basis
whether a PM desires to run and whether it is "stalled". This lets the
code make better decisions about when to stop PMs and when to try to
restart them. Ideally, we should avoid the case where the code fails
to stop a PM during a context switch out.
MFC r290813:
Optimizations to the way hwpmc gathers user callchains
Changes to the code to gather user stacks:
* Delay setting pmc_cpumask until we actually have the stack.
* When recording user stack traces, only walk the portion of the ring
that should have samples for us.
MFC r290929:
Change the driver stats to what they really are: unsigned values.
When pmcstat exits after some samples were dropped, give the user an
idea of how many were lost. (Granted, these are global numbers, but
they may still help quantify the scope of the loss.)
MFC r290930:
Improve accuracy of PMC sampling frequency
The code tracks a counter which is the number of events until the next
sample. On context switch in, it loads the saved counter. On context
switch out, it tries to calculate a new saved counter.
Problems:
1. The saved counter was shared by all threads in a process. However, this
means that all threads would be initially loaded with the same saved
counter. However, that could result in sampling more often than once every
X number of events.
2. The calculation to determine a new saved counter was backwards. It
added when it should have subtracted, and subtracted when it should have
added. Assume a single-threaded process with a reload count of 1000
events. Assuming the counter on context switch in was 100 and the counter
on context switch out was 50 (meaning the thread has "consumed" 50 more
events), the code would calculate a new saved counter of 150 (instead of
the proper 50).
Fix:
1. As soon as the saved counter is used to initialize a monitor for a
thread on context switch in, set the saved counter to the reload count.
That way, subsequent threads to use the saved counter will get the full
reload count, assuring we sample at least once every X number of events
(across all threads).
2. Change the calculation of the saved counter. Due to the change to the
saved counter in #1, we simply need to add (modulo the reload count) the
remaining counter time we retrieve from the CPU when a thread is context
switched out.
MFC r291016:
Support a wider history counter in pmcstat(8) gmon output
pmcstat(8) contains an option to output sampling data in a gmon format
compatible with gprof(1). Currently, it uses the default histcounter,
which is an (unsigned short). With large sets of sampling data, it
is possible to overflow the maximum value provided by an (unsigned
short).
This change adds the -e argument to pmcstat. If -e and -g are both
specified, pmcstat will use a histcounter type of uint64_t.
MFC r291017:
Fix the date on the pmcstat(8) man page from r291016.
jhb [Thu, 14 Jan 2016 19:47:52 +0000 (19:47 +0000)]
Now that futimens() and utimensat() have been merged, add decoding for
those system calls that was left out of the previous merge of r286381 in
r290052.
arybchik [Thu, 14 Jan 2016 16:19:01 +0000 (16:19 +0000)]
MFC r293806
sfxge: remove unused common code EFSYS_OPT_RX_HDR_SPLIT
The EFSYS_OPT_RX_HDR_SPLIT optional feature in the common code
implemented the Lookahead Split feature of Windows. This split
received packets at a preconfigured byte offset, and delivered
the header and payload portions to separate receive queues.
Now the common code interface has no callers, so remove it.
Note that this should not be confused with the Header Data Split
feature of Windows, which splits packets at a header boundary.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Sponsored by: Solarflare Communications, Inc.
arybchik [Thu, 14 Jan 2016 16:10:57 +0000 (16:10 +0000)]
MFC r293768
sfxge: update NVRAM partition lookup for Medford
Prior to Medford, option ROM config was stored with one partition
per network port. Medford stores option ROM config in a single
partition (as an array of configurations, one per PF).
Update the EFXname /port to MCDI partition mapping for this.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
arybchik [Thu, 14 Jan 2016 16:04:50 +0000 (16:04 +0000)]
MFC r293758
sfxge: remove obsolete common code PKTFILTER module
The pktfilter module has been obsolete for some time, as
it was replaced by newer features in filter module. With
the removal of the storport driver, this module has no
users and can be removed.
Submitted by: Andy Moreton <amoreton at solarflare.com>
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.