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 6DD1BA050A for ; Sat, 7 May 2022 09:20:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 60AD140395; Sat, 7 May 2022 09:20:59 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id EFB0940395 for ; Sat, 7 May 2022 09:20:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651908058; x=1683444058; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=DS783GVbld9TEkIAKqXrSM6qy79hf9W5CYlric76+d4=; b=cE9ahuvqW83efHlhlkned9ExtJywjGazH7DhyuNj3e8fEXENL+gvnb22 DyIuIuZF7JrijOAOEIGy+tD/EPskKgKZNfE5zliYqOFrNPj8KSvTgEoQo xf4EMXdVVtS8TC7LyvaZfKcXdqR89rX8KTac5Jt83nCVDYbDQ3uXz+0is zieFmPGByEzkQG4NJiBdIz+Sl/2EOrIxnAsRHKKNqpS2tc1X5yzxiUDTh oYn//imc6uOYQtrnxNLJu/PKes1UAx4lrQhMDeST8OscYzxuHC37QJxpu 3HHWJk5gYmc2EKnHEYr9GRX8XSfpeQWK927/qGwriYewvG76ndPiVdX6W g==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="256159150" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="256159150" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2022 00:20:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="736103107" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga005.jf.intel.com with ESMTP; 07 May 2022 00:20:35 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) 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.2308.27; Sat, 7 May 2022 00:20:35 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Sat, 7 May 2022 00:20:35 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.172) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Sat, 7 May 2022 00:20:34 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dwJ7cWCdSMAu50mUNlJHWNNmhn1jUFqsmhZDw/cUp4P6F4zrCpejpdlCAswj+MPpHaluQ8fc8AguuKesJtuLoFIgQUOZRMxSd/CfcbCPMF8xY9r6vAwbqJglaoDCZxt3HB//6d23VQWqIUro6TT5NyNoZHy6vwz93Ka1lNzEBhRGzy+8sVx0ger2mt4coRh9WRj2WkaDf/NAfzov6efUvnWZft4WkEuRWn7/Y2YZu1tXJsNyUC4W+IYuvmi174R/XsaPoxB85021nFB7Q2kTvTF+ukKuCXpXX7FtJOM+L4RP6qbTDJaQPNZDRuXX9vze7yXe/R/IycIDJoFtKIrUTw== 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=lCDL5pU+qTr0h0zL7IL6Y0R2rLyElqFmoAFVyGlvMuA=; b=GzHUhzt2lLchc5cRNSOexe2EuYroG+KnDNyE4tJQsLeXLOFbZJZ27dkXbqObzbhIPJV3foX3AXibih58ryaR9aiCUeiYA4Yc2Di+T+/7Re/T8kbBRW5gkbY89DSMeoO3ANue/+yo9ZlBt5jV+V50+cXQv+ZdnxLitTcBywagd8DMWIAwvPDQzDaKJ1TaQEuasMeMRCr0YAHD2r4dPaWR7eK0BYbW2k7ICVTdbCEE5afBwRdHjXKbSan+cJ8ov5xB7cGgUF84dzRju7PtV1zksYUO6VEa9vp9nLXQdPNq1TShfXTWt5yu+w39VtKShan/dFhqpKzRu2wZFelCmEefxg== 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 Received: from DM5PR1101MB2107.namprd11.prod.outlook.com (2603:10b6:4:5a::19) by BY5PR11MB4039.namprd11.prod.outlook.com (2603:10b6:a03:18b::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5227.18; Sat, 7 May 2022 07:20:33 +0000 Received: from DM5PR1101MB2107.namprd11.prod.outlook.com ([fe80::4d6d:b4c8:f0b5:681e]) by DM5PR1101MB2107.namprd11.prod.outlook.com ([fe80::4d6d:b4c8:f0b5:681e%4]) with mapi id 15.20.5206.027; Sat, 7 May 2022 07:20:32 +0000 From: "Zhou, YidingX" To: "Zhang, Qi Z" , "Wu, Jingjing" , "Xing, Beilei" CC: "Yang, Qiming" , "stable@dpdk.org" , "Yeleswarapu, Ramamani" Subject: RE: [PATCH] net/iavf: fix mismatch between rx_pkt_burst and RX descriptor Thread-Topic: [PATCH] net/iavf: fix mismatch between rx_pkt_burst and RX descriptor Thread-Index: AQHYYbG0tfIC5kVLyUG1/qu9AjnEYK0Sq3YAgAAn+3CAACpLAIAAA8iw Date: Sat, 7 May 2022 07:20:32 +0000 Message-ID: References: <20220507093429.127530-1-yidingx.zhou@intel.com> <7b75be77a604461d811332f8f5917a14@intel.com> In-Reply-To: <7b75be77a604461d811332f8f5917a14@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.6.401.20 dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 33a09c84-3eb4-4035-354a-08da2ffa1296 x-ms-traffictypediagnostic: BY5PR11MB4039:EE_ x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: J8medRztw562pj/yDdJKaVfyojLfVF6GTBWyZwkHUBYjOc3LNW6onu/CKYepme5og0QtIp4ouDDz9oXVQzu6CqNXwX6a+iUy05ugboynaCsPACLjrntSoT22qZ2MDSgMoTK5MkjDG6RaugQ89M+lBTuVPgCE8LQqm5UXW4ZHGvY3wv0rOUDpSGWC0swRytJXE4ZFwKQD2JyoDfZbFTWvvz3nfVSjclMstj03gG5iqT8LmoFNAXCcLJCJJY9SGEWnY4JP7bj+WZJ6Wv6HtrQXcinrhkSoEvKl1XJoDUufVhWmbhDKS20+gwhVINhZJ3SncvCmUPvTBt013eB4t25lom/iw/gWUaEVFR+Um1x0/fnFFoo9EF1nsaPVJx265llDoe1Ruvqm4Mz0ak4mrM7sXsY+BmXo1nCoqeuC21mmKYrte8BPbHC1DBur9QSFozp6FrsPlNCsa4Vma7JyaSQtHgisOBxPRDRGvx2vmEHSgLJr59dKPvOT4KRt8pFrbjEg8l1JE+STJ+9eQsd4MOYxxJAFNBC2qIVP9tzV3wEkGweGoyWNrogCkB07wmmrIRldpOnWrk4wVO68dSyemxnfGu/vkFxxH7lIVfsFHln2qjLg8yQUCnqEERgaNwOQ02jCXyhdF3L19J/6WZo/XIFTmMytJF13DTB/VCx3vaRTWJz87Im+7y+dwivqkK3sLw9HMmGYaSsfPbXPY1HLm4+KVg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR1101MB2107.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(82960400001)(2906002)(122000001)(86362001)(38100700002)(66946007)(52536014)(5660300002)(8936002)(55016003)(26005)(7696005)(53546011)(9686003)(4326008)(110136005)(76116006)(6636002)(54906003)(316002)(6506007)(508600001)(71200400001)(33656002)(38070700005)(83380400001)(107886003)(66446008)(64756008)(66556008)(66476007)(8676002)(186003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?gHGJFeRxqELGw6yr79SxrViFYSM4BVVlLNasGbMfnJ7pz1Gh5/7CEY2XyN2i?= =?us-ascii?Q?6/GfhX+huFCR3dXgWaelVJrzM54/KuTQnQ39FPDpWKJaJwSz2XS8YByte4Ae?= =?us-ascii?Q?YphL4MxJdCQFdFAuuY+E5bgZqM6tC37VIq/w6stp9/pIGP/6Mctb1MqapH2h?= =?us-ascii?Q?5ChekuqKtEoRhtgbBchmxOshc4l5IjYR6asEN+AFDmEtXrgDlqKs26aureOD?= =?us-ascii?Q?2igNfVEo2WtYn794BgvGr+1LrF6xIP3/v+a9RYhnSpTDZlmSUhLTkpH8cSq3?= =?us-ascii?Q?TbNgHDWi8v3qhbLy+kh+eDR7Mdz4SWpIIMRlFnS2j9Fn1Db49OozvVe+JXUw?= =?us-ascii?Q?0xpLYUKsUF3ZJMvO77Xyl/UuEzS+EmSicv9KUnwFW4ekpWmpa1l67qzTCGPx?= =?us-ascii?Q?a/CPGFJ5LHmc4BX5D6m8G0ndzt+0AupIPBH2SczAi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c+syHYP4S1SoGDQVneAHjhyxB2xViSvbbYiux?= =?us-ascii?Q?GqqZb910aWKBFjgAPFOsF5x8nRpbjgDCfXKmi8ciCb78Uj143ICE6z83/sOY?= =?us-ascii?Q?lBr3uxcj/vNugZoKh2bjYi9NfRMTuDEvV53dec10hpSnz2L2D2GH1x2S5nTe?= =?us-ascii?Q?95sK71lx1CLOM7/ShnrRkAfXZXWDBMnp2IA9cGjewfAjsqNcmrwIvrEr/D4U?= =?us-ascii?Q?FIJ8BQqfIxqf2Jpg2gzf44rOTJ99zrK7xCj7RNPYZk8o5u0wdnDWnrS1LNaV?= =?us-ascii?Q?H3UTWP/86Y0yqs4bV2cRmnVawPFCh7HSUDeLiZeIf8nLTa+kUDWnks7eXlBi?= =?us-ascii?Q?Grk2d+M1ENGBDTjgOUPCbCa55dpxPVcTIJxNejZY/Xopmxve0vAfu3AHIaoL?= =?us-ascii?Q?2YXsFiS3BQ=3D=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: DM5PR1101MB2107.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 33a09c84-3eb4-4035-354a-08da2ffa1296 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2022 07:20:32.6041 (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: Zjo98q2di+kmgn+Qx95LLZQD9mmDp1b1BnHIJ3tdS9veXsz340+kDGwf1mvKnMZuFVo9Nh3hwRJVkTpJya7WVw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR11MB4039 X-OriginatorOrg: intel.com X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org > -----Original Message----- > From: Zhang, Qi Z > Sent: Saturday, May 7, 2022 3:04 PM > To: Zhou, YidingX ; Wu, Jingjing > ; Xing, Beilei > Cc: Yang, Qiming ; stable@dpdk.org; Yeleswarapu, > Ramamani > Subject: RE: [PATCH] net/iavf: fix mismatch between rx_pkt_burst and RX > descriptor >=20 >=20 >=20 > > -----Original Message----- > > From: Zhou, YidingX > > Sent: Saturday, May 7, 2022 12:43 PM > > To: Zhang, Qi Z ; Wu, Jingjing > > ; Xing, Beilei > > Cc: Yang, Qiming ; stable@dpdk.org; > > Yeleswarapu, Ramamani > > Subject: RE: [PATCH] net/iavf: fix mismatch between rx_pkt_burst and > > RX descriptor > > > > > > > > > -----Original Message----- > > > From: Zhang, Qi Z > > > Sent: Saturday, May 7, 2022 10:09 AM > > > To: Zhou, YidingX ; Wu, Jingjing > > > ; Xing, Beilei > > > Cc: Yang, Qiming ; stable@dpdk.org; > > > Yeleswarapu, Ramamani > > > Subject: RE: [PATCH] net/iavf: fix mismatch between rx_pkt_burst and > > > RX descriptor > > > > > > > > > > > > > -----Original Message----- > > > > From: Zhou, YidingX > > > > Sent: Saturday, May 7, 2022 5:34 PM > > > > To: Wu, Jingjing ; Xing, Beilei > > > > > > > > Cc: Yang, Qiming ; Zhang, Qi Z > > > > ; stable@dpdk.org; Yeleswarapu, Ramamani > > > > > > > > Subject: [PATCH] net/iavf: fix mismatch between rx_pkt_burst and > > > > RX descriptor > > > > > > > > Some kernel drivers return the capability > > > > VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC when > > > IAVF_RXDID_COMMS_OVS_1 is not > > > > supported. This causes PMD to use rx_pkt_burst that handles the > > > > Flex Receive Descriptor format, but actually configures the RXDID > > > > into IAVF_RXDID_LEGACY_1, then the fields of rte_mbuf Will be > > > > filled with wrong values in rx_pkt_burst, which will eventually lea= d to > coredump. > > > > > > > > This patch fixes mismatch between rx_pkt_burst and rx descriptor. > > > > > > > > Fixes: 12b435bf8f2f ("net/iavf: support flex desc metadata > > > > extraction") > > > > Cc: stable@dpdk.org > > > > > > > > Signed-off-by: Yiding Zhou > > > > --- > > > > drivers/net/iavf/iavf_rxtx.c | 20 ++++++++++++++------ > > > > 1 file changed, 14 insertions(+), 6 deletions(-) > > > > > > > > diff --git a/drivers/net/iavf/iavf_rxtx.c > > > > b/drivers/net/iavf/iavf_rxtx.c index 345f6aeebc..69584264de 100644 > > > > --- a/drivers/net/iavf/iavf_rxtx.c > > > > +++ b/drivers/net/iavf/iavf_rxtx.c > > > > @@ -2908,6 +2908,18 @@ iavf_set_rx_function(struct rte_eth_dev > > > > *dev) bool use_avx512 =3D false; bool use_flex =3D false; > > > > > > > > +if (vf->vf_res->vf_cap_flags & > VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC) > > > > +use_flex =3D true; > > > > > > No need this check, we can init use_flex as true; > > > > > > > I'm not sure if use_flex can be init as true. is it possible that > > vf->vf_res- > > >vf_cap_flags doesn't contain VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC? >=20 > I think the following loop will reset to false if any rxq->rxdid is legac= y or any > unsupported rxdid happen Otherwise, it should always be true. >=20 > > > > > > + > > > > +for (i =3D 0; i < dev->data->nb_rx_queues; i++) { rxq =3D > > > > +dev->data->rx_queues[i]; if (rxq->rxdid <=3D IAVF_RXDID_LEGACY_1 |= | > > > > +!(vf->supported_rxdid & BIT(rxq->rxdid))) { > > > > > > Check if rxq->rxdid is in supported list is not necessary, this has > > > been guaranteed when we set it. > > > > > > > According to debugging, this is not guaranteed. > > rxq->rxdid is set to IAVF_RXDID_COMMS_OVS_1 by default when vf- > > >supported_rxdid =3D=3D 6 (just contains IAVF_RXDID_LEGACY_1 and > > IAVF_RXDID_FLEX_NIC). >=20 > OK, you can keep this. >=20 > Btw, please send to dev@dpdk.org not stable@dpdk.org >=20 > > > > > Also its better to print some warning message here, if we saw some > > > rxq- > > > >rxdid is flex and some rxq->rxdid is legacy as we have to set > > > >rx_burst as > > > legacy for all , this is something not be expected by user > > > > > > > > Agreed, I will do this in v2. Thanks. > > >=20 I will sent v2 soon, thanks.=20