]> git.ipfire.org Git - thirdparty/linux.git/commit
net: dsa: mv88e6xxx: Add partial support for TCAM entries
authorCedric Jehasse <cedric.jehasse@luminex.be>
Wed, 11 Mar 2026 10:46:19 +0000 (11:46 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 17 Mar 2026 09:35:20 +0000 (10:35 +0100)
commit639f1dcfde5540a8fafa8458d3e6be05207a68db
tree732d20075093c38e87dd46445e74a16e9325f398
parentb513dde96c0ac19874175360bde9ad13811a8120
net: dsa: mv88e6xxx: Add partial support for TCAM entries

This patch adds partial Ternary Content Addressable Memory (TCAM) for
the mv88e6390 and mv88e6393 family of switches. TCAM entries allow the
switch to match the first 48 or 96 bytes of a frame and take actions on
matched frames.

This patch introduces a subset of the available TCAM functionality.
Matching on ip addresses/protocol and trapping to the cpu.

Eg. to trap traffic with destination ip 224.0.1.129 to the cpu:

tc qdisc add dev p1 clsact
tc filter add dev p1 ingress protocol ip flower skip_sw \
    dst_ip 224.0.1.129 action trap

Signed-off-by: Cedric Jehasse <cedric.jehasse@luminex.be>
Link: https://patch.msgid.link/20260311-net-next-mv88e6xxx-tcam-v8-2-32dd5ba30002@luminex.be
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/mv88e6xxx/Makefile
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/chip.h
drivers/net/dsa/mv88e6xxx/port.c
drivers/net/dsa/mv88e6xxx/port.h
drivers/net/dsa/mv88e6xxx/tcam.c [new file with mode: 0644]
drivers/net/dsa/mv88e6xxx/tcam.h [new file with mode: 0644]
drivers/net/dsa/mv88e6xxx/tcflower.c [new file with mode: 0644]
drivers/net/dsa/mv88e6xxx/tcflower.h [new file with mode: 0644]