1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

If there is no WQE available for a packet that needs segmentation, drop it

and return.
This commit is contained in:
Juli Mallett 2011-01-20 23:51:03 +00:00
parent 3e46966ed3
commit 2e2b4ad457
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=217665

View File

@ -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__);