]> 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)
commit127c8889cf84ed182e30b1a0068946f6f9e05e93
tree491fddcdad6232e9bfe119624760f5fe4776608e
parent98538ea77a48b21595e6d047d3eeeb62f09185f3
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