Skip to content

ice: fix TC flower filter priority violations

Petr Oros intel-wired-lan lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 3 repliesIn review
  2. v12 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- track one entry per cookie and filter_dev pair so a shared block bound to multiple devices is protected on every binding, and the delete path drops one entry per DESTROY invocation (sashiko review via Simon Horman)
- collect Reviewed-by from Aleksandr Loktionov on patch 1

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2ice: fix TC flower filters matching more than the ip_proto keydrivers/net/ethernet/intel/ice/ice_tc_lib.c drivers/net/ethernet/intel/ice/ice_tc_lib.h+35 -31 reply
2/2ice: don't offload drop filters that bypass higher priority filtersdrivers/net/ethernet/intel/ice/ice.h drivers/net/ethernet/intel/ice/ice_main.c drivers/net/ethernet/intel/ice/ice_repr.c +2 more+177 -101 reply

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAleksandr LoktionovSimon HormanPatryk Holda
SeriesR-b
1/2R-b T-b
2/2T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH iwl-next v2 0/2] ice: fix TC flower filter priority violations

Two fixes for TC flower offload in the legacy switch mode. Both address the same user visible failure, all traffic on a port silently disappears after installing a filter chain that mixes offloadable and non offloadable filters.

The first fix covers filters matching on ip_proto alone. The driver never programmed the protocol lookup, so a filter like "ip_proto udp action drop" was installed in hardware as a match on eth_type ipv4 and dropped every IPv4 packet.

The second fix covers the interaction between software only filters and offloaded drop filters. The E810 switch gives drop rules absolute precedence over forwarding rules regardless of recipe priority, so a lower priority drop offloaded into hardware overrides any higher priority filter that stayed in software. The driver now tracks filters it could not offload and refuses to offload a drop filter that would bypass one of them, keeping the drop functional in software instead.

Tested on E810 with the OS default and comms DDP packages, including the original reproducer from the report, L2TPv3 pass and drop chains with and without session ID matching, and a shared block bound to two PF ports.

---
v2:
- track one entry per cookie and filter_dev pair so a shared block bound to multiple devices is protected on every binding, and the delete path drops one entry per DESTROY invocation (sashiko review via Simon Horman)
- collect Reviewed-by from Aleksandr Loktionov on patch 1

v1: https://lore.kernel.org/all/[email protected]/

Petr Oros (2):
ice: fix TC flower filters matching more than the ip_proto key
ice: don't offload drop filters that bypass higher priority filters

 drivers/net/ethernet/intel/ice/ice.h        |   1 +
 drivers/net/ethernet/intel/ice/ice_main.c   |   2 +-
 drivers/net/ethernet/intel/ice/ice_repr.c   |   2 +-
 drivers/net/ethernet/intel/ice/ice_tc_lib.c | 196 +++++++++++++++++++-
 drivers/net/ethernet/intel/ice/ice_tc_lib.h |  24 ++-
 5 files changed, 212 insertions(+), 13 deletions(-)
Signature · 1 line
2.55.0