Message ID | 2c6e99846828f7c409ec641ce047e810b89c7130.1660152975.git.alibuda@linux.alibaba.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | net/smc: optimize the parallelism of SMC-R connections | expand |
diff --git a/net/smc/smc_core.c b/net/smc/smc_core.c index b90970a..7d42125 100644 --- a/net/smc/smc_core.c +++ b/net/smc/smc_core.c @@ -1406,8 +1406,9 @@ static void smcr_buf_unuse(struct smc_buf_desc *buf_desc, bool is_rmb, smc_buf_free(lgr, is_rmb, buf_desc); } else { - buf_desc->used = 0; - memset(buf_desc->cpu_addr, 0, buf_desc->len); + /* memzero_explicit provides potential memory barrier semantics */ + memzero_explicit(buf_desc->cpu_addr, buf_desc->len); + WRITE_ONCE(buf_desc->used, 0); } }