From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 243251E282D for ; Tue, 7 Jan 2025 08:44:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736239484; cv=none; b=YJCrj28A08fiTwW3a291CMQtO/DXouesHb9T38EOb5wyhStxae53ywhz/NesHvRcPQck93Ag6nzON25RL4ypvRvrKTD4QYX3QyCTFiJUL+zakaPhDpw/RfbgpXOLldtCWs7ZMx12GIYcpmaNQIiwmUydKH1v+5pc1hIQFT3bee8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736239484; c=relaxed/simple; bh=9z4E307FEw5yEmX/R4lxvUrMV7D0T547+CC68yqF1tw=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=lEXwbUviveff3fThwUaIdSvI+1Vc7OS6bxN3NC62k8pkyl9vysoB7MH5Yq5CkZtviO/51L0J4phVcJRmnzpkx2mwc0/NbVHX9jFyT35DLHnOZ2m1u9sUX3/nR7IdgpJu18DDCp5iwxgxO+XmsycsbOhSwW8QlJYV3AwweId0pGo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WKS2nj5u; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WKS2nj5u" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1736239478; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vHBnQGum4M7ipVuexTEpYGlSJHQu9KV4nhMGzektAi0=; b=WKS2nj5utW8FxNCxFWLMIt+HxV0Kt41NGvrVok0O9jssS32vBhz1dW20/ugOFK0auLBDcu bENPn+Eoa/BC0fbfH1S2CgCuzeuhO2hS/g+0vxM97/qqGgQs9QQv5DCLCl7Vest8tSUIxI 2jpTf0U5zuTZ7WofTgcIY93iuJpCYIQ= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-544-QrN3MCD-NWCZ1UZ3pzRwDA-1; Tue, 07 Jan 2025 03:44:35 -0500 X-MC-Unique: QrN3MCD-NWCZ1UZ3pzRwDA-1 X-Mimecast-MFC-AGG-ID: QrN3MCD-NWCZ1UZ3pzRwDA Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7b6e5c9ef38so2528574885a.1 for ; Tue, 07 Jan 2025 00:44:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736239475; x=1736844275; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=vHBnQGum4M7ipVuexTEpYGlSJHQu9KV4nhMGzektAi0=; b=uP+MNBAKtmDHLHH6I1Tza1ZU1y+uzuOYCjuIN6Vw+mfL9WpLkVAtAheoHQwYt1jQCn nQQ+GijpDFMGe60zDe7I5S71KBp/Fs5SCEDb2VvRd0kYepW/WoMcw1B00yMM4/8fBw2b 1UivPKPlmymZkqhDGh/sMi9DVfcZfAjAjDSX51pXTwZejB+vlmcCgioZnWmO0FjtFk03 MjgkDmcrxbKZ+z7o9HtKWtdNmWF0gRbPgtuONz8MxfiqP37cjXOiINQc7Ojp9hhaEYeM IcsEHzmjhiy8cHhP2I1oiigJgkzUzfImdfKxkjCVBpGJ+IJvcz/6aWseI28ck59zfWYE KOjA== X-Forwarded-Encrypted: i=1; AJvYcCXXgzMZ+jJa+fHS67jbfcE3wLyMBcu8Bh4EA2Cx06YUHLYNLItAPvFIhTlzktxDXBspzKUbZvd2//7mVjc=@vger.kernel.org X-Gm-Message-State: AOJu0YwNeksvPDYY4MHeVYCKxrr5eRiAnU2olACy9q7jRJ20a7/LUYFB qMu/pscQ/AmOeSXWOT0ntC+uOmbArXZX1IaoscChcKT0uCuURzSQ7mG9vtEvyQu/iSPBGQkdR5s UJ6pL3U/ssYgkTFcECWjUP+SdvAt0mckKM8jgeMcuneQH3i0PuhR2XM9RAvF6eg== X-Gm-Gg: ASbGncvhHeCdNAMBnukfp3001jKme86d8jynx1cy7V9rZDGS0Nh/B6vieqeDcx74R9p ubz2IJMPdW6naCAZ+5pup9HqojlHycCZqk2FxYEahmpmc0mY0xdOF0ArZzOExy6ikA23uCVtQhN DMb9VAhPt/ZWPlYfWB0rogHl+grreQCKL/Zp4tZdBSA37f23BRQwBauQiePjuZXEpYZ1bp13Z+h ozBFga+Ir7hJoqD9zZd+BnqFD5mBrVtABaV/j4rRjCs9tF9yOScLgVFlzBibv60oWRuG31gadj/ jbCi0Q== X-Received: by 2002:a05:620a:2a03:b0:7b6:eba3:2dfb with SMTP id af79cd13be357-7bb9027dc9cmr357934685a.16.1736239475068; Tue, 07 Jan 2025 00:44:35 -0800 (PST) X-Google-Smtp-Source: AGHT+IEQCMcAkJhmI/CqAK5HFPejGMDCVtbEjbyNYs7SJgbt11nVHwRNfhnAYo5Ac+BtyoR7P+tihQ== X-Received: by 2002:a05:620a:2a03:b0:7b6:eba3:2dfb with SMTP id af79cd13be357-7bb9027dc9cmr357932985a.16.1736239474732; Tue, 07 Jan 2025 00:44:34 -0800 (PST) Received: from [192.168.88.253] (146-241-73-5.dyn.eolo.it. [146.241.73.5]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7b9ac2e6587sm1573880685a.48.2025.01.07.00.44.31 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Jan 2025 00:44:34 -0800 (PST) Message-ID: <1f4a721f-fa23-4f1d-97a9-1b27bdcd1e21@redhat.com> Date: Tue, 7 Jan 2025 09:44:30 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net] net/smc: use the correct ndev to find pnetid by pnetid table To: Guangguan Wang , wenjia@linux.ibm.com, jaka@linux.ibm.com, PASIC@de.ibm.com, alibuda@linux.alibaba.com, tonylu@linux.alibaba.com, guwen@linux.alibaba.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, horms@kernel.org Cc: linux-rdma@vger.kernel.org, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20241227040455.91854-1-guangguan.wang@linux.alibaba.com> Content-Language: en-US From: Paolo Abeni In-Reply-To: <20241227040455.91854-1-guangguan.wang@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 12/27/24 5:04 AM, Guangguan Wang wrote: > The command 'smc_pnet -a -I ' will add > to the pnetid table and will attach the to net device > whose name is . But When do SMCR by , in function > smc_pnet_find_roce_by_pnetid, it will use 's base ndev's > pnetid to match rdma device, not '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 to the 's base ndev > when finding pnetid by pnetid table. It seems a mistake. > > This patch changes the ndev back to the when finding pnetid > by pnetid table. > > Fixes: 890a2cb4a966 ("net/smc: rework pnet table") > Signed-off-by: Guangguan Wang 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