linux-bl808/drivers/net/ethernet
Jesper Dangaard Brouer d4ecdbf7aa ice: Add XDP frame size to driver
This driver uses different memory models depending on PAGE_SIZE at
compile time. For PAGE_SIZE 4K it uses page splitting, meaning for
normal MTU frame size is 2048 bytes (and headroom 192 bytes). For
larger MTUs the driver still use page splitting, by allocating
order-1 pages (8192 bytes) for RX frames. For PAGE_SIZE larger than
4K, driver instead advance its rx_buffer->page_offset with the frame
size "truesize".

For XDP frame size calculations, this mean that in PAGE_SIZE larger
than 4K mode the frame_sz change on a per packet basis. For the page
split 4K PAGE_SIZE mode, xdp.frame_sz is more constant and can be
updated once outside the main NAPI loop.

The default setting in the driver uses build_skb(), which provides
the necessary headroom and tailroom for XDP-redirect in RX-frame
(in both modes).

There is one complication, which is legacy-rx mode (configurable via
ethtool priv-flags). There are zero headroom in this mode, which is a
requirement for XDP-redirect to work. The conversion to xdp_frame
(convert_to_xdp_frame) will detect this insufficient space, and
xdp_do_redirect() call will fail. This is deemed acceptable, as it
allows other XDP actions to still work in legacy-mode. In
legacy-mode + larger PAGE_SIZE due to lacking tailroom, we also
accept that xdp_adjust_tail shrink doesn't work.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Cc: intel-wired-lan@lists.osuosl.org
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Alexander Duyck <alexander.duyck@gmail.com>
Link: https://lore.kernel.org/bpf/158945347002.97035.328088795813704587.stgit@firesoul
2020-05-14 21:21:56 -07:00
..
3com
8390
adaptec
aeroflex
agere
alacritech
allwinner
alteon
altera
amazon ena: Add XDP frame size to amazon NIC driver 2020-05-14 21:21:55 -07:00
amd net: atarilance: Replace zero-length array with flexible-array 2020-05-11 13:18:54 -07:00
apm
apple
aquantia net: atlantic: unify MAC generation 2020-05-09 11:47:25 -07:00
arc
atheros
aurora
broadcom bnxt: Add XDP frame size to driver 2020-05-14 21:21:54 -07:00
brocade
cadence
calxeda
cavium net: thunderx: Add XDP frame size 2020-05-14 21:21:55 -07:00
chelsio
cirrus
cisco
cortina
davicom
dec
dlink
emulex
ezchip
faraday
freescale dpaa2-eth: Add XDP frame size 2020-05-14 21:21:54 -07:00
fujitsu
google
hisilicon net: hns3: remove unnecessary frag list checking in hns3_nic_net_xmit() 2020-05-14 13:18:10 -07:00
huawei hinic: add set_ringparam ethtool_ops support 2020-05-14 17:38:19 -07:00
i825xx
ibm
intel ice: Add XDP frame size to driver 2020-05-14 21:21:56 -07:00
marvell mvneta: Add XDP frame size to driver 2020-05-14 21:21:54 -07:00
mediatek
mellanox mlx4: Add XDP frame size and adjust max XDP MTU 2020-05-14 21:21:55 -07:00
micrel
microchip
moxa
mscc
myricom
natsemi
neterion
netronome nfp: Add XDP frame size to netronome driver 2020-05-14 21:21:55 -07:00
ni
nvidia
nxp
oki-semi
packetengines
pasemi
pensando ionic: add more ethtool stats 2020-05-12 12:19:30 -07:00
qlogic qlogic/qede: Add XDP frame size to driver 2020-05-14 21:21:55 -07:00
qualcomm
rdc
realtek r8169: don't include linux/moduleparam.h 2020-05-14 18:03:01 -07:00
renesas
rocker
samsung
seeq
sfc sfc: Add XDP frame size 2020-05-14 21:21:54 -07:00
sgi
silan
sis
smsc
socionext net: netsec: Add support for XDP frame size 2020-05-14 21:21:54 -07:00
stmicro net: stmmac: dwmac-meson8b: add support for the RX delay configuration 2020-05-13 12:23:14 -07:00
sun
synopsys
tehuti
ti net: ethernet: ti: Add XDP frame size to driver cpsw 2020-05-14 21:21:55 -07:00
toshiba
tundra
via
wiznet
xilinx
xircom
xscale
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig
korina.c
lantiq_etop.c
lantiq_xrx200.c
Makefile