lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aJimDiQupacKNR8M@linux.alibaba.com>
Date: Sun, 10 Aug 2025 22:00:46 +0800
From: Dust Li <dust.li@...ux.alibaba.com>
To: Alexandra Winter <wintera@...ux.ibm.com>,
	David Miller <davem@...emloft.net>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Eric Dumazet <edumazet@...gle.com>,
	Andrew Lunn <andrew+netdev@...n.ch>,
	"D. Wythe" <alibuda@...ux.alibaba.com>,
	Sidraya Jayagond <sidraya@...ux.ibm.com>,
	Wenjia Zhang <wenjia@...ux.ibm.com>,
	Julian Ruess <julianr@...ux.ibm.com>
Cc: netdev@...r.kernel.org, linux-s390@...r.kernel.org,
	Heiko Carstens <hca@...ux.ibm.com>,
	Vasily Gorbik <gor@...ux.ibm.com>,
	Alexander Gordeev <agordeev@...ux.ibm.com>,
	Christian Borntraeger <borntraeger@...ux.ibm.com>,
	Sven Schnelle <svens@...ux.ibm.com>,
	Thorsten Winkler <twinkler@...ux.ibm.com>,
	Simon Horman <horms@...nel.org>,
	Mahanta Jambigi <mjambigi@...ux.ibm.com>,
	Tony Lu <tonylu@...ux.alibaba.com>,
	Wen Gu <guwen@...ux.alibaba.com>, Halil Pasic <pasic@...ux.ibm.com>,
	linux-rdma@...r.kernel.org
Subject: Re: [RFC net-next 04/17] net/smc: Decouple sf and attached send_buf
 in smc_loopback

On 2025-08-06 17:41:09, Alexandra Winter wrote:
>Before this patch there was the following assumption in
>smc_loopback.c>smc_lo_move_data():
>sf (signalling flag) == 0 : data is already in an attached target dmb
>sf == 1 : data is not yet in the target dmb
>
>This is true for the 2 callers in smc client
>smcd_cdc_msg_send() : sf=1
>smcd_tx_rdma_writes() : sf=0
>but should not be a general assumption.
>
>Add a bool to struct smc_buf_desc to indicate whether an SMC-D sndbuf_desc
>is an attached buffer. Don't call move_data() for attached send_buffers,
>because it is not necessary.
>
>Move the data in smc_lo_move_data() if len != 0 and signal when requested.
>
>Signed-off-by: Alexandra Winter <wintera@...ux.ibm.com>
>Reviewed-by: Mahanta Jambigi <mjambigi@...ux.ibm.com>
>---
> net/smc/smc_core.h     | 5 +++++
> net/smc/smc_ism.c      | 1 +
> net/smc/smc_loopback.c | 9 +++------
> net/smc/smc_tx.c       | 3 +++
> 4 files changed, 12 insertions(+), 6 deletions(-)
>
>diff --git a/net/smc/smc_core.h b/net/smc/smc_core.h
>index 48a1b1dcb576..fe5f48d14323 100644
>--- a/net/smc/smc_core.h
>+++ b/net/smc/smc_core.h
>@@ -13,6 +13,7 @@
> #define _SMC_CORE_H
> 
> #include <linux/atomic.h>
>+#include <linux/types.h>
> #include <linux/smc.h>
> #include <linux/pci.h>
> #include <rdma/ib_verbs.h>
>@@ -221,12 +222,16 @@ struct smc_buf_desc {
> 					/* virtually contiguous */
> 		};
> 		struct { /* SMC-D */
>+			 /* SMC-D rx buffer: */
> 			unsigned short	sba_idx;
> 					/* SBA index number */
> 			u64		token;
> 					/* DMB token number */
> 			dma_addr_t	dma_addr;
> 					/* DMA address */
>+			/* SMC-D tx buffer */
>+			bool		is_attached;
>+					/* no need for explicit writes */

Reviewed-by: Dust Li <dust.li@...ux.alibaba.com>

A small sugguestion: there is a hole between sba_idx and token, we can
put is_attached in that hole.
Not a big deal because this is a union and SMC-R use a much large space.

Best regards,
Dust


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ