diff options
author | Christoph Hellwig <hch@lst.de> | 2020-06-29 16:03:57 +0300 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-06-30 16:44:03 +0300 |
commit | 91d5b70273267bbae6f5d1fb4cf3510bd31ef9ff (patch) | |
tree | 9996f407555352be8720dc5773552e813f509a19 /include/net/xsk_buff_pool.h | |
parent | 3aa91625007807bfca4155df1867a5c924a08662 (diff) | |
download | linux-91d5b70273267bbae6f5d1fb4cf3510bd31ef9ff.tar.xz |
xsk: Replace the cheap_dma flag with a dma_need_sync flag
Invert the polarity and better name the flag so that the use case is
properly documented.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/20200629130359.2690853-3-hch@lst.de
Diffstat (limited to 'include/net/xsk_buff_pool.h')
-rw-r--r-- | include/net/xsk_buff_pool.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/xsk_buff_pool.h b/include/net/xsk_buff_pool.h index a4ff226505c9..6842990e2712 100644 --- a/include/net/xsk_buff_pool.h +++ b/include/net/xsk_buff_pool.h @@ -40,7 +40,7 @@ struct xsk_buff_pool { u32 headroom; u32 chunk_size; u32 frame_len; - bool cheap_dma; + bool dma_need_sync; bool unaligned; void *addrs; struct device *dev; @@ -80,7 +80,7 @@ static inline dma_addr_t xp_get_frame_dma(struct xdp_buff_xsk *xskb) void xp_dma_sync_for_cpu_slow(struct xdp_buff_xsk *xskb); static inline void xp_dma_sync_for_cpu(struct xdp_buff_xsk *xskb) { - if (xskb->pool->cheap_dma) + if (!xskb->pool->dma_need_sync) return; xp_dma_sync_for_cpu_slow(xskb); @@ -91,7 +91,7 @@ void xp_dma_sync_for_device_slow(struct xsk_buff_pool *pool, dma_addr_t dma, static inline void xp_dma_sync_for_device(struct xsk_buff_pool *pool, dma_addr_t dma, size_t size) { - if (pool->cheap_dma) + if (!pool->dma_need_sync) return; xp_dma_sync_for_device_slow(pool, dma, size); |