nfp: nsp: allow the use of DMA buffer
authorJakub Kicinski <jakub.kicinski@netronome.com>
Wed, 27 Feb 2019 04:19:32 +0000 (20:19 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 1 Mar 2019 19:36:01 +0000 (11:36 -0800)
commit345415138d15a42460edb42423c67644ec8bb4a1
tree01bc95930ecb793a8c6133e368b7e411d4fee6d1
parent66487abe2f02fb7d7fa72c6002eacb13c54c5b6c
nfp: nsp: allow the use of DMA buffer

Newer versions of NSP can access host memory.  Simplest access
type requires all data to be in one contiguous area.  Since we
don't have the guarantee on where callers of the NSP ABI will
allocate their buffers we allocate a bounce buffer and copy
the data in and out.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nsp.c