mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
Add support to add/delete channel specific filter using tc-flower.
For now, only supported action is "skip_sw hw_tc <tc_num>"
Filter criteria is specific to channel and it can be
combination of L3, L3+L4, L2+L4.
Example:
MATCH criteria Action
---------------------------
src and/or dest IPv4[6]/mask -> Forward to "hw_tc <tc_num>"
dest IPv4[6]/mask + dest L4 port -> Forward to "hw_tc <tc_num>"
dest MAC + dest L4 port -> Forward to "hw_tc <tc_num>"
src IPv4[6]/mask + src L4 port -> Forward to "hw_tc <tc_num>"
src MAC + src L4 port -> Forward to "hw_tc <tc_num>"
Adding tc-flower filter for channel using "hw_tc"
-------------------------------------------------
tc qdisc add dev <ethX> clsact
Above two steps are only needed the first time when adding
tc-flower filter.
tc filter add dev <ethX> protocol ip ingress prio 1 flower \
dst_ip 192.168.0.1/32 ip_proto tcp dst_port 5001 \
skip_sw hw_tc 1
tc filter show dev <ethX> ingress
filter protocol ip pref 1 flower chain 0
filter protocol ip pref 1 flower chain 0 handle 0x1 hw_tc 1
eth_type ipv4
ip_proto tcp
dst_ip 192.168.0.1
dst_port 5001
skip_sw
in_hw in_hw_count 1
Delete specific filter:
-------------------------
tc filter del dev <ethx> ingress pref 1 handle 0x1 flower
Delete All filters:
------------------
tc filter del dev <ethX> ingress
Co-developed-by: Amritha Nambiar <amritha.nambiar@intel.com>
Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Sudheer Mogilappagari <sudheer.mogilappagari@intel.com>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
|
||
|---|---|---|
| .. | ||
| ice.h | ||
| ice_adminq_cmd.h | ||
| ice_arfs.c | ||
| ice_arfs.h | ||
| ice_base.c | ||
| ice_base.h | ||
| ice_common.c | ||
| ice_common.h | ||
| ice_controlq.c | ||
| ice_controlq.h | ||
| ice_dcb.c | ||
| ice_dcb.h | ||
| ice_dcb_lib.c | ||
| ice_dcb_lib.h | ||
| ice_dcb_nl.c | ||
| ice_dcb_nl.h | ||
| ice_devids.h | ||
| ice_devlink.c | ||
| ice_devlink.h | ||
| ice_eswitch.c | ||
| ice_eswitch.h | ||
| ice_ethtool.c | ||
| ice_ethtool_fdir.c | ||
| ice_fdir.c | ||
| ice_fdir.h | ||
| ice_flex_pipe.c | ||
| ice_flex_pipe.h | ||
| ice_flex_type.h | ||
| ice_flow.c | ||
| ice_flow.h | ||
| ice_fltr.c | ||
| ice_fltr.h | ||
| ice_fw_update.c | ||
| ice_fw_update.h | ||
| ice_hw_autogen.h | ||
| ice_idc.c | ||
| ice_idc_int.h | ||
| ice_lag.c | ||
| ice_lag.h | ||
| ice_lan_tx_rx.h | ||
| ice_lib.c | ||
| ice_lib.h | ||
| ice_main.c | ||
| ice_nvm.c | ||
| ice_nvm.h | ||
| ice_osdep.h | ||
| ice_protocol_type.h | ||
| ice_ptp.c | ||
| ice_ptp.h | ||
| ice_ptp_hw.c | ||
| ice_ptp_hw.h | ||
| ice_repr.c | ||
| ice_repr.h | ||
| ice_sbq_cmd.h | ||
| ice_sched.c | ||
| ice_sched.h | ||
| ice_sriov.c | ||
| ice_sriov.h | ||
| ice_status.h | ||
| ice_switch.c | ||
| ice_switch.h | ||
| ice_tc_lib.c | ||
| ice_tc_lib.h | ||
| ice_trace.h | ||
| ice_txrx.c | ||
| ice_txrx.h | ||
| ice_txrx_lib.c | ||
| ice_txrx_lib.h | ||
| ice_type.h | ||
| ice_virtchnl_allowlist.c | ||
| ice_virtchnl_allowlist.h | ||
| ice_virtchnl_fdir.c | ||
| ice_virtchnl_fdir.h | ||
| ice_virtchnl_pf.c | ||
| ice_virtchnl_pf.h | ||
| ice_xsk.c | ||
| ice_xsk.h | ||
| Makefile | ||