summaryrefslogtreecommitdiffstats
path: root/sys/mips
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2011-01-20 23:51:03 +0000
committerjmallett <jmallett@FreeBSD.org>2011-01-20 23:51:03 +0000
commit3d09e0bd61776263b8524a64b23b1b03b17e2204 (patch)
tree79389cb950848708a14ee4a78edf686bccdc66a0 /sys/mips
parent555a5f3ada55e312b76e85ae0f2c30083708945f (diff)
downloadFreeBSD-src-3d09e0bd61776263b8524a64b23b1b03b17e2204.zip
FreeBSD-src-3d09e0bd61776263b8524a64b23b1b03b17e2204.tar.gz
If there is no WQE available for a packet that needs segmentation, drop it
and return.
Diffstat (limited to 'sys/mips')
-rw-r--r--sys/mips/cavium/octe/ethernet-tx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/mips/cavium/octe/ethernet-tx.c b/sys/mips/cavium/octe/ethernet-tx.c
index 1e21273..23e3aba 100644
--- a/sys/mips/cavium/octe/ethernet-tx.c
+++ b/sys/mips/cavium/octe/ethernet-tx.c
@@ -142,9 +142,14 @@ int cvm_oct_xmit(struct mbuf *m, struct ifnet *ifp)
* in memory we borrow from the WQE pool.
*/
work = cvmx_fpa_alloc(CVMX_FPA_WQE_POOL);
- gp = (uint64_t *)work;
+ if (work == NULL) {
+ m_freem(m);
+ ifp->if_oerrors++;
+ return 1;
+ }
segs = 0;
+ gp = (uint64_t *)work;
for (n = m; n != NULL; n = n->m_next) {
if (segs == CVMX_FPA_WQE_POOL_SIZE / sizeof (uint64_t))
panic("%s: too many segments in packet; call m_collapse().", __func__);
OpenPOWER on IntegriCloud