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 80E0EA0C43; Mon, 11 Oct 2021 04:25:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 089D8410DA; Mon, 11 Oct 2021 04:25:18 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id C545240E0F; Mon, 11 Oct 2021 04:25:15 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10133"; a="250168194" X-IronPort-AV: E=Sophos;i="5.85,363,1624345200"; d="scan'208";a="250168194" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Oct 2021 19:25:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,363,1624345200"; d="scan'208";a="490276673" Received: from orsmsx605.amr.corp.intel.com ([10.22.229.18]) by orsmga008.jf.intel.com with ESMTP; 10 Oct 2021 19:25:14 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX605.amr.corp.intel.com (10.22.229.18) 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:25:13 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx607.amr.corp.intel.com (10.22.229.20) 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:25:13 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.42) 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:25:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GY3kcXaeMV2z3yqjAbMS9Nj5wTw6Nr8Ttjc8sehNujudJAu91SOvmuI+ZY4PttQYDPLlFb2csHcxGSw0R035Ocm5OTFQJkD0M86ACFaUqLOPk0F6mXq+awnW8MpIjTN1l+OwgxhKbrzJjAVGddVGl6b/XM4q4aYxnWzIjEtfo8YYhieRkxMg8ZVeYFZohcBZT+qge6wUUA/X2lFNJ+AeVx3HC/cfnRO79/BXMOrDs64/cd7H81ZL4ejyYx0gtSE4tJud+3LCzSDL/9UE3nIYqxNtrMyu3HQAQG39UtIXiGYXXFgub+4TM6+HuJ2nIJ8qOuLJawuiGMkRNR+pbe2QeQ== 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=EWry5zrW1vk+PYHSgJ0PRYJD0hVRPPH3/cwAPQ9dY9k=; b=eWQZv0xovv2HLhOmixYfrfcdzzYAFsl6OxbEKMsGcP5Fw/c2ZbvHeHJv/4YNQYRulDmiGwBdX2WrlkSb94/ZAtOiJvXlzxZzFlzkqGb45szGQD+3JFcORs64X2R36aBzVmepvwyvYByYY/QJVabYFL2T4+AsLF/3TTJL+FGWBsHuN1ATS3lMEYncbDdeSJJCA9yV3mqUyQrlbEYbM0QxXK2Wfd/fFa8BX4VVnRZMhtQ3gjh5g4zeKVX3UC1N5yd8/PeIPVwqjanV4HJqtp4NB3EmqZegE96YFTTQyAyx0lfzcr8WZme50XRXpXvv6KHsA7oIM1b7cCBD2GTabpMR8A== 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=EWry5zrW1vk+PYHSgJ0PRYJD0hVRPPH3/cwAPQ9dY9k=; b=MZmStpB0BXamVvx2XnVZWEZKVubyqeZprw66XOpPr2NcCFiPg2ZToSeb4/yDFS1xVdhQB+g7/cOxD7AiyCI8hjK4WUxhX+sh3smF5pBiNEHmCtvxMDitKLYgWCfgBV+WTlL3IPDR4vvg1+QaOvjS7A4Y2OW9VIK/PfJcWVFJvJE= Received: from PH0PR11MB5596.namprd11.prod.outlook.com (2603:10b6:510:eb::23) by PH0PR11MB5627.namprd11.prod.outlook.com (2603:10b6:510:e4::9) 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:25:13 +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:25:13 +0000 From: "Peng, ZhihongX" To: "Xia, Chenbo" , "maxime.coquelin@redhat.com" CC: "dev@dpdk.org" , "ivan.ilchenko@oktetlabs.ru" , "stable@dpdk.org" Thread-Topic: [PATCH v2] net/virtio: fix check scatter on all Rx queues Thread-Index: AQHXvAnPjGmd+hkCtEWMkPg6yQTdFKvNFiVQ Date: Mon, 11 Oct 2021 02:25:12 +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: intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 3bdf83fc-aff1-4300-2937-08d98c5e5af6 x-ms-traffictypediagnostic: PH0PR11MB5627: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6430; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: AjfnOKggmHnlfJhw+kcl4CQs7NWo1BJeZWSPQScXc6anU3IKwIMHYR/iMGlsygmynRq3UenZ1pVFZpuHBrwcAUVUwaR06P1zUYCmhVxWZaTYSfjuv/TS3pVzBHCTHuRuZd8QFtMhgPEBsLGYNSWNqypVU+IjF3GHRAzdRPhakdcJO9ylehLCD3p4LeMAcg1f4yNN2lUZeAIs9UoS8k/u96p1gBxJFWhYZdPeQryX1Iyw2QTYtY7seKDm440w3NXMNzHUvmtFpmM7Qkv1/p7ueyZvYyWTAEawCYg4QZ+7vbgwm1F3zag6+/xulX8LgpmCSSRLCDRvM1mOmpRQTdW+XHp7uRlKJSUaug1TQI7iys342+5sTTeM/VWA82kjdVzRQ/dJxjL3mkUY5+Xt7pZv7I2K2CDzTXjRN3gukzclvJKQzBLyBhsjO4IKE6XETTpsMAXXf6+I1PBCj1sDhG8i+vYfYy46KDgHbhW2kZHzmKjkm/S+oGk6tUEtOAgeKWfa7zH63KNxpjwpC10F1d5F25MiiEswHkKyIrawoOUywOf9yaVVTVOhzRtfpXznfPOSwvMM+zZYzHEPAXhZCKnZG/jSrVYpdzf05GLm7TaePAILvWakNMrg5AIIIxQZSerFF9s1162Bahzr5mfmAkeU9wBpQ7pJOke3tAdvIxWJNi5RkPm7sWrfhQoUDR1IU+0Xe2dFU91nxOgqDsR/U2ds4w== 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)(7696005)(38070700005)(9686003)(71200400001)(66446008)(53546011)(55016002)(66946007)(66476007)(52536014)(64756008)(26005)(2906002)(86362001)(6506007)(8676002)(66556008)(110136005)(8936002)(4326008)(5660300002)(186003)(122000001)(54906003)(76116006)(316002)(38100700002)(33656002)(508600001)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?n6BmG4sBaFMHZM0Vb2qOu2oYoYJRpUnM5ELSVJAj4Uq+6EvLSNO6iemvG6oA?= =?us-ascii?Q?+Ed0E3daS7bUKX6mUZW+6OKu/1hQ56f23M0v44775kIY+TfELP1egEfgkRFE?= =?us-ascii?Q?5gC2L/h5uasa3BB5O1agXYZnxazk3/YFb0MndiawQyFFmoeeVDHX2ggAlm9F?= =?us-ascii?Q?jGVWzRa3V2g99GJG9FbUUv1op9hWEWn+RcNZyO5CdTHbaaGxTxosMj9gRlmF?= =?us-ascii?Q?HUJcc7iVPv4Izg8tyxcen/d0TigbnUVRL3c2IMhn/wljuby7kWVRvPVCuPeU?= =?us-ascii?Q?H3rLFZz+t3+OJAir12OS6gaCN6UdgAUVpJaqSvXT84wPCTtdsqA2fOBp7l4L?= =?us-ascii?Q?F8MXdltIR8fDZca5fu8qFju+aHIzzw+jCcrSCGRnR/Y+e/Z84htmNaKpguJM?= =?us-ascii?Q?28G+U4vi117lo5+QmRV2KRi6U786++gtz2OLswWldU1Igmz5EVVBUfXot2Ea?= =?us-ascii?Q?u5M6TM4unAGvVtYosG63XKFdt1MOzB9q0Jg7Uq52g4f9c3cDaD5LxnfKfEvf?= =?us-ascii?Q?DiNybB5/waaENDQPI0qw77KtjdAusOYMfqSOpo8d7vH2O0Av83q0pCOaEtw3?= =?us-ascii?Q?PqeO110Tik4cuzRwuw7OpVCh27H09BQCrCEqEv23gbth8y4yGRHg7K9wgu+a?= =?us-ascii?Q?bh0dY74dMR/KsIfsrbXlkGvUnuBPSmMTIQN5PkU+t2OIdgl69RCxC2FIvDGl?= =?us-ascii?Q?YeoFcX+HOA+VbeSDkYjmJPWKWG7kNAlO9swjd6F/Ra+iOTlDl4eENCbc60jQ?= =?us-ascii?Q?UxNLTi5J4XNVQDTLYh9OJVapyNX/i33CdR3Weng63yikD+3kFivSAh3ngoM7?= =?us-ascii?Q?zeYoljykWPHWzGOAbv45d1+WLiQjJvo489oW73uQ/qs+Q+4nafE2TuZMSd0S?= =?us-ascii?Q?GKqKmSNqoQEPwlkIQ2vBWuiekNr8PYqqkOYCJU3pbgYaM3bG4JeVW0j9RLo3?= =?us-ascii?Q?mXOiCeyfzkcA4awu9cCKKj+FrdnBL9RbjSuq1jYAqkKbUhs+trh1da1MkPKr?= =?us-ascii?Q?EJ5sBFYp+GW8Q5c2U1CrWIExAQXXxx8vRmu6TR3BFDRL9VEgT1G28f3jtq6k?= =?us-ascii?Q?G+7kAQGMtg+CGC4deP6h5WOEl/O1DePsBwagrGW9wAijageSfvNhfzGLzp9/?= =?us-ascii?Q?g+0/GJDwRpcGLbRtDAYtEuhyQIRg4/P7SJu2vKLXdpqquUW+u8eIzMmAOwIv?= =?us-ascii?Q?SKZ0+emxDZMGFbQyGe9bXsCjHlSAw1QVlLDrcLQ6x5c7Nk0OEC0IHBwJr52N?= =?us-ascii?Q?FTRuQw5q2tnWDCyGuxH2K0Hh70K2ZvISaLIKVdAQOXlxIG6c/2rniMH3WRfH?= =?us-ascii?Q?4iU=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: 3bdf83fc-aff1-4300-2937-08d98c5e5af6 X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Oct 2021 02:25:12.9695 (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: wwrrVFMFQ5YHIeJcJaDzqpV6/2v2zbbQ82AxGQaDTE1mQ3fgFWpIJcyzTfKe3BCWoSFn6iZITPSOrzqO264fGg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5627 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 Tested-by: Zhihong Peng