# 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 
- List: netdev
- Page: https://ratatoskr.run/netdev/2025/08/11334207
- Thread: https://ratatoskr.run/netdev/2025/08/11334011/t.md

```text


On 10.08.25 16:00, Dust Li wrote:
> On 2025-08-06 17:41:09, Alexandra Winter wrote:
[...]
>>
>> 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?
```
