]> git.baikalelectronics.ru Git - kernel.git/commit
qede: Support XDP adjustment of headers
authorMintz, Yuval <Yuval.Mintz@cavium.com>
Fri, 7 Apr 2017 08:05:01 +0000 (11:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 7 Apr 2017 13:26:14 +0000 (06:26 -0700)
commit08dae8e3528db8536bf5c755792244619d9481c0
treefd69702322ca50528093e42bd87167809e3f3c5e
parent0ade36bb790ed60d40b2f1df6fc9325fd0eb4b3e
qede: Support XDP adjustment of headers

In case an XDP program is attached, reserve XDP_PACKET_HEADROOM
bytes at the beginning of the packet for the program to play
with.

Modify the XDP logic in the driver to fill-in the missing bits
and re-calculate offsets and length after the program has finished
running to properly reflect the current status of the packet.

We can then go and remove the limitation of not supporting XDP programs
where xdp_adjust_head is set.

Signed-off-by: Yuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qede/qede_filter.c
drivers/net/ethernet/qlogic/qede/qede_fp.c
drivers/net/ethernet/qlogic/qede/qede_main.c