diff options
author | arybchik <arybchik@FreeBSD.org> | 2015-05-22 07:39:21 +0000 |
---|---|---|
committer | arybchik <arybchik@FreeBSD.org> | 2015-05-22 07:39:21 +0000 |
commit | ca72ba8567faaab08c78edfe51e067a187fd4912 (patch) | |
tree | 9875a6878ed7836e95fe4ddccbc0a64b96f8bc6f | |
parent | d184c1c64fb2df10e443a62ee477ea8f16e1d7df (diff) | |
download | FreeBSD-src-ca72ba8567faaab08c78edfe51e067a187fd4912.zip FreeBSD-src-ca72ba8567faaab08c78edfe51e067a187fd4912.tar.gz |
sfxge: relax assertion to allow RST flag in TSO packets
Kernel under stress load, mixed MC reboot and sfupdate really
generates TSO packet with RST flag.
It will generate many TCP packets with RST flag set.
May be RST flag should be set in the last segment only, but it could be
dropped. So, it is safer to keep the flag in all packets to be sure that
connection is reset.
Reviewed by: gnn
Sponsored by: Solarflare Communications, Inc.
MFC after: 2 days
Differential Revision: https://reviews.freebsd.org/D2609
-rw-r--r-- | sys/dev/sfxge/sfxge_tx.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c index f3035f5..524b09d 100644 --- a/sys/dev/sfxge/sfxge_tx.c +++ b/sys/dev/sfxge/sfxge_tx.c @@ -865,8 +865,14 @@ static void tso_start(struct sfxge_tso_state *tso, struct mbuf *mbuf) tso->seqnum = ntohl(th->th_seq); /* These flags must not be duplicated */ - KASSERT(!(th->th_flags & (TH_URG | TH_SYN | TH_RST)), - ("incompatible TCP flag on TSO packet")); + /* + * RST should not be duplicated as well, but FreeBSD kernel + * generates TSO packets with RST flag. So, do not assert + * its absence. + */ + KASSERT(!(th->th_flags & (TH_URG | TH_SYN)), + ("incompatible TCP flag 0x%x on TSO packet", + th->th_flags & (TH_URG | TH_SYN))); tso->out_len = mbuf->m_pkthdr.len - tso->header_len; } |