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)
commit5cd4fbeab21b89e08df4590b2020f2e5f60c0d19
tree491fddcdad6232e9bfe119624760f5fe4776608e
parent0d688a0d337628ded9bb05c99f35fac7424af4f8
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