summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorarybchik <arybchik@FreeBSD.org>2015-05-24 06:53:10 +0000
committerarybchik <arybchik@FreeBSD.org>2015-05-24 06:53:10 +0000
commitb7a860bb3a919e24d54388f1a29bff11e93832e0 (patch)
tree6c60ee0ca60ec854031f7930bb6cc09a56369e77
parent531e259796a40dbc2136525917ce52587b882c13 (diff)
downloadFreeBSD-src-b7a860bb3a919e24d54388f1a29bff11e93832e0.zip
FreeBSD-src-b7a860bb3a919e24d54388f1a29bff11e93832e0.tar.gz
MFC: r283278
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. Sponsored by: Solarflare Communications, Inc.
-rw-r--r--sys/dev/sfxge/sfxge_tx.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/sfxge/sfxge_tx.c b/sys/dev/sfxge/sfxge_tx.c
index 18c86427..054e36f 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;
}
OpenPOWER on IntegriCloud