svn commit: r217665 - head/sys/mips/cavium/octe
Juli Mallett
jmallett at FreeBSD.org
Thu Jan 20 23:51:03 UTC 2011
Author: jmallett
Date: Thu Jan 20 23:51:03 2011
New Revision: 217665
URL: http://svn.freebsd.org/changeset/base/217665
Log:
If there is no WQE available for a packet that needs segmentation, drop it
and return.
Modified:
head/sys/mips/cavium/octe/ethernet-tx.c
Modified: head/sys/mips/cavium/octe/ethernet-tx.c
==============================================================================
--- head/sys/mips/cavium/octe/ethernet-tx.c Thu Jan 20 23:34:59 2011 (r217664)
+++ head/sys/mips/cavium/octe/ethernet-tx.c Thu Jan 20 23:51:03 2011 (r217665)
@@ -142,9 +142,14 @@ int cvm_oct_xmit(struct mbuf *m, struct
* 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__);
More information about the svn-src-head
mailing list