summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorkmacy <kmacy@FreeBSD.org>2008-10-03 00:50:26 +0000
committerkmacy <kmacy@FreeBSD.org>2008-10-03 00:50:26 +0000
commit5af9b4daf219111a13b92959edcef0f894837ad0 (patch)
tree1568894c0057836f751c1b40fa2ec21808f00e65 /sys
parent258f05497837944148a818c01c8a3e6b0cf8750b (diff)
downloadFreeBSD-src-5af9b4daf219111a13b92959edcef0f894837ad0.zip
FreeBSD-src-5af9b4daf219111a13b92959edcef0f894837ad0.tar.gz
Fix bug in LRO on T304 whereby a packet could be sent to the wrong interface's ifp.
Submitted by: Chelsio Inc. MFC after: 1 day
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/cxgb/cxgb_sge.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/dev/cxgb/cxgb_sge.c b/sys/dev/cxgb/cxgb_sge.c
index 3d26283..f4c4f65 100644
--- a/sys/dev/cxgb/cxgb_sge.c
+++ b/sys/dev/cxgb/cxgb_sge.c
@@ -2805,6 +2805,7 @@ process_responses(adapter_t *adap, struct sge_qset *qs, int budget)
unsigned int sleeping = 0;
#ifdef LRO_SUPPORTED
int lro_enabled = qs->lro.enabled;
+ int skip_lro;
struct lro_ctrl *lro_ctrl = &qs->lro.ctrl;
#endif
struct mbuf *offload_mbufs[RX_BUNDLE_SIZE];
@@ -2924,8 +2925,19 @@ process_responses(adapter_t *adap, struct sge_qset *qs, int budget)
prefetch(mtod(m, uint8_t *) + L1_CACHE_BYTES);
t3_rx_eth(adap, rspq, m, ethpad);
+
#ifdef LRO_SUPPORTED
- if (lro_enabled && lro_ctrl->lro_cnt &&
+ /*
+ * The T304 sends incoming packets on any qset. If LRO
+ * is also enabled, we could end up sending packet up
+ * lro_ctrl->ifp's input. That is incorrect.
+ *
+ * The mbuf's rcvif was derived from the cpl header and
+ * is accurate. Skip LRO and just use that.
+ */
+ skip_lro = __predict_false(qs->port->ifp != m->m_pkthdr.rcvif);
+
+ if (lro_enabled && lro_ctrl->lro_cnt && !skip_lro &&
(tcp_lro_rx(lro_ctrl, m, 0) == 0)) {
/* successfully queue'd for LRO */
} else
OpenPOWER on IntegriCloud