[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1f4a721f-fa23-4f1d-97a9-1b27bdcd1e21@redhat.com>
Date: Tue, 7 Jan 2025 09:44:30 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Guangguan Wang <guangguan.wang@...ux.alibaba.com>, wenjia@...ux.ibm.com,
jaka@...ux.ibm.com, PASIC@...ibm.com, alibuda@...ux.alibaba.com,
tonylu@...ux.alibaba.com, guwen@...ux.alibaba.com, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, horms@...nel.org
Cc: linux-rdma@...r.kernel.org, linux-s390@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net/smc: use the correct ndev to find pnetid by
pnetid table
On 12/27/24 5:04 AM, Guangguan Wang wrote:
> The command 'smc_pnet -a -I <ethx> <pnetid>' will add <pnetid>
> to the pnetid table and will attach the <pnetid> to net device
> whose name is <ethx>. But When do SMCR by <ethx>, in function
> smc_pnet_find_roce_by_pnetid, it will use <ethx>'s base ndev's
> pnetid to match rdma device, not <ethx>'s pnetid. The asymmetric
> use of the pnetid seems weird. Sometimes it is difficult to know
> the hierarchy of net device what may make it difficult to configure
> the pnetid and to use the pnetid. Looking into the history of
> commit, it was the commit 890a2cb4a966 ("net/smc: rework pnet table")
> that changes the ndev from the <ethx> to the <ethx>'s base ndev
> when finding pnetid by pnetid table. It seems a mistake.
>
> This patch changes the ndev back to the <ethx> when finding pnetid
> by pnetid table.
>
> Fixes: 890a2cb4a966 ("net/smc: rework pnet table")
> Signed-off-by: Guangguan Wang <guangguan.wang@...ux.alibaba.com>
If I read correctly, this will break existing applications using the
lookup schema introduced by the blamed commit - which is not very recent.
Perhaps for a net patch would be better to support both lookup schemas i.e.
(smc_pnet_find_ndev_pnetid_by_table(ndev, ndev_pnetid) ||
smc_pnet_find_ndev_pnetid_by_table(base_ndev, ndev_pnetid))
?
Thanks,
Paolo
Powered by blists - more mailing lists