From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2D804A0C43; Mon, 11 Oct 2021 04:22:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B4B0740E0F; Mon, 11 Oct 2021 04:22:32 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 882A940E01; Mon, 11 Oct 2021 04:22:31 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10133"; a="206900186" X-IronPort-AV: E=Sophos;i="5.85,363,1624345200"; d="scan'208";a="206900186" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2021 19:22:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,363,1624345200"; d="scan'208";a="479663500" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga007.jf.intel.com with ESMTP; 10 Oct 2021 19:22:30 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Sun, 10 Oct 2021 19:22:29 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Sun, 10 Oct 2021 19:22:29 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.103) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.12; Sun, 10 Oct 2021 19:22:29 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PQwdNyUERDtC+I8vIn6rJKQHYwGXniSMblvFzFMlabSiT6b4ZKP8lg6Fv20k3cI5NVRtphSsO9hVb2dYcVSK37mAwbl/0Q/rqi1u0lzLn2179F1l92NSgrHxiRwL7PeHEIGakQWIZpjKQ2a+p1bEzpA4BzD8IfdIRz15N1x9myXONqZlbPkleoMhFTDn0I8yPTLrBqwangez4VKnclxj/knB0ezNTsTxGC9s+3k7K+U+OVhmQtdaPrWLlYiAMf9CMOWik8mgyqaufrpPr2JlxV2ONeJiiB0uC45mcibQbyaKbBtvHqfgZQKyYCf9i7o1H1DFEwovgRV4WYeFfTnsDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=A4m7Ojku24Kxe/eF5nrG9kdEf7CB0KsAmQCdzs4DbRI=; b=HBlQOgez3akoewwdEEZxoZPJQSPpxjBfGBar85bDwp5j9+XzusTArqvwh05NY7ou3CylVyIXFO6wgZhEDNEpZHcJCUgofWfkeAwHHwIVOB/0YMY2Rzafa2RjGbjcvKixGQp5+nZnwHZ0xT0CCf6nY73oFiM414AhVbvc8Obus/VY40zLQQYaJ0CS6RyPpApj+OLVadkuusibnuRCaHT+PHugxVOeNIH7D91sdBSy81JPH9Klqz9GOuMw16fjARVd4Z7vDvet6/EDvoY3yDzPWpNMYv3qFpKvJSM8sXZmrwKBrH/2k4vcv9bNZy/fFr3RUyYzAMxbWGij840v3sO8lQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=A4m7Ojku24Kxe/eF5nrG9kdEf7CB0KsAmQCdzs4DbRI=; b=R00WaREYCMet/Mq+/MSAHJqXnWYfC3ppZFGohSeUNfavUTyvKpHuoht1fTcx3gS+joztnUiG4pL69lLdN0kOCWQ0hvfsu19ihDsSeLs4JdQzUJvttTj4q5J04F/bn3erPdqnZVTdoF95gps57VgbWE/fB1vSJmDhISJUeljCjz0= Received: from PH0PR11MB5596.namprd11.prod.outlook.com (2603:10b6:510:eb::23) by PH0PR11MB5612.namprd11.prod.outlook.com (2603:10b6:510:e7::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4587.18; Mon, 11 Oct 2021 02:22:28 +0000 Received: from PH0PR11MB5596.namprd11.prod.outlook.com ([fe80::78a5:3d61:f3a1:4fbb]) by PH0PR11MB5596.namprd11.prod.outlook.com ([fe80::78a5:3d61:f3a1:4fbb%6]) with mapi id 15.20.4587.026; Mon, 11 Oct 2021 02:22:28 +0000 From: "Peng, ZhihongX" To: "maxime.coquelin@redhat.com" CC: "dev@dpdk.org" , "ivan.ilchenko@oktetlabs.ru" , "stable@dpdk.org" , "Xia, Chenbo" Thread-Topic: [PATCH v2] net/virtio: fix check scatter on all Rx queues Thread-Index: AQHXvAnPjGmd+hkCtEWMkPg6yQTdFKvNFTaA Date: Mon, 11 Oct 2021 02:22:28 +0000 Message-ID: References: <20210804083128.64981-1-zhihongx.peng@intel.com> <20211008054945.368548-1-zhihongx.peng@intel.com> In-Reply-To: <20211008054945.368548-1-zhihongx.peng@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: redhat.com; dkim=none (message not signed) header.d=none;redhat.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 8e57bb8a-3313-440a-5169-08d98c5df8bb x-ms-traffictypediagnostic: PH0PR11MB5612: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:4502; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: NYC2dxG/fdWQ7sHyV8aIVXntE4QTttwwG6me6yspoIfK/nsrP7MnGNiqkwBWK5axp54NCiYpwwhnvceb6zfiGk/h38ZGVi3mQ9xwNtjr0APNVxTTf/uP0VgvIZGDizf1UeT4St4X3f+m22uCyu8/B3ZrzYYjm6PCp35BOG0DFGELDlJTasBdoEt2AfJSUvT/9w6R1joipFoaxP/Zr8ETX4lXAmmlHLMGZsKJ8Xo/YNBVuCh7EmZ+DoBmKBxh2BA1mIFcn5c4ye3oZsgu7rZDbhHzzVjZf9kh5jEttfM5R/5tlbIggGs8mCkFiFfFL0/ZB3vfYNCYL6jmaUctLkLIDvNI95V84cnDKLYvwrh8jq8KOI8fqUOpb3W9HNDfD97YTLWsdJeeRefX4aj6Rb5g4ELpHawWX8x10g/tMIgaN3JcMiQ0iPb047oGX3E9sbsh2HTMBwLOyhwx4tm1SUUEvqXoBQ66c83TjW2ZoAXhBD5pkFaX+DSF7Tn9jn138bqN1evgdNiwc3FcI1AOYeDbUrXajY/VK6C0rptP4eD1g2YlrNsRWexkLh4qsA7Cx2xZErZt65CR6JxKouA8iXPihRF7+15v578wLsJJ8ZlnG/3y+qUnSPy4jB8sIQaEBSInXC3mVBZkijrrOYAB1JAtIspkNrcEkKllWDTPfpqti7voQLiZOlTr7a/MeUsvIBM1NdIwgUv2LTeHT5csSy2jfw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PH0PR11MB5596.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(38070700005)(6916009)(122000001)(66556008)(66476007)(64756008)(8936002)(76116006)(66946007)(86362001)(107886003)(54906003)(52536014)(4326008)(83380400001)(66446008)(316002)(7696005)(508600001)(5660300002)(9686003)(8676002)(38100700002)(186003)(55016002)(53546011)(26005)(33656002)(2906002)(71200400001)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?OZcC9Va3BpdfBhzVy+3i/UA8dHKLXFE1gVOsh9I2LBQrxWdhnBcVhzNTR35a?= =?us-ascii?Q?GpxNBC/Vt5fVy71UXsNNUCgEZVqto3xzwT7U8C6JpdguyZLFUEsxbpnJK+B7?= =?us-ascii?Q?y0CXllh/jjrw9H/Rrzo1kukRBwuPZ2v8hyCc70VrFIhK04f9UrPmqErUqO7Y?= =?us-ascii?Q?wUrBCGngiY79lpykmHCwCT6Iw0AXlwRgMBug1miQnKhxMv7ELJdJggN1VwPA?= =?us-ascii?Q?zPIo4OI1Lo3cVDPtxVk5VqkvittTw0h0ergvX8nYjEHanYervb2vuMvFabry?= =?us-ascii?Q?MOYAzNbDRaeVaSdBkXOGWRwvBKbh/iTbh2w+HLOgVA2fRjCp1e7LmfbQHcHh?= =?us-ascii?Q?gmvp4BvBIgjkYGaP5YDEiK2eP5dox9StT+NoS/loCih0t45tD7reXZdO8sSg?= =?us-ascii?Q?p5rkFhjuie5aW39Aa4vSCFUD5cSPvM5A6VcwyCEQxBtzVAEk+lpR+VjM1zaA?= =?us-ascii?Q?RGT7rsCyYG/LIwMmrSNUykOMFPfvpnaG4SalI+OaUOi5wWQ7OVt/KgbeLLLu?= =?us-ascii?Q?qDRip4y3u/b84Lb2iRDsdCzN1KJ5yB4LZXbwdMEpCcPZ4USgU/WHy9FD7jKt?= =?us-ascii?Q?sEGu8kZwvl6HpHcaeD6iQ8YC5AFilEPZS3U3HeUEwRIGKs+rREg1RpvR3wWj?= =?us-ascii?Q?dMkJHGdnKRsTwCSos8EANRTshfMN6KAltH7wgImn3SVRPM3SdhZmVKbIDLGc?= =?us-ascii?Q?C/mUC6GZ80P9r4gNMPOKbeRrfg5sNmzIaif0UGVb1NWsn/E+zoZAbLyLG8qV?= =?us-ascii?Q?r1iVe4VmD/1s2B/pGKrw8brj56tV0KuRtqHtelgz/hHUKyHNq6mw0jU/9PJP?= =?us-ascii?Q?o+baY8+xjyu3DxXqjOZM57TaXWmNFUzz6210v2r1nsU7yLwx7uOsfKufdvGk?= =?us-ascii?Q?dyJAc/G+CL9qPYWc9FIbY1cY1KuiJCN5DYi2A4o+BntjsFbnTsLHBVMlOquj?= =?us-ascii?Q?JLbQs/b3EKGy/Xx7Ro51XojAM7/FwAfEVZTmwl63/uQCRqZKIcOd0LXe6rxz?= =?us-ascii?Q?7aETsf4mg0Np54ki4/wztbufZgtkE35+7CYKAQFBgF0K5l7ZeFdh0t004/tB?= =?us-ascii?Q?2JRStiLj+g/MqtizyTVmbVFyJ02e3E929R95syq/vhpZF2fZxpk4YX4CgunW?= =?us-ascii?Q?nEHUSaCkyAobNQ9BmWqzz1y8tPOXwZIzs/cx706k6/CFIhJ8MphDkN0zC9Q9?= =?us-ascii?Q?gIeaMeMUfN1cT90Lg09vu8Md2MDn5hl/omixtrQM9u+N0UOpelrOLo0jo6IO?= =?us-ascii?Q?lWyjYLv+qpfZf899K19ewUgbG+SR5WadUmGG5fv+Hq+QXYcR6ODyqccbGohL?= =?us-ascii?Q?F6Y=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5596.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8e57bb8a-3313-440a-5169-08d98c5df8bb X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2021 02:22:28.1751 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: mEcExPo6RbT4dKagGjpC8sosR5dlcK3lQcbrmsETOS1d+5nvB6juSGrmik82FMRAXZe6vhfc6BXGHLAxYupWug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5612 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v2] net/virtio: fix check scatter on all Rx queues X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" > -----Original Message----- > From: Peng, ZhihongX > Sent: Friday, October 8, 2021 1:50 PM > To: Xia, Chenbo ; maxime.coquelin@redhat.com > Cc: dev@dpdk.org; ivan.ilchenko@oktetlabs.ru; Peng, ZhihongX > ; stable@dpdk.org > Subject: [PATCH v2] net/virtio: fix check scatter on all Rx queues >=20 > From: Zhihong Peng >=20 > This patch fixes the wrong way to obtain virtqueue. > The end of virtqueue cannot be judged based on whether the array is NULL. >=20 > Fixes: 4e8169eb0d2d (net/virtio: fix Rx scatter offload) > Cc: stable@dpdk.org >=20 > Signed-off-by: Zhihong Peng > --- > drivers/net/virtio/virtio_ethdev.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/virtio/virtio_ethdev.c > b/drivers/net/virtio/virtio_ethdev.c > index b60eeb24ab..213110cff4 100644 > --- a/drivers/net/virtio/virtio_ethdev.c > +++ b/drivers/net/virtio/virtio_ethdev.c > @@ -888,8 +888,11 @@ virtio_check_scatter_on_all_rx_queues(struct > rte_eth_dev *dev, > if (hw->vqs =3D=3D NULL) > return true; >=20 > - for (qidx =3D 0; (vq =3D hw->vqs[2 * qidx + > VTNET_SQ_RQ_QUEUE_IDX]) !=3D NULL; > - qidx++) { > + for (qidx =3D 0; qidx < hw->max_queue_pairs; qidx++) { > + vq =3D hw->vqs[2 * qidx + VTNET_SQ_RQ_QUEUE_IDX]; > + if (vq =3D=3D NULL) > + continue; > + > rxvq =3D &vq->rxq; > if (rxvq->mpool =3D=3D NULL) > continue; > -- > 2.25.1 Hi Maxime, Can you give me an ack?