HomeFreeBSD

MFC r340434, r340445

Description

MFC r340434, r340445

r340434:
Fix leaks caused by ifc_nhwtxqs never being initialized

r333502 removed initialization of ifc_nhwtxqs, and it's not clear
there's a need to copy it into the struct iflib_ctx at all. Use
ctx->ifc_sctx->isc_ntxqs instead.

Further, iflib_stop() did not clear the last ring in the case where
isc_nfl != isc_nrxqs (such as when IFLIB_HAS_RXCQ is set). Use
ctx->ifc_sctx->isc_nrxqs here instead of isc_nfl.

Reported by: pkelsey
Reviewed by: pkelsey
Sponsored by: Limelight Networks
Differential Revision: https://reviews.freebsd.org/D17979

r340445:
Clear RX completion queue state veriables in iflib_stop()

iflib_stop() was not resetting the rxq completion queue state variables.
This meant that for any driver that has receive completion queues, after a
reinit, iflib would start asking what's available on the rx side starting at
whatever the completion queue index was prior to the stop, instead of at 0.

Submitted by: pkelsey
Reported by: pkelsey
Sponsored by: Limelight Networks

Details

Committed
shurdNov 19 2018, 3:18 PM
Reviewer
pkelsey
Differential Revision
D17979: Fix leaks caused by ifc_nhwtxqs never being initialized
Parents
rS340628: MFS r340603:
Branches
Unknown
Tags
Unknown