]> git.baikalelectronics.ru Git - kernel.git/commit
net: netsec: Correct dma sync for XDP_TX frames
authorIlias Apalodimas <ilias.apalodimas@linaro.org>
Wed, 16 Oct 2019 11:40:32 +0000 (14:40 +0300)
committerDavid S. Miller <davem@davemloft.net>
Thu, 17 Oct 2019 19:35:56 +0000 (15:35 -0400)
commit9f8a9db2ae3aa430693b70d5092decc6690f7fbd
treec90fa3c1f00577454c6abed18e1a931b6832f1a6
parent29e5977a4d5c2ae0df1fb380ba9d21bbf7d57a62
net: netsec: Correct dma sync for XDP_TX frames

bpf_xdp_adjust_head() can change the frame boundaries. Account for the
potential shift properly by calculating the new offset before
syncing the buffer to the device for XDP_TX

Fixes: 859b6a764de5 ("net: netsec: add XDP support")
Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/socionext/netsec.c