Files
openwrt/target/linux
Gennaro Cimmino 5cf1c09da2 realtek: dsa: rtl839x: offload tc flower rules to the PIE
RTL839x has a PIE driver and an L3 that uses it, but no tc flower
offload: the cls_flower callbacks sit only in the RTL93xx DSA ops, and
tc is only set up where the PIE rule id doubles as a LOG counter, which
holds on RTL930x alone.

Give the families a pie_cls_flower flag for the offload and set it for
RTL930x and RTL839x, set tc up from the RTL83xx setup too, and give the
RTL83xx ops the cls_flower callbacks. RTL839x rules land in the ingress
blocks before L3's, 0 to 4, and take their counters from the
allocator. RTL930x keeps its behaviour, RTL931x has neither flag as
before, and RTL838x, which shares the RTL83xx ops, refuses every
flower rule as the DSA core did without them.

Tested on an HPE 1920-48G (RTL8393), lan48 and lan47 tagged in VLAN 7,
with "realtek: dsa: tc: tell IPv4 from IPv6 by the address type"
applied; skip_sw rules on lan48 ingress, 8 frames each:
- drop on dst_ip, src_ip, dst_mac, udp dst_port 5001, IPv6 dst_ip and
  vlan_id 7: 0 of 8 delivered, hardware count 8 (12 for the VLAN
  rule, which takes every VLAN 7 frame entering lan48); udp 5002
  frames, frames to another IPv6 address, and VLAN 7 frames under a
  vlan_id 3 rule pass
- trap: 8 of 8 at the CPU, where they stay; redirect to lan46: 0 of 8
  delivered; mirror to lan46: 8 of 8 delivered, count 8; ethertype
  0x88b5 to a MAC learnt on lan48, redirected or mirrored to lan47:
  8 of 8 behind lan47, 0 without the rule
- rules on lan47 leave frames entering lan48 alone
- refused by the driver: src_mac, IPv6 src_ip, police, and any egress
  rule
- a tc drop on a prefix routed in hardware, on the switch's own
  address and on a bridged host inside a gateway /28: 0 of 8 routed,
  answered or delivered, count 8
The L3 round passes with the series, apart from its check of the old
block layout (see the previous commit).

Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Gennaro Cimmino <gcimmino@rayonra.net>
Link: https://github.com/openwrt/openwrt/pull/25884
Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
2026-10-14 16:22:11 +02:00
..
2026-10-04 15:57:54 +02:00
2026-10-06 18:35:40 +01:00
2026-10-13 09:50:56 +02:00
2026-10-04 15:57:54 +02:00
2026-10-13 08:53:12 +02:00
2026-10-12 19:11:56 +02:00
2026-10-01 00:49:54 +02:00
2026-10-06 18:35:40 +01:00
2026-10-01 00:50:42 +02:00
2026-08-13 00:22:31 +02:00
2026-10-01 00:49:54 +02:00
2026-10-06 18:35:40 +01:00
2026-10-06 18:35:40 +01:00