linux/drivers/net
Vladimir Oltean 95706be13b net: mscc: ocelot: create a function that replaces an existing VCAP filter
VCAP (Versatile Content Aware Processor) is the TCAM-based engine behind
tc flower offload on ocelot, among other things. The ingress port mask
on which VCAP rules match is present as a bit field in the actual key of
the rule. This means that it is possible for a rule to be shared among
multiple source ports. When the rule is added one by one on each desired
port, that the ingress port mask of the key must be edited and rewritten
to hardware.

But the API in ocelot_vcap.c does not allow for this. For one thing,
ocelot_vcap_filter_add() and ocelot_vcap_filter_del() are not symmetric,
because ocelot_vcap_filter_add() works with a preallocated and
prepopulated filter and programs it to hardware, and
ocelot_vcap_filter_del() does both the job of removing the specified
filter from hardware, as well as kfreeing it. That is to say, the only
option of editing a filter in place, which is to delete it, modify the
structure and add it back, does not work because it results in
use-after-free.

This patch introduces ocelot_vcap_filter_replace, which trivially
reprograms a VCAP entry to hardware, at the exact same index at which it
existed before, without modifying any list or allocating any memory.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-11-26 11:38:20 -08:00
..
appletalk net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
arcnet net: remove single-byte netdev->dev_addr writes 2021-10-13 10:03:59 -07:00
bonding bonding: Fix a use-after-free problem when bond_sysfs_slave_add() failed 2021-11-05 10:14:38 +00:00
caif
can Networking fixes for 5.16-rc1, including fixes from bpf, can 2021-11-11 09:49:36 -08:00
dsa net: dsa: qca8k: fix MTU calculation 2021-11-22 12:34:37 +00:00
ethernet net: mscc: ocelot: create a function that replaces an existing VCAP filter 2021-11-26 11:38:20 -08:00
fddi fddi: defza: add missing pointer type cast 2021-10-25 10:28:47 -07:00
fjes net: fjes: constify and use eth_hw_addr_set() 2021-10-22 10:16:07 -07:00
hamradio hamradio: fix macro redefine warning 2021-11-23 11:38:13 +00:00
hippi net: hippi: use dev_addr_set() 2021-10-22 10:16:09 -07:00
hyperv hyperv-next for 5.16 2021-11-02 10:56:49 -07:00
ieee802154 ieee802154: Remove redundant 'flush_workqueue()' calls 2021-10-19 13:23:38 +01:00
ipa net: ipa: kill ipa_cmd_pipeline_clear() 2021-11-23 12:26:40 +00:00
ipvlan net: ipvtap: fix template string argument of device_create() call 2021-10-16 08:51:22 +01:00
mctp
mdio mdio: aspeed: Fix "Link is Down" issue 2021-11-25 07:44:42 -08:00
netdevsim netdevsim: fix uninit value in nsim_drv_configure_vfs() 2021-11-01 16:29:56 -07:00
pcs net: convert users of bitmap_foo() to linkmode_foo() 2021-10-24 13:58:52 +01:00
phy net: phylink: Force retrigger in case of latched link-fail indicator 2021-11-24 18:40:07 -08:00
plip net: plip: use eth_hw_addr_set() 2021-10-22 10:16:14 -07:00
ppp TTY / Serial driver update for 5.16-rc1 2021-11-04 09:09:37 -07:00
slip slip: fix macro redefine warning 2021-11-23 11:38:13 +00:00
team
usb net: usb: Correct PHY handling of smsc95xx 2021-11-23 12:24:41 +00:00
vmxnet3 net: vmxnet3: remove multiple false checks in vmxnet3_ethtool.c 2021-11-01 16:35:27 -07:00
wan net: hldc_fr: use dev_addr_set() 2021-10-22 10:16:18 -07:00
wireguard
wireless Core: 2021-11-02 06:20:58 -07:00
wwan net: wwan: iosm: fix compilation warning 2021-11-11 11:45:44 +00:00
xen-netback net: xen: use eth_hw_addr_set() 2021-10-22 10:15:54 -07:00
amt.c amt: cancel delayed_work synchronously in amt_fini() 2021-11-16 19:14:12 -08:00
bareudp.c net: bareudp: fix duplicate checks of data[] expressions 2021-10-29 13:41:28 +01:00
dummy.c
eql.c
geneve.c
gtp.c
ifb.c ifb: fix building without CONFIG_NET_CLS_ACT 2021-10-29 14:01:11 +01:00
Kconfig amt: add IPV6 Kconfig dependency 2021-11-09 14:00:13 +00:00
LICENSE.SRC
loopback.c
macsec.c net: drivers: get ready for const netdev->dev_addr 2021-10-24 13:59:45 +01:00
macvlan.c net: drivers: get ready for const netdev->dev_addr 2021-10-24 13:59:45 +01:00
macvtap.c net: macvtap: fix template string argument of device_create() call 2021-10-16 08:51:21 +01:00
Makefile amt: add control plane of amt interface 2021-11-01 13:36:08 +00:00
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c net: sb1000,rionet: use eth_hw_addr_set() 2021-10-22 10:16:16 -07:00
sb1000.c net: sb1000,rionet: use eth_hw_addr_set() 2021-10-22 10:16:16 -07:00
Space.c
sungem_phy.c net: sungem_phy: fix code indentation 2021-11-09 11:45:54 +00:00
tap.c
thunderbolt.c net: thunderbolt: use eth_hw_addr_set() 2021-10-27 17:13:36 -07:00
tun.c tun: fix bonding active backup with arp monitoring 2021-11-15 13:00:26 +00:00
veth.c
virtio_net.c vhost,virtio,vhost: fixes,features 2021-11-03 15:00:39 -07:00
vrf.c vrf: run conntrack only in context of lower/physdev for locally generated packets 2021-10-26 13:21:10 +01:00
vsockmon.c
vxlan.c
xen-netfront.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-28 10:43:58 -07:00