net/txgbe: fix FDIR Rx packet buffer handling
Status from this message: Applied to next-net
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 1 replyApplied
- v13 patches 7 repliesSuperseded
Changes in v2 from the cover letter
* 2/3: reject modes other than signature and perfect while parsing, so validate no longer accepts a MAC VLAN rule that create rejects.
* 1/3 and 3/3 are unchanged. Restoring a single packet buffer on disable matches what enabling FDIR already does, including with DCB. Rejecting FDIR when DCB Rx is configured can be a separate patch.
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | net/txgbe: fix Rx packet buffer size with flow directordrivers/ | +2 | 0 replies | |
| 2/3 | net/txgbe: do not enable flow director on flow validatedrivers/ | +31 | 0 replies | |
| 3/3 | net/txgbe: disable flow director when no rule is leftdrivers/ drivers/ drivers/ | +34 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/3] net/txgbe: fix FDIR Rx packet buffer handling
Enabling Flow Director reduces the Rx packet buffer 0 to reserve memory for the filter table, but the size was computed from the current register value and never restored when FDIR was no longer used. Since the FDIR mode is reset when the last rule is removed, on flush, or when enabling FDIR fails, the next rule enabled FDIR again and shrank the buffer once more, until it underflowed. Validating a rule also enabled FDIR.
Patch 1 computes the buffer size from the default packet buffer size, which alone stops the repeated reduction.
Patch 2 stops enabling FDIR from flow validate and rolls back the mode when the first rule fails. It also rejects a mode other than signature or perfect while parsing, which configuration does not implement, so validate and create fail the same way.
Patch 3 disables FDIR and restores the buffer when no rule is left.
The same issue was fixed in ixgbe:
<https://patches.dpdk.org/project/dpdk/patch/[email protected]>
Compile tested only.
v2:
* 2/3: reject modes other than signature and perfect while parsing, so validate no longer accepts a MAC VLAN rule that create rejects.
* 1/3 and 3/3 are unchanged. Restoring a single packet buffer on disable matches what enabling FDIR already does, including with DCB. Rejecting FDIR when DCB Rx is configured can be a separate patch.
Zhang Tengfei (3):
net/txgbe: fix Rx packet buffer size with flow director net/txgbe: do not enable flow director on flow validate net/txgbe: disable flow director when no rule is left
drivers/net/txgbe/txgbe_ethdev.h | 1 + drivers/net/txgbe/txgbe_fdir.c | 36 ++++++++++++++---- drivers/net/txgbe/txgbe_flow.c | 64 ++++++++++++++++++-------------- 3 files changed, 66 insertions(+), 35 deletions(-)
Signature · 1 line
2.53.0