HomeFreeBSD

iflib: netmap: fix rsync index overrun

Description

iflib: netmap: fix rsync index overrun

In the current iflib_netmap_rxsync, there is nothing that prevents
kring->nr_hwtail to overrun kring->nr_hwcur during the descriptor
import phase. This may cause errors in netmap applications, such as:

em1 RX0: fail 'head < kring->nr_hwcur || head > kring->nr_hwtail'

h 795 c 795 t 282 rh 795 rc 795 rt 282 hc 282 ht 282

Reviewed by: gallatin
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D25252

Details

Provenance
vmaffioneAuthored on
Reviewer
gallatin
Differential Revision
D25252: iflib: netmap: fix rsync index overrun
Parents
rS362552: Define RB_SET_PARENT to do all assignments to rb parent
Branches
Unknown
Tags
Unknown