summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorsilby <silby@FreeBSD.org>2003-04-15 04:06:01 +0000
committersilby <silby@FreeBSD.org>2003-04-15 04:06:01 +0000
commit83c096f9a1852fc707d45f871927d91d7f32fc40 (patch)
tree514fadfd449f098f0a0e2f89eb7227e56f357a06 /sys/pci
parentc2d5e1feb998d37695356c3273a16feed8b61983 (diff)
downloadFreeBSD-src-83c096f9a1852fc707d45f871927d91d7f32fc40.zip
FreeBSD-src-83c096f9a1852fc707d45f871927d91d7f32fc40.tar.gz
Rework the rl_encap failure case. Previously, we would stuff the
unencapsulated packet back into the IFQ. Unfortunately, the only reason rl_encap would fail was due to m_defrag failing, which should only happen when we're low on mbufs. Hence, it was possible for us to end up with an IFQ full of packets which could never clear the queue because they could never be defragmented because they were themselves taking up all the mbufs. To solve this, take if_xl's approach to the problem of encapsulation failure: drop the packet. MFC after: 3 days
Diffstat (limited to 'sys/pci')
-rw-r--r--sys/pci/if_rl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/pci/if_rl.c b/sys/pci/if_rl.c
index 47c4de5..7a22598 100644
--- a/sys/pci/if_rl.c
+++ b/sys/pci/if_rl.c
@@ -1506,8 +1506,10 @@ rl_encap(sc, m_head)
*/
m_new = m_defrag(m_head, M_DONTWAIT);
- if (m_new == NULL)
+ if (m_new == NULL) {
+ m_freem(m_head);
return(1);
+ }
m_head = m_new;
/* Pad frames to at least 60 bytes. */
@@ -1550,8 +1552,6 @@ rl_start(ifp)
break;
if (rl_encap(sc, m_head)) {
- IF_PREPEND(&ifp->if_snd, m_head);
- ifp->if_flags |= IFF_OACTIVE;
break;
}
OpenPOWER on IntegriCloud