From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 37BA5A034C; Tue, 18 Aug 2020 15:49:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BA45D1C138; Tue, 18 Aug 2020 15:47:17 +0200 (CEST) Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by dpdk.org (Postfix) with ESMTP id 0D61F1C0BC for ; Thu, 13 Aug 2020 09:23:15 +0200 (CEST) Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07D7Gr1L064379; Thu, 13 Aug 2020 07:23:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=FR2D0d+STLTJZ8meUNiCGZLiwVDrWQQ8uT4DA5ErxyY=; b=tei2PiAiSUt9Dzbx3ZRQLdrX5zyY6PoukXQ7faRysKyd2Hx6OpDpEeuWMTSL6V2bdOXV q9eWVFpLdgN8o+Hs40EJnukd2jLnTBQIk69bSVNGx6btKnni0tdjeWjCLgpHfnYEadlE bWq1h1k8C+0nvfflfA0gB+3dUiSQbfEPO9G0wTNAsyK/rwskkhgimuFQTZ0v7PPjrm6c cfmX0QRmHytu9tGEh2ecO0NmvATMpSceW/p3efq+JVGvQANMw0itsKYol4YeCKHdqopE ZQzzawcreJ5BkjquO/cQMiMeMV/1HoMDuN66C1XnFEJp9CyJ2jITjVXCSCyqQ2wvLOjO nw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 32smpnpwbq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 13 Aug 2020 07:23:08 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07D7MXlX007420; Thu, 13 Aug 2020 07:23:08 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3030.oracle.com with ESMTP id 32t602xkyc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 13 Aug 2020 07:23:07 +0000 Received: from abhmp0011.oracle.com (abhmp0011.oracle.com [141.146.116.17]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 07D7N6aB012237; Thu, 13 Aug 2020 07:23:06 GMT MIME-Version: 1.0 Message-ID: <5691bd22-32dd-46cc-8a1c-1bced4183015@default> Date: Thu, 13 Aug 2020 07:23:01 +0000 (UTC) From: Vipul Ashri To: javin158@163.com Cc: yong.liu@intel.com, chenbo.xia@intel.com, dev@dpdk.org References: <20200810195958.1239-1-vipul.ashri@oracle.com> <20200812092306.1345-1-vipul.ashri@oracle.com> In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 15.0.5257.0 (x86)] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9711 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 malwarescore=0 mlxscore=0 phishscore=0 bulkscore=0 adultscore=0 spamscore=0 suspectscore=1 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008130056 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9711 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 impostorscore=0 phishscore=0 clxscore=1011 spamscore=0 malwarescore=0 adultscore=0 mlxlogscore=999 mlxscore=0 suspectscore=1 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008130055 X-Mailman-Approved-At: Tue, 18 Aug 2020 15:47:00 +0200 Subject: [dpdk-dev] FW: [PATCH v2] Fixes: 57f90f894588("net/virtio: reuse packed ring functions") X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Hi Javin FYI http://patches.dpdk.org/patch/75476/ The mentioned fix you are trying to submit is already addressed and in revi= ew with Xia chenbo since 10th august. Hope you can discard your patch as I have already sent the patch to dpdk co= mmunity. Regards Vipul -----Original Message----- From: Xia, Chenbo [mailto:chenbo.xia@intel.com]=20 Sent: Wednesday, 12 August, 2020 17:31 To: Vipul Ashri ; dev@dpdk.org Cc: Edwin Leung Subject: RE: [PATCH v2] Fixes: 57f90f894588("net/virtio: reuse packed ring = functions") Hi Vipul, > -----Original Message----- > From: Vipul Ashri > Sent: Wednesday, August 12, 2020 5:23 PM > To: dev@dpdk.org > Cc: Xia, Chenbo ; vipul.ashri@oracle.com;=20 > edwin.leung@oracle.com > Subject: [PATCH v2] Fixes: 57f90f894588("net/virtio: reuse packed ring > functions") >=20 > Problem - Standard Tx packets are not going out and found broken due=20 > to cleanup malfunctioning whereever below mentioned macro is used. >=20 > RootCause - Here inside Macro 'ASSIGN_UNLESS_EQUAL(var, val)' > assignment to 'var' argument passed is always failing as assignment =20 > done using 'var_' having local scope only. >=20 > Signed-off-by: Vipul Ashri I understand now. Your patch makes sense. But your commit title/msg is stil= l wrong. An example commit message should be (you could use this): net/virtio: fix wrong variable assignment in helper macro Inside Macro ASSIGN_UNLESS_EQUAL(var, val), assignment to var is always fai= ling as assignment done using var_ having local scope only. This leads to T= X packets not going out and found broken due to cleanup malfunctioning. Thi= s patch fixes the wrong variable assignment. Fixes: 57f90f894588("net/virtio: reuse packed ring functions") Cc: stable@dpdk.org Signed-off-by: Vipul Ashri > --- > drivers/net/virtio/virtqueue.h | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) >=20 > diff --git a/drivers/net/virtio/virtqueue.h=20 > b/drivers/net/virtio/virtqueue.h index 105a9c00c..20c95471e 100644 > --- a/drivers/net/virtio/virtqueue.h > +++ b/drivers/net/virtio/virtqueue.h > @@ -607,10 +607,8 @@ virtqueue_notify(struct virtqueue *vq) >=20 > /* avoid write operation when necessary, to lessen cache issues */ > #define ASSIGN_UNLESS_EQUAL(var, val) do {=09\ > -=09typeof(var) var_ =3D (var);=09=09\ > -=09typeof(val) val_ =3D (val);=09=09\ > -=09if ((var_) !=3D (val_))=09=09=09\ > -=09=09(var_) =3D (val_);=09=09\ > +=09if ((var) !=3D (val))=09=09=09\ > +=09=09(var) =3D (val);=09=09=09\ > } while (0) >=20 > #define virtqueue_clear_net_hdr(hdr) do {=09=09\ > -- > 2.28.0.windows.1