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 73FAAA04FD for ; Sat, 7 May 2022 06:43:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D5524014F; Sat, 7 May 2022 06:43:27 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 62DC14014F for ; Sat, 7 May 2022 06:43:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651898605; x=1683434605; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=/qaFGkksMDi0A5wJTXKtKEz9Ig7eZg+XU0k1/Wk0O/Y=; b=Wk3QRBlISW1Wg7PQztGACeSBzfDiRH/jznp6BHt3M0t5qAlIp/ShmoVB c4RjXBt2rqwtxqeWmDFnbNTQUG2Y29anMUkcIHMXty5pG1TWzh+5cu4D1 vJgIVjC9pMGbWHSPI3tGciMmKfRUDzW12Iz/5cwzSzhveJw6BV6RwabuM BgIP2b5cmq3AQCROwBJEPqWJgO2FEBNw8ngxv6GAvzaFo8Jk3vWNaSrg6 0Oz2zsi1uDoya2UNE6hJKcWmXqM5QSpZP0LJqFeQSu+b1Q48M+oSzkOVN cfL+Rdq+FxmlfFcMGLjCV0LtkgAOK82nfnD2IoAGDX0eNv1ohKoeFxY1j w==; X-IronPort-AV: E=McAfee;i="6400,9594,10339"; a="329198362" X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="329198362" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 May 2022 21:43:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,206,1647327600"; d="scan'208";a="665784069" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga002.fm.intel.com with ESMTP; 06 May 2022 21:43:23 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 6 May 2022 21:43:23 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Fri, 6 May 2022 21:43:22 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Fri, 6 May 2022 21:43:22 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.100) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Fri, 6 May 2022 21:43:22 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PLAYnkilTRaCXOjufuLp8HJQ2YBppC4cY8BqMNnexLT/5qOcdp2wlQMImn4A3LjHeYuHR7Zf84A+gr3xykSBynoJ7a+fYRNPnmIb1AkgHWXBeRXO6N5+P8ja+Ft23nvN8F75Xeg7pls+v9pM6dJN+JNiII+Y+drLkJ4Kptwu4fyg0SUutKXo8dJ/KVQLkHC031w4h5fuexDFv9wK9TR1vOsQWD79qFBw/TuZ+WbH2+8R5kFJD9Ihp2kcszv8xb7AQ74mijFXQIWId2Qt3OpH3WlqvIKmc4btu3XHd7mmBU2j92O2p7Z6fPG3BpfQWPBFd0CBh9LJBqIwc7UticN3/g== 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=79GPxmejDtyCdL4NL1lDunuAuAPOl9vOZSnCtxijQr8=; b=gyJLV8Ewtv+bY1hzc9zUSF+n9V/BNAK13SavQVA8fYz61S+v8lLhzTdcq8fwDp5B5uW4tKgNWCuUwUGf1U2fWpuxOKqVUPypdVs5YTMD+Xi5IIXXguPziB7ungYFbFoTL9f3Tqrsdi81yhoTGo9ep/oDp3iv/FrmofgKVFlFSOhEYt2DcNkHmew5X15Y5UvDp9jHJePMmEqiCoRhDoTRd7NxUOa0gRfoeM+DB0RL7K9KljZw98VvBRLUXZTgdSWan7vJhvxTeIj+AajED4h7wtit6gcimpoMcXL/8gufXIcKq03y9xMZsymj9Ud/8DA8T4vzyrurvCwmKmPWt7EaDw== 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 MN2PR11MB4301.namprd11.prod.outlook.com (2603:10b6:208:188::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5206.25; Sat, 7 May 2022 04:43:15 +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 04:43:15 +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+3A= Date: Sat, 7 May 2022 04:43:15 +0000 Message-ID: References: <20220507093429.127530-1-yidingx.zhou@intel.com> In-Reply-To: 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: 23fe40b1-52a0-41bc-6db7-08da2fe4199f x-ms-traffictypediagnostic: MN2PR11MB4301: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: mx19WR7Am4V3t/9blUPOA05nlORPHYC6HUSkIIgBdCjpkczbtQiLA9kcIfyhHJmLYTURPOSAuDueFt98vdt5pvBJSg+MGeuP0MJxC85EhTFXrdrHyr4+IfIMUQl1UMBm08jAcDgrDJtE74RDFXNcfhAudXob/OhX3D7KdZz63AzQJgmb+iNAvADqK6jnh8Y+HMR7qlRw3UkEYIdyUbwLi1bv9VbCpXrL86qL6NcxcrfYtyrNZvbia4O6CgvABEByU4+fRCOZLJGQ2rcjqh0cJxF635TWexHY7Aqyqtz3n34RvP70OX6jycN3N3R5EaX3sLrjX8GdqGjJ0W79Ik5UYSV7isI1K4PvS10Sn5vtML4xp2+/LER+Zn0TQYvWNvKLAwTX20qE+AfDCn47epIzHTr8UM2PuSvekftAsEFm0/tBQ1pGTDkNdfqcqIRpZAU8DN7gKNYNzdKPgV3wKIuiNNkg5qC21/OuuIwMhnJpNPzW0u4TbVqms33b8uR4ggFL9U96hSwoF347wVXfu2QKrUo+agsh3+OYQlPI5q/WioU9RIhRpoW1oXpCcL6CCiKufh83QV31WPXWyZ+AeqgakajfSxt8H8g3CiJk2vRIUlFjDWTXLeHvLOYPzcTyDuNz7SBNurX5tIF7TKeuG8t+x5/WJq4E76zz2q+MIEJFDQaegFCeHg0MlJixgAAI96twYa8dnDe64zbMgfhV/12thA== 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)(5660300002)(33656002)(82960400001)(122000001)(83380400001)(66946007)(76116006)(8936002)(66556008)(64756008)(66446008)(52536014)(110136005)(66476007)(86362001)(54906003)(2906002)(6636002)(4326008)(8676002)(316002)(26005)(55016003)(71200400001)(7696005)(508600001)(9686003)(186003)(107886003)(38070700005)(38100700002)(53546011)(6506007); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?Oz7HxXOy7Cu8o5ss+qw4Sh/LrDBNeopCHaKd0UvNycT+YBYXyG34hyvFUAo9?= =?us-ascii?Q?wql/dUsWP9oq30VBPdv5hgnBi2+bQIa404F6jk4H9LFf9Nv597ISjdkQO+Kt?= =?us-ascii?Q?Ky2K+l1Y8lYBcyhh0iCIhfIXvWF7UmPebmj9RI9Wn8CaUPpoj4o08y81nE2E?= =?us-ascii?Q?MZtKbRqzxVLULTUuE1W3lCXo4L6EKijxRF+BoA/E7sOM3uYsfZUoh66K2D3X?= =?us-ascii?Q?eIO0bM8edilptZunSNUcK03gzm/mFDD6C8ipXuGGEMHOidf0k8mittJdliKi?= =?us-ascii?Q?6TlYt5eM4MC6vZ5MTSz+ea8nnB7TrX+cMhhUNCFnqrUKUQqp+PHYIbB6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0GAfNvTPcqTkECmi+5E7fxKZP+lM7J?= =?us-ascii?Q?UP/2C5/4WSeTvgeuCmcih8bHQxBSuAoEvjBme7OnlnkzFRrjbKx7r4eAFsh7?= =?us-ascii?Q?AogP3DM8JgQ4HjqwbuiRAcQGmhyrbjNwPODlyvuz4iz/QmM83q5Ahb4LjE9w?= =?us-ascii?Q?AaN0fIiAF+N8VMOz74lGxf6v+kID1SruWmzgyq2HPSYyFDvJg0piePKnG7gG?= =?us-ascii?Q?NSM4cx8QEUPfKQ8GwZoGWUGkwYLlG4YjxcTfU3ur614e6VbCgt31tG+yYX02?= =?us-ascii?Q?jZL563kKfGpVhG5bIKJyf3WnbR2QfupKrKaqpNdFnPDTQTQhoWt0wTHE+ThC?= =?us-ascii?Q?Lcg3o+ue0wn2hRf72O8WOInM0J8wP+I+H78e5wGZ5N15nS5tob5i5s8aiT49?= =?us-ascii?Q?kpeYcuEniZPeH9IqdGrHGiZ7jolN0xNL7oYfmCCGgWv3mK6YK54/Y4HvO94m?= =?us-ascii?Q?Us9pKf3eNGpIsOmkIGbTgfj4BSHDBwVASmmNrAeNqPXVE24muLYIugKf4r9A?= =?us-ascii?Q?yu4Z5GHSnw=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: 23fe40b1-52a0-41bc-6db7-08da2fe4199f X-MS-Exchange-CrossTenant-originalarrivaltime: 07 May 2022 04:43:15.4805 (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: tRxh0nZeMc9ukkX1AFKSNhELYwt3v957eIifAOja6JUEH9HoNn1BDWypIBPB/wZWs2e0kpDVElIQAWpvNcKSSw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR11MB4301 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 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 >=20 >=20 >=20 > > -----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 lead 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; >=20 > No need this check, we can init use_flex as true; >=20 I'm not sure if use_flex can be init as true. is it possible that vf->vf_re= s->vf_cap_flags doesn't contain VIRTCHNL_VF_OFFLOAD_RX_FLEX_DESC? > > + > > +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))) { >=20 > Check if rxq->rxdid is in supported list is not necessary, this has been > guaranteed when we set it. >=20 According to debugging, this is not guaranteed. rxq->rxdid is set to IAVF_RXDID_COMMS_OVS_1 by default when vf->supported_r= xdid =3D=3D 6 (just contains IAVF_RXDID_LEGACY_1 and IAVF_RXDID_FLEX_NIC). > 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 a= s > legacy for all , this is something not be expected by user >=20 >=20 Agreed, I will do this in v2. Thanks.