Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp459041rdh; Tue, 19 Dec 2023 04:23:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IGr3n0hPyqY2IrF0MHxo4Lnz7aqw4jkVKmpgPpKQXpRquZ08O3mwOOT7S/p6tIzQDHCGF+c X-Received: by 2002:a17:906:14d:b0:a17:da84:a24d with SMTP id 13-20020a170906014d00b00a17da84a24dmr9880690ejh.22.1702988608355; Tue, 19 Dec 2023 04:23:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702988608; cv=none; d=google.com; s=arc-20160816; b=Ql8yMaYXgE4x7p8M5MhO78Xpxbevo6Qq2UkAf7sp53paj8ifn+Fgwwy+29zK8FId9+ VFdJzqF+3UVqZozZl6mQ2UO4XBsYGJXkx0WmbLUEJzpzfUamQXsBaFyfK9NU/zS5hbDy odoUmbVUaUsJs2zWbkvh03n5q02Dv0tuQi2HME66wOGAXFT6IQBL5nrmQGwSmTDZQ1v1 /OkPxYJPiriMBzKXCYkhSuIyyTNb8lzmr/zQAxBYBdPEIwU/uOHBcDTBruQsiOX9PnIC PR+oJEZ56G1zMS4WftGyYnVFimI2t4UcF43sadFW2Mes3dlMpxx60Y7xYIqh8a/CNjpm fdDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to:subject :user-agent:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:date:message-id; bh=63yh6MdAOIV2ScsJOk+OS7MuwqMs07Ub6P3LOZZcmwI=; fh=ZvMDBCY57MMGeptgJLOJ/iS2tPf5+hDl/Ij5I1cKCrA=; b=PaN9hLwLhpXkCtSxgBzzIwVYu2VDFS6rISFpXsrNE1i+DiBqkdYEQXUjFWAowE1MGO U70ge7QrlAOFbPmFX7Pd8JxctoLQdkVieWIAEYiZZ1LHOY9+8iidaxqiV6lYXOq9Tsh/ IWyT10d7NE1BLZnJOXcQE1nL36XMv89aSDcpzgKr2GtNgaU2XggkrKKHXN2boA62Gbr2 ny/6DPH6/Rl9aDpSZnxE/2NZFF/UL2Cp8EZhUI6GaR4lwyMBclO50CzPNYcvkX0Xe+Fz 771AUc/Tal0h/G/6Ep9VNU7SrmieUACFEUbtFJZX7B2gfRtK3TrP6QeRMb7m0VEDYdxu BNvQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5160-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5160-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id r5-20020a170906a20500b00a1b150a9747si10645232ejy.28.2023.12.19.04.23.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 04:23:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5160-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-5160-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5160-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 1997A1F240F5 for ; Tue, 19 Dec 2023 12:23:28 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E635018AE0; Tue, 19 Dec 2023 12:22:45 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from out30-100.freemail.mail.aliyun.com (out30-100.freemail.mail.aliyun.com [115.124.30.100]) (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 A311D18E16; Tue, 19 Dec 2023 12:22:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R191e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=guwen@linux.alibaba.com;NM=1;PH=DS;RN=22;SR=0;TI=SMTPD_---0Vyqx4q8_1702988557; Received: from 30.221.130.243(mailfrom:guwen@linux.alibaba.com fp:SMTPD_---0Vyqx4q8_1702988557) by smtp.aliyun-inc.com; Tue, 19 Dec 2023 20:22:38 +0800 Message-ID: Date: Tue, 19 Dec 2023 20:22:34 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH net-next v7 07/10] net/smc: compatible with 128-bits extended GID of virtual ISM device To: Simon Horman Cc: wintera@linux.ibm.com, wenjia@linux.ibm.com, hca@linux.ibm.com, gor@linux.ibm.com, agordeev@linux.ibm.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, kgraul@linux.ibm.com, jaka@linux.ibm.com, borntraeger@linux.ibm.com, svens@linux.ibm.com, alibuda@linux.alibaba.com, tonylu@linux.alibaba.com, raspl@linux.ibm.com, schnelle@linux.ibm.com, guangguan.wang@linux.alibaba.com, linux-s390@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org References: <20231219084536.8158-1-guwen@linux.alibaba.com> <20231219084536.8158-8-guwen@linux.alibaba.com> <20231219115952.GL811967@kernel.org> From: Wen Gu In-Reply-To: <20231219115952.GL811967@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2023/12/19 19:59, Simon Horman wrote: > On Tue, Dec 19, 2023 at 04:45:33PM +0800, Wen Gu wrote: >> According to virtual ISM support feature defined by SMCv2.1, GIDs of >> virtual ISM device are UUIDs defined by RFC4122, which are 128-bits >> long. So some adaptation work is required. And note that the GIDs of >> existing platform firmware ISM devices still remain 64-bits long. >> >> Signed-off-by: Wen Gu >> Reviewed-by: Alexandra Winter > > ... > >> @@ -1023,9 +1041,12 @@ smcd_clc_prep_confirm_accept(struct smc_connection *conn, >> if (version == SMC_V1) { >> clc->hdr.length = htons(SMCD_CLC_ACCEPT_CONFIRM_LEN); >> } else { >> - clc->d1.chid = htons(smc_ism_get_chid(smcd)); >> + chid = smc_ism_get_chid(smcd); >> + clc->d1.chid = htons(chid); >> if (eid && eid[0]) >> memcpy(clc->d1.eid, eid, SMC_MAX_EID_LEN); >> + if (__smc_ism_is_virtual(chid)) >> + clc->d1.gid_ext = htonll(smcd_gid.gid_ext); > > Hi Wen Gu, > > The type of clc->d1.gid_ext is u64 (host byte-order) > but here it is being assigned a big endian value. > This does not seem correct. > > Flagged by Smatch. Oh, thank you Simon! That's a regression. I mistakenly changed the type to u64 instead of __be64 in previous versions when fixing conflicts. Thank you very much for the catch. > >> len = SMCD_CLC_ACCEPT_CONFIRM_LEN_V2; >> if (first_contact) { >> *fce_len = smc_clc_fill_fce_v2x(fce_v2x, ini); > > ... >