Received: by 2002:a05:7412:d002:b0:f9:9049:d2ea with SMTP id bd2csp17096rdb; Wed, 20 Dec 2023 02:35:58 -0800 (PST) X-Google-Smtp-Source: AGHT+IF5ev5ZS532uFBqW4crJiRr1SOpgv25IH1Or9e5R8iWByIfJIb5KGRibAllJ5rS3lAvuK84 X-Received: by 2002:a17:902:7d8e:b0:1d3:45b7:bc09 with SMTP id a14-20020a1709027d8e00b001d345b7bc09mr12183953plm.55.1703068557977; Wed, 20 Dec 2023 02:35:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703068557; cv=none; d=google.com; s=arc-20160816; b=gTZCzIuAlC/gu3tn838U6hh06eGtK52HgrZYBgE1OsxX1BGPS4TDb1Z8Snx/Q1HTFM LK5Cvu2P3UJ+6u3h+Sd4OFpmo7zKpZymCeiQG6KgcwikkrKJ8PrigBP6wENci7OBBwIN vUaLYEW3itvTvOTeyDbP4/pr8hL3nRztPokjL0ST/5WeR2nM6nmJO4QCBJ0u9cM4VtE+ IMNbQT60/qRRl/q5pJSSpq/Ov+JfJ2QisbY3LYfn/iP0sJYg1z3E6AyYm9QRNWNJhw4t nfJJqPKRSxrzDIjXoC8RhIz9HDSrivCmjTPeXlcUKw2p2p5+AEw9W6VuMNddjPupmqR0 q1rw== 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:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=iwWma8cZ9aS71ZfZwoeukmPm1JcbbrlRzgqA4zD+xZQ=; fh=gw7RsEhir4YuatMdcEAK+zHdBggkI+VJgPHYCvUZfrY=; b=Z06gH5nCJSpaaFc9b04n3NxinO8zvwS2ENIR2AdaX/7d+tE0t1kmkJOEmJuR1wzGEr Pz5vgXtYO9Tl3uuXHU9h5Kg0LY3DLs1ZB1vEcSKl4V/WPGZ8GDqm3X41UbQbGdHdEkJG XQwD7m9MY/dXjd3BaQmqEwFcPO7xZ5SDkpSySWAWOU6htRoR6J7SRjiAs2OJiqZBRD/j YyUTo9dSy3zFtNTqMWiBAFXpoW9gLUG6ySvuqxgdH2h76y/JN/Aoxas/kiql1AchGEMA k6y7v1XO8UgqQY+3JzCpLE7f9l4eXIW8JzJvMLHl4tuUgsYhFoX6Er0ViLKNQPc+i4A5 2x/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=WFNUzZsz; spf=pass (google.com: domain of linux-kernel+bounces-6741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6741-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id x3-20020a1709027c0300b001d0b1a08a0asi21227070pll.535.2023.12.20.02.35.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 02:35:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=WFNUzZsz; spf=pass (google.com: domain of linux-kernel+bounces-6741-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6741-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id C7581B244AA for ; Wed, 20 Dec 2023 10:28:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF67F2033E; Wed, 20 Dec 2023 10:28:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="WFNUzZsz" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (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 8F2222030B; Wed, 20 Dec 2023 10:28:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BK9M0p8013415; Wed, 20 Dec 2023 10:27:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=pp1; bh=iwWma8cZ9aS71ZfZwoeukmPm1JcbbrlRzgqA4zD+xZQ=; b=WFNUzZszzkQrOaiZTRoYgHJ/Ir0+JVztUcP59yDaXg51htpfVJ4pkJfyT5eIoWjPuATO zbMnddbNouq5fDlYABNidADjWhZnoOT37a/ALrtUQDIAgIbuNLvOVt5NEeJMNzjFW/sU 9bb/9PVgUHqMFrgggF7C3mldKbVUrGgMrKd7wZnCX6bjIATcHX23SPOjfzj+tX+N7Mf6 hra958VusMgj6yO/earqP7aQm0cy+MAwLAvn34BKo7U9HS2T+5GOfZ343CwhnoePFz+Q p713ho1TjoS64mY8iSXqyn1bhqviUTSjMV7ra9r6dINkrEj1n8uicLz9DcIjQwbkb1+n LQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3v3n4gvjnd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Dec 2023 10:27:52 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BK9v0wk002163; Wed, 20 Dec 2023 10:27:51 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3v3n4gvjn0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Dec 2023 10:27:51 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BK7xdUe010900; Wed, 20 Dec 2023 10:27:50 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3v1q7nnr6n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Dec 2023 10:27:49 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BKARk8128049954 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 20 Dec 2023 10:27:46 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2038B20065; Wed, 20 Dec 2023 10:27:46 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A5DC62004B; Wed, 20 Dec 2023 10:27:45 +0000 (GMT) Received: from [9.152.224.160] (unknown [9.152.224.160]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 20 Dec 2023 10:27:45 +0000 (GMT) Message-ID: Date: Wed, 20 Dec 2023 11:27:45 +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-next v8 03/10] net/smc: unify the structs of accept or confirm message for v1 and v2 To: Wen Gu , 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 Cc: 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: <20231219142616.80697-1-guwen@linux.alibaba.com> <20231219142616.80697-4-guwen@linux.alibaba.com> Content-Language: en-US From: Alexandra Winter In-Reply-To: <20231219142616.80697-4-guwen@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: Xkfw8UmfKOyny7_hP9KLIrMxYIubc7sT X-Proofpoint-GUID: juB57zyeVn9VWg97zh-jhQs1JKxOQAqJ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-20_02,2023-12-14_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 phishscore=0 adultscore=0 suspectscore=0 mlxlogscore=775 spamscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312200073 On 19.12.23 15:26, Wen Gu wrote: > The structs of CLC accept and confirm messages for SMCv1 and SMCv2 are > separately defined and often casted to each other in the code, which may > increase the risk of errors caused by future divergence of them. So > unify them into one struct for better maintainability. > > Suggested-by: Alexandra Winter > Signed-off-by: Wen Gu > --- > net/smc/af_smc.c | 52 +++++++++++++------------------------ > net/smc/smc_clc.c | 65 ++++++++++++++++++++--------------------------- > net/smc/smc_clc.h | 42 +++++++++++++----------------- > 3 files changed, 62 insertions(+), 97 deletions(-) Thanks a lot Wen Gu, I really love this. Using an unnamed union is a great solution here. Now the code is so much more readable and maintainable Reviewed-by: Alexandra Winter