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 6390FA0A02; Fri, 26 Mar 2021 02:51:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D4309140DBC; Fri, 26 Mar 2021 02:51:02 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id AD2904067B; Fri, 26 Mar 2021 02:51:01 +0100 (CET) IronPort-SDR: pS3wAN23pG6XovJEczmf/Vp2DhZhr3A0+wrEkj4WlObRMZC1qnq/wDnmFEGSRsfgUVW/Y87spI BiFWHib9yVSA== X-IronPort-AV: E=McAfee;i="6000,8403,9934"; a="191088990" X-IronPort-AV: E=Sophos;i="5.81,278,1610438400"; d="scan'208";a="191088990" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2021 18:51:00 -0700 IronPort-SDR: TCP1dW6ORvkvMef5jvNYOlqLi6JQ3lJJlx+zGMIRrXTucO0mxMiNwQ6eH6ry9phs59b8NKyMX+ 97pgnjbF1Y+w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,278,1610438400"; d="scan'208";a="414381402" Received: from fmsmsx604.amr.corp.intel.com ([10.18.126.84]) by orsmga007.jf.intel.com with ESMTP; 25 Mar 2021 18:50:58 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx604.amr.corp.intel.com (10.18.126.84) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 25 Mar 2021 18:50:57 -0700 Received: from fmsmsx609.amr.corp.intel.com (10.18.126.89) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2; Thu, 25 Mar 2021 18:50:56 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx609.amr.corp.intel.com (10.18.126.89) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2106.2 via Frontend Transport; Thu, 25 Mar 2021 18:50:56 -0700 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2106.2; Thu, 25 Mar 2021 18:50:56 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XF5jSSSaGqrIuybmnLM9ZySVuoXAI+7qIAbUiz7CsuBForjzFCMnoQ874umqQIArNiLpc1QhuCdWuKiqcRZDqWTZSPqddFE879qPeuHMjwCFQQ6uKRBjlhM2xPehTnxipYgHKG8HUnDaoawoYqeZpa82ELqnKVvf+WsnRxIsJTWkEAQS4UVvaJVIPgL6uLkzkF1kJ53Kd7Tm1dmikf7KfVyEEpk21jt+fIEU0KFRP4PrpaLVhxffAUHu5XMMZIN6/OFP6RWmcvDAWGAUjxf0FvnREAFIsIqPWHJE+diVKeuOyJYQXF7C48pflqWf9mgc14SkHyx6+06Exn4EuN6tkQ== 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-SenderADCheck; bh=HdyoDlE9ggiISAd1ZZQpqdZsCCUfUkpJWusBqWqlFSM=; b=lAj58gaw8uP0fxt2GIN5TWxzSTIsN/FdMpzeIMOH8tfki8nhTZYBFeLLLAjq7o8ifHMJM7hYQp/cPkwiIVh+RbM0Sn1x36jvV0n+OTwvA43zI972aVbmywxaoT0/qH9y3LQqN0rOb1AIDnbGXz1ef22IySblch3xy2C+wdMcxjE/K6YQf8DRDptwzveHasbIw6JzgHSLPJDE2CJxxASLETGIffLENGArDkLIA5fYDf9k9hvKXBCHPqW9h1W15/9pH7SSJsBTWfePfDI1Du+Yr5A6kSvxgLF/LPVqVQ8IhFkHbGw0ie5i2Usa75nlf/mV5mWUZnt8FwArdeEs9I68SQ== 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=HdyoDlE9ggiISAd1ZZQpqdZsCCUfUkpJWusBqWqlFSM=; b=iDnZo861C5AfxsqyOybBRB1wmI3xCh2fKVp01qSybWJYb8WJEGAkh3ZAmfateyfeHqICPuEf26cOiOZxQ5yfP0hifKFh02NvEyj36M3yoA0FPXZN06APmALX/HvTwCFC+0/K2n3dTxUHNpE3UwWszuFLA1SdOzljE1S1EDA59Hw= Received: from DM5PR11MB1787.namprd11.prod.outlook.com (2603:10b6:3:112::18) by DM5PR11MB1929.namprd11.prod.outlook.com (2603:10b6:3:10a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.29; Fri, 26 Mar 2021 01:50:54 +0000 Received: from DM5PR11MB1787.namprd11.prod.outlook.com ([fe80::ac6b:3e4b:65d9:8e21]) by DM5PR11MB1787.namprd11.prod.outlook.com ([fe80::ac6b:3e4b:65d9:8e21%8]) with mapi id 15.20.3977.029; Fri, 26 Mar 2021 01:50:54 +0000 From: "Lu, Wenzhuo" To: "Coyle, David" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH 3/3] net/i40e: fix segment fault in AVX512 Thread-Index: AQHXFt7kS9hHSGgMPUmW3LYKIBF2PKqFVlQAgBA+zxA= Date: Fri, 26 Mar 2021 01:50:54 +0000 Message-ID: References: <1615512441-17495-1-git-send-email-wenzhuo.lu@intel.com> In-Reply-To: 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-originating-ip: [192.198.147.206] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 51b178e3-6b26-4990-f71d-08d8eff997a5 x-ms-traffictypediagnostic: DM5PR11MB1929: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:10000; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 9HttOa/eWlvMZTK2qF4OY5lzqRl5Vk+ha1WrsKgCTOpcSU0ELf3FDHpTHeYiQeRQy2shkuxOVEOCzuc9hn2NxH9p3wmAc4qgWkGrv0Sq4d4Ez93bESJmu7NHukB1LOJR9oBlqdDfQhVKxHkdMQUDVnKe/fg/w9uqzPeE2hnWfvOxxFsSVfvF9vE8UatNSjvACEXardqm8tmPQPd6peY2e0PYEzcWTMr+95HazyWJhHwpJQhKDETLDhlU9EFJKcmRrQbRGOd9HX+y+mJ77duabQ6x+nXqx3Dsv8Fz8vahx5ZP++ldnnU+EsltgzE0E6MZo0kxTtClaz8N4gwShReOn4oTNH4SWUGBy0DiUfISW9w49tJke/flckB/8Am2AICzsioeO6n4B6RjKPtCu0VLErpr3qVYSizb+A96YEVRWLmmtJCnW41BQd9qVCv0AJbup+xq9tXN7xA5u2gPNy6f32qpnZhSCHGxEnYruBQAEaKoamrnPJLT2sXE3yKS/t/yTAu+xa3FY3heM6upfbLZqcq11SwgbsOUB5xLmsF/iMTOXmgjyT6L0s4xL9BqGC8x46inAY1rnDerw1v3UU5dLuFvUNYps6HmR5sRZOhfoZdrKX9P1/QOhkDVlZR8bprGNEJlvSCi7wrwie7cijhGmjU5md6cyodtbZjtNa2c8Yo= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM5PR11MB1787.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(346002)(136003)(366004)(39860400002)(376002)(396003)(66556008)(66476007)(76116006)(52536014)(64756008)(2906002)(6506007)(66446008)(86362001)(316002)(110136005)(450100002)(9686003)(66946007)(5660300002)(478600001)(71200400001)(33656002)(4326008)(55016002)(186003)(26005)(7696005)(8936002)(8676002)(38100700001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?s4Ws+oDAB9ObVp5E/qk3skVxV1biOLK0+3p2naKVeWn3uvI+sSmMokm8mYgX?= =?us-ascii?Q?gkdCzQWnoafY0tQ/E+QoiBproBswN+9FnyoIveL4Zh6R9MipL9nrrBocUwb/?= =?us-ascii?Q?y3jRDlF49ydkAzdnU4y3csysrYME8NqJYuyabKFKLut3h3j/5KmISkhiLtmj?= =?us-ascii?Q?aI52PswWqPEmMDAk/a2Y14qFVeR6LITJoCcw0lR/FZ9Odqbwixu5c1eAhM1a?= =?us-ascii?Q?I9NfvszE2F5+/h16cMlb+4JRAG1oQzSCwLuEY6U4KwlCLfdxXgJwlYElvBJn?= =?us-ascii?Q?oTIpj48Dkg6WXujuYaoFwYopNai+T4Q7IJWwu/giEgKPnbWl6hdGUUr+ApE+?= =?us-ascii?Q?dZlezoUkswDCucec4FpBfWG8++0BSQ+FUJ2gFHAxTf1TTD4Dg9bVV062f9Pt?= =?us-ascii?Q?zOAHfegtzLDcfSb8rXtutE0ZqthYJ1GweENqvcA43AtwA05Bc1Z4i1Xa6p5N?= =?us-ascii?Q?i/sbzJnoF7KHCKw0mL13gsMNGiZUtICZS+92GYOCIz1xgcz5/1svN+pEslGb?= =?us-ascii?Q?8JCIE/VTdrudDysi0XZNsxjTZC/mY87XkMTeLILjudPITtloLMZUIkJejx3z?= =?us-ascii?Q?FTqGK0LDXMmqCJPJbWhAhjx8sSsCobsonwhfAqf1HVs9ItJZcSWs/PuV5oul?= =?us-ascii?Q?k2KBlL39ZBUby8gON1Z5ksAfsYUVlCq2uq6xpajPSBHRA8waFclJ26FYQE2V?= =?us-ascii?Q?qLNBRwzJWzUtCT2gFswkJT6ppgwufzIRVzIF5UyTCJZTojxZgETK8tUbgwqF?= =?us-ascii?Q?y2JqkkxVRcoySJka5wwwF/Epq3OpU7H3JDv+ESqlr+05s0d8djcYyJwCGfP7?= =?us-ascii?Q?uWJARBAVUAXfAJel23cnv6tEZ1SWkH7NrTzFBZDvN4RRSb/gXmRmvZPrdg7I?= =?us-ascii?Q?sksBRmOT5RI3MoeRv8IP/rjPfFsGLnJMxB/ee6/c0aUuqLItmsL26jPweR4c?= =?us-ascii?Q?V0A/ySOH1v5sUrnLQF32QcbATTr2xYsjGsEoBsBcnjjxakgoPsr/qntRw/+T?= =?us-ascii?Q?nio9hyPRtggqrCy5RgrMsRvtJ+pHtPNdb7AU/4NNiKp97i9/so4XOKnKh+6C?= =?us-ascii?Q?oAdjeGuzr2QyrFrBeIT8Md1XoKw1awU4Qh0Y0nX1t8SHI7sBEKmZH2+lCrTN?= =?us-ascii?Q?+ru7GeoS8F96ZZPBIMBPZOtxP/JisC8CPc9H5pC17uAumuKilYx94iAF33+v?= =?us-ascii?Q?Lon64xmUuSzaah/6Q3ats1ZGevxAPHpkBKYmd3TXcuOZclEmNFoT9Z/FMtWT?= =?us-ascii?Q?jwLcQVNRbkhgy8qWwnrScdIYh5GiJVpg9hvKbyZFKCoZIeqUeswx5Jx5/8rz?= =?us-ascii?Q?ovwHeptQ/8iRkND1D9PgcxO0?= 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: DM5PR11MB1787.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51b178e3-6b26-4990-f71d-08d8eff997a5 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Mar 2021 01:50:54.0487 (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: Xn3kb6D0jz/t3KsdBI5DVkPSI3ed8UCiunsWW5D+XEV2gxyrp3B5Y08x7GkLjpOanK5VTOn8NB0gaPMMsDDTrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR11MB1929 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 3/3] net/i40e: fix segment fault in AVX512 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" Hi David, Sorry for the late response. > > + if (!cache) > > + goto normal; >=20 > [DC] Like in IAVF and ICE, should we also check for cache->len =3D=3D 0, = like is > done in Tx path? Not necessary because below code tries to get more buffer is length is not = as long as needed, it covers the case even if the length is 0. > > + /* Initialize the mbufs in vector, process 4 mbufs in one loop */ >=20 > [DC] Comment should say 2 mbufs Thanks. Will correct it. > > _mm512_set1_epi64(RTE_PKTMBUF_HEADROOM); > > + /* Initialize the mbufs in vector, process 4 mbufs in one loop */ >=20 > [DC] Comment should say 8 mbufs Thanks. Will correct it. > > + /** > > + * merge 0 & 1, by casting 0 to 256-bit and inserting 1 > > + * into the high lanes. Similarly for 2 & 3 > > + */ >=20 > [DC] Comment should say "Similarly for 2 & 3, 4 & 5, 6 & 7" Thanks. Will correct it. >=20 > > + vaddr0_1 =3D > > + > > _mm256_inserti128_si256(_mm256_castsi128_si256(vaddr0), > > + vaddr1, 1); >=20 > >=20 > > + /* flush desc with pa dma_addr */ > > + _mm512_store_si512((__m512i *)&rxdp->read, > > dma_addr0_3); > > + _mm512_store_si512((__m512i *)&(rxdp + 4)->read, > > dma_addr4_7); > > + } > > +#endif >=20 > [DC] Again, there's common code here with the avx2 file and also with the > IAVF and ICE PMDs. >=20 > As I said in other reviews, maybe it's not practical to share code across= PMDs. > But might be good to have some common functions within each PMD for > avx2 and avx512 paths Most of the code looks same but not all. In this avx512 file, some avx512 i= nstructions are used to replace the avx2 ones. Let me check if some common code can be saved.