HomeFreeBSD

enetc: Simply TX ring credits counting logic

Description

enetc: Simply TX ring credits counting logic

According to the RM rings can hold at most ring_size - 1 descriptors at any time.
No additional logic is needed since iflib already respects this constrain.
Thanks to that the pidx == cidx situation is not ambiguous and indicates an
empty ring.
Use that to simplify the logic that calculates the amount of processed frames.

Obtained from: Semihalf
Sponsored by: Alstom Group

Details

Provenance
kdAuthored on Jan 27 2022, 9:24 AM
wmaCommitted on Jan 31 2022, 7:57 AM
Parents
rGf485d733e87e: enetc: Disable HW IP packet alignment
Branches
Unknown
Tags
Unknown