]> git.baikalelectronics.ru Git - kernel.git/commit
nfp: make use of the DMA_ATTR_SKIP_CPU_SYNC attr
authorJakub Kicinski <jakub.kicinski@netronome.com>
Sun, 23 Apr 2017 03:17:52 +0000 (20:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 Apr 2017 18:35:44 +0000 (14:35 -0400)
commit2eb609cb4f7f4cbecf16b8dff860872e4f7a4f4e
tree491fddcdad6232e9bfe119624760f5fe4776608e
parent1c175c8daad7fb162467035f3017a6ecff5a5492
nfp: make use of the DMA_ATTR_SKIP_CPU_SYNC attr

DMA unmap may destroy changes CPU made to the buffer.  To make XDP
run correctly on non-x86 platforms we should use the
DMA_ATTR_SKIP_CPU_SYNC attribute.

Thanks to using the attribute we can now push the sync operation to the
common code path from XDP handler.

A little bit of variable name reshuffling is required to bring the
code back to readable state.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfp_net_common.c