]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
if_ntb: Reuse receive buffers correctly
authorConrad Meyer <cem@FreeBSD.org>
Wed, 18 Nov 2015 22:20:49 +0000 (22:20 +0000)
committerConrad Meyer <cem@FreeBSD.org>
Wed, 18 Nov 2015 22:20:49 +0000 (22:20 +0000)
commite90df063889568e62342e7578c236fdce552c556
tree8936f1923b4b4fee3d6618bb7f91d0a085777e69
parentc95b032ec613eab865e013a2197192269fa8d830
if_ntb: Reuse receive buffers correctly

Discard the unused rx_free_q.  Instead, reuse inputed packets by putting
them back on the *pend* queue after reinitialization.

If tx or rx handlers are unavailable, free mbufs rather than leaking
them.

With this change, if_ntb can receive more than 100
(NTB_QP_DEF_NUM_ENTRIES) packets.

Sponsored by: EMC / Isilon Storage Division
sys/dev/ntb/if_ntb/if_ntb.c