Re: [PATCH 2/4] net/smc: Add netlink net namespace support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/01/2022 01:24, Dmitry V. Levin wrote:
> On Tue, Dec 28, 2021 at 09:06:10PM +0800, Tony Lu wrote:
>> This adds net namespace ID to diag of linkgroup, helps us to distinguish
>> different namespaces, and net_cookie is unique in the whole system.
>>
> 
> I'm sorry but this is an ABI regression.
> 
> Since struct smc_diag_lgrinfo contains an object of type "struct smc_diag_linkinfo",
> offset of all subsequent members of struct smc_diag_lgrinfo is changed by
> this patch.
> 
> As result, applications compiled with the old version of struct smc_diag_linkinfo
> will receive garbage in struct smc_diag_lgrinfo.role if the kernel implements
> this new version of struct smc_diag_linkinfo.
> 

Good catch! This patch adds 2 ways to provide the net_cookie to user space, one is over the new
netlink interface, and the other is using the old smc_diag way. 
Imho to use the new netlink interface is good enough, there is no need to touch the smc_diag ABI.
We already started adding new fields to the netlink interface only, this flexibility is 
the reason why we added this interface initially.

So a patch that removes
	__aligned_u64	net_cookie;
and
	.lnk[0].net_cookie = net->net_cookie,
should solve the issue. 

Thoughts?



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux