OSDN Git Service

octeontx2-pf: Add support for ethtool ntuple filters
authorSubbaraya Sundeep <sbhatta@marvell.com>
Sat, 14 Nov 2020 19:52:55 +0000 (01:22 +0530)
committerJakub Kicinski <kuba@kernel.org>
Tue, 17 Nov 2020 21:48:20 +0000 (13:48 -0800)
commitf0a1913f8a6f947531c3042f9d6524946e661b57
tree27148a84f44a622acbc92e81fd9d4a768784aeb6
parent55307fcb925846d760ed80f4a8359dd4331c52bd
octeontx2-pf: Add support for ethtool ntuple filters

This patch adds support for adding and deleting ethtool ntuple
filters. The filters for ether, ipv4, ipv6, tcp, udp and sctp
are supported. The mask is also supported. The supported actions
are drop and direct to a queue. Additionally we support FLOW_EXT
field vlan_tci and FLOW_MAC_EXT.

The NIX PF will allocate total 32 MCAM entries for the use of
ethtool ntuple filters. The Administrative Function(AF) will
install/delete the MCAM rules when NIX PF sends mailbox message
to install/delete the ntuple filters.

Ethtool ntuple filters support is restricted to PFs as of now
and PF can install ntuple filters to direct the traffic to its
VFs. Hence added a separate callback for VFs to get/set RSS
configuration.

Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/marvell/octeontx2/nic/Makefile
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
drivers/net/ethernet/marvell/octeontx2/nic/otx2_ethtool.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_flows.c [new file with mode: 0644]
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c