mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
dfacc5a23e
Implement tc-flower offloads for redirect, trap and drop using non-critical virtual links. Commands which were tested to work are: # Send frames received on swp2 with a DA of 42:be:24:9b:76:20 to the # CPU and to swp3. This type of key (DA only) when the port's VLAN # awareness state is off. tc qdisc add dev swp2 clsact tc filter add dev swp2 ingress flower skip_sw dst_mac 42:be:24:9b:76:20 \ action mirred egress redirect dev swp3 \ action trap # Drop frames received on swp2 with a DA of 42:be:24:9b:76:20, a VID # of 100 and a PCP of 0. tc filter add dev swp2 ingress protocol 802.1Q flower skip_sw \ dst_mac 42:be:24:9b:76:20 vlan_id 100 vlan_prio 0 action drop Under the hood, all rules match on DMAC, VID and PCP, but when VLAN filtering is disabled, those are set internally by the driver to the port-based defaults. Because we would be put in an awkward situation if the user were to change the VLAN filtering state while there are active rules (packets would no longer match on the specified keys), we simply deny changing vlan_filtering unless the list of flows offloaded via virtual links is empty. Then the user can re-add new rules. Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
46 lines
1.7 KiB
Plaintext
46 lines
1.7 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config NET_DSA_SJA1105
|
|
tristate "NXP SJA1105 Ethernet switch family support"
|
|
depends on NET_DSA && SPI
|
|
select NET_DSA_TAG_SJA1105
|
|
select PACKING
|
|
select CRC32
|
|
help
|
|
This is the driver for the NXP SJA1105 automotive Ethernet switch
|
|
family. These are 5-port devices and are managed over an SPI
|
|
interface. Probing is handled based on OF bindings and so is the
|
|
linkage to PHYLINK. The driver supports the following revisions:
|
|
- SJA1105E (Gen. 1, No TT-Ethernet)
|
|
- SJA1105T (Gen. 1, TT-Ethernet)
|
|
- SJA1105P (Gen. 2, No SGMII, No TT-Ethernet)
|
|
- SJA1105Q (Gen. 2, No SGMII, TT-Ethernet)
|
|
- SJA1105R (Gen. 2, SGMII, No TT-Ethernet)
|
|
- SJA1105S (Gen. 2, SGMII, TT-Ethernet)
|
|
|
|
config NET_DSA_SJA1105_PTP
|
|
bool "Support for the PTP clock on the NXP SJA1105 Ethernet switch"
|
|
depends on NET_DSA_SJA1105
|
|
depends on PTP_1588_CLOCK
|
|
help
|
|
This enables support for timestamping and PTP clock manipulations in
|
|
the SJA1105 DSA driver.
|
|
|
|
config NET_DSA_SJA1105_TAS
|
|
bool "Support for the Time-Aware Scheduler on NXP SJA1105"
|
|
depends on NET_DSA_SJA1105 && NET_SCH_TAPRIO
|
|
depends on NET_SCH_TAPRIO=y || NET_DSA_SJA1105=m
|
|
depends on NET_DSA_SJA1105_PTP
|
|
help
|
|
This enables support for the TTEthernet-based egress scheduling
|
|
engine in the SJA1105 DSA driver, which is controlled using a
|
|
hardware offload of the tc-tqprio qdisc.
|
|
|
|
config NET_DSA_SJA1105_VL
|
|
bool "Support for Virtual Links on NXP SJA1105"
|
|
depends on NET_DSA_SJA1105_TAS
|
|
help
|
|
This enables support for flow classification using capable devices
|
|
(SJA1105T, SJA1105Q, SJA1105S). The following actions are supported:
|
|
- redirect, trap, drop
|
|
- time-based ingress policing, via the tc-gate action
|