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
This commit is contained in:
Kip Macy 2008-10-03 00:50:26 +00:00
parent a3f223e26a
commit 5ec372d1fa
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=183559

View File

@ -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