summaryrefslogtreecommitdiffstats
path: root/sys/dev/xen/netfront/netfront.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2015-02-27 19:12:35 +0000
committerglebius <glebius@FreeBSD.org>2015-02-27 19:12:35 +0000
commit201fc1be734699c0e97ce569c7ebdf59b5343f95 (patch)
tree1d0f06120bf655256959a22a8bf94e0a418b5f60 /sys/dev/xen/netfront/netfront.c
parent1909a3ff8da7b144996d9fda1b0b411dbf3bdc58 (diff)
downloadFreeBSD-src-201fc1be734699c0e97ce569c7ebdf59b5343f95.zip
FreeBSD-src-201fc1be734699c0e97ce569c7ebdf59b5343f95.tar.gz
Use m_getjcl() instead of old mbuf(9) KPIs.
Tested by: royger
Diffstat (limited to 'sys/dev/xen/netfront/netfront.c')
-rw-r--r--sys/dev/xen/netfront/netfront.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c
index de80bb9..f65e29c 100644
--- a/sys/dev/xen/netfront/netfront.c
+++ b/sys/dev/xen/netfront/netfront.c
@@ -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;
/*
OpenPOWER on IntegriCloud