aboutsummaryrefslogtreecommitdiffstats
path: root/net/smc/smc_core.h
diff options
context:
space:
mode:
authorGuangguan Wang <guangguan.wang@linux.alibaba.com>2022-07-14 17:44:01 +0800
committerDavid S. Miller <davem@davemloft.net>2022-07-18 11:19:17 +0100
commit0ef69e788411cba2af017db731a9fc62d255e9ac (patch)
tree4eef442d258216d382747071b839592992519931 /net/smc/smc_core.h
parentnet/smc: remove redundant dma sync ops (diff)
downloadlinux-dev-0ef69e788411cba2af017db731a9fc62d255e9ac.tar.xz
linux-dev-0ef69e788411cba2af017db731a9fc62d255e9ac.zip
net/smc: optimize for smc_sndbuf_sync_sg_for_device and smc_rmb_sync_sg_for_cpu
Some CPU, such as Xeon, can guarantee DMA cache coherency. So it is no need to use dma sync APIs to flush cache on such CPUs. In order to avoid calling dma sync APIs on the IO path, use the dma_need_sync to check whether smc_buf_desc needs dma sync when creating smc_buf_desc. Signed-off-by: Guangguan Wang <guangguan.wang@linux.alibaba.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/smc/smc_core.h')
-rw-r--r--net/smc/smc_core.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h
index c441dfeefa02..46ddec5f1edc 100644
--- a/net/smc/smc_core.h
+++ b/net/smc/smc_core.h
@@ -180,6 +180,7 @@ struct smc_buf_desc {
/* mem region registered */
u8 is_map_ib[SMC_LINKS_PER_LGR_MAX];
/* mem region mapped to lnk */
+ u8 is_dma_need_sync;
u8 is_reg_err;
/* buffer registration err */
};