mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-17 10:26:15 +00:00
Use m_getjcl() instead of old mbuf(9) KPIs.
Tested by: royger
This commit is contained in:
parent
0461326c01
commit
c2d9c6f035
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=279365
@ -815,17 +815,8 @@ network_alloc_rx_buffers(struct netfront_info *sc)
|
||||
*/
|
||||
batch_target = sc->rx_target - (req_prod - sc->rx.rsp_cons);
|
||||
for (i = mbufq_len(&sc->xn_rx_batch); i < batch_target; i++) {
|
||||
MGETHDR(m_new, M_NOWAIT, MT_DATA);
|
||||
m_new = m_getjcl(M_NOWAIT, MT_DATA, M_PKTHDR, MJUMPAGESIZE);
|
||||
if (m_new == NULL) {
|
||||
printf("%s: MGETHDR failed\n", __func__);
|
||||
goto no_mbuf;
|
||||
}
|
||||
|
||||
if (m_cljget(m_new, M_NOWAIT, MJUMPAGESIZE) == NULL) {
|
||||
printf("%s: m_cljget failed\n", __func__);
|
||||
m_freem(m_new);
|
||||
|
||||
no_mbuf:
|
||||
if (i != 0)
|
||||
goto refill;
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user