mirror-linux/drivers/net
Maxim Mikityanskiy fa5573359a net/mlx5e: xsk: Use XSK frame size as striding RQ page size
XSK RQs support striding RQ linear mode, but the stride size is always
set to PAGE_SIZE. It may be larger than the XSK frame size,
unnecessarily reducing the useful space in a WQE, but more importantly
causing UMEM data corruption in certain cases.

Normally, stride size bigger than XSK frame size is not a problem if the
hardware enforces the MTU. However, traffic between vports skips the
hardware MTU check, and oversized packets may be received.

If an oversized packet is bigger than the XSK frame but not bigger than
the stride, it will cause overwriting of the adjacent UMEM region. If
the packet takes more than one stride, they can be recycled for reuse
so it's not a problem when the XSK frame size matches the stride size.

To reduce the impact of the above issue, attempt to use the MTT page
size for striding RQ that matches the XSK frame size, allowing to safely
use 2048-byte frames on an up-to-date firmware.

Signed-off-by: Maxim Mikityanskiy <maximmi@nvidia.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2022-09-30 07:55:45 -07:00
..
appletalk
arcnet
bonding net: bonding: Convert to use sysfs_emit()/sysfs_emit_at() APIs 2022-09-30 12:29:45 +01:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-29 14:30:51 -07:00
dsa net: dsa: hellcreek: Offload per-tc max SDU from tc-taprio 2022-09-29 18:52:06 -07:00
ethernet net/mlx5e: xsk: Use XSK frame size as striding RQ page size 2022-09-30 07:55:45 -07:00
fddi
fjes net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
hamradio
hippi net: hippi: Add missing pci_disable_device() in rr_init_one() 2022-09-26 13:22:39 -07:00
hyperv net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
ieee802154
ipa net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
ipvlan
mctp
mdio
netdevsim
pcs
phy net: phy: Convert to use sysfs_emit() APIs 2022-09-29 19:19:41 -07:00
plip
ppp
slip
team
usb Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-09-29 14:30:51 -07:00
vmxnet3 net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
vxlan
wan
wireguard net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
wireless net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
wwan wwan_hwsim: Use skb_put_data() instead of skb_put/memcpy pair 2022-09-29 09:37:40 +02:00
xen-netback net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c macsec: don't free NULL metadata_dst 2022-09-26 09:39:30 -07:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
thunderbolt.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
tun.c net: tun: Convert to use sysfs_emit() APIs 2022-09-30 12:27:43 +01:00
veth.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
virtio_net.c
vrf.c
vsockmon.c
xen-netfront.c net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00