]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit - sys/net/iflib.c
iflib: refactor netmap_fl_refill and fix off-by-one issue
authorvmaffione <vmaffione@FreeBSD.org>
Wed, 12 Aug 2020 14:17:38 +0000 (14:17 +0000)
committervmaffione <vmaffione@FreeBSD.org>
Wed, 12 Aug 2020 14:17:38 +0000 (14:17 +0000)
commit63440469a36e03c169e87eda4877ba470e610cd8
treea28114d94c2e8c2d3af710422bd0cf01829ffb2d
parent74d5c2d5af5f9b5f10e457c6d24f9b90927d5d1e
iflib: refactor netmap_fl_refill and fix off-by-one issue

First, fix the initialization of the fl->ifl_rxd_idxs array,
which was affected by an off-by-one bug.
Once there, refactor the function to use better names for
local variables, optimize the variable assignments, and
merge the bus_dmamap_sync() inner loop with the outer one.

PR: 248494
MFC after: 3 weeks
sys/net/iflib.c