Re: [RFC net-next 04/17] net/smc: Decouple sf and attached send_buf in smc_loopback

From
Alexandra Winter <wintera@linux.ibm.com>
Date
2025-08-11 11:35:59
Also in
linux-rdma, linux-s390
Reply to
Dust Li, 2025-08-10

On 10.08.25 16:00, Dust Li wrote:
On 2025-08-06 17:41:09, Alexandra Winter wrote:
[...]
quoted
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@linux.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
Thank you very much for your throrough reviews of this series, Dust.

I put 'bool is_attached' in this place, so I could add the comments about which members
are used for rx-buffers and which for tx-buffers.
I find the struct smc_buf_desc a bit confusing and thought these comments would be helpful.
Is it ok for you to leave it that way?
Thread (48 messages) 48 messages, 4 authors, last reply 2025-09-01
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help