From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id B0631A058F; Wed, 25 Mar 2020 16:37:18 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7D9102C15; Wed, 25 Mar 2020 16:37:17 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70077.outbound.protection.outlook.com [40.107.7.77]) by dpdk.org (Postfix) with ESMTP id 202C42BCE; Wed, 25 Mar 2020 16:37:15 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jI5kLu+QvwUtZcBDMaXZLT6s8myQxqFGeAqC81tEfjkFmCPiDN0BkX8yayb0QaByqOqbeqvhvG4a0GW1zVOJ5FFZWP/GTCE/mKy/6UkHpHL+E/A3GaF+xd+HFvEa9FvwT6it7rYl1A22njj/K3RUaqx/gh6lY/Rb9NuljkK1CKdk7EE0zhGnVMgIj9i2oVPaBNgXQHOw47PcdPHOkzp3MaW5rfsh7Mzjwa9FO0ZbDNlrl9xrIlpX+R/1S2oW+X1jCEFDT05TajBa9cCb2DtZ+r5ydus5nDS48bnLLDTAq/vLBo4vcYNFpURD3oWd6qMdK2Nb2EmSM81d/ayBVxmLDQ== 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=RRuKIm+kCXlJ+apaqKHzYBp1W7wYUFsNR8KO6oMPag8=; b=b3YKI3Cj7hHzTa6Add+H1lMVPYNtW3eAEFglEuizNgGmLBofiZx0ygdUY1s8+vYdHEF++A2lRXogn4KGMDeYgRjLNIQZ5jSKbtQ1LTjWUoQsy+SMjQat0ffM7+5cmoau8VbJuYkuzBJPfmw2ipPJDeHHBlBqHcHdDfdY9uUki5lZXex6WRNIFG6Up3Hq9CBamkBasmA3F1JsUQLvU4YE4+l40G21rWoMUnSaHj/x5JB5Sg/GwwpvUCIw8Xc77IrjfPcwNWE61WpQDgDVxq1mzsIR195h7HZZv8Vz4teuCm3GMx3zYZcPozBLlpAmeIyAkWJ7Xt8DQZ4Raj1tMSXsIw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RRuKIm+kCXlJ+apaqKHzYBp1W7wYUFsNR8KO6oMPag8=; b=hBDQOt44jAw/jdNY6max7WC632et2+jx5g44hdcLiYUHk3R48+PVMmgN0Ot3D/W7pFF7a+V133+Adjb9SS/l7iVujoW4DfwVJLtrb57C9dFbcCn47EWOzHRszLV1Pv8664DT84gcLvjErgJj8Ks/j2fN6tmpRwUnLOHwTFUgsEE= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (10.186.174.145) by AM0PR05MB6737.eurprd05.prod.outlook.com (10.186.174.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Wed, 25 Mar 2020 15:37:13 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::adbd:45ca:54:bba9]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::adbd:45ca:54:bba9%7]) with mapi id 15.20.2835.023; Wed, 25 Mar 2020 15:37:13 +0000 From: Raslan Darawsheh To: Slava Ovsiienko , "dev@dpdk.org" CC: Matan Azrad , "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix metadata for compressed Rx CQEs Thread-Index: AQHWAdXpOUEhDG7yd0yL40rSB9D46qhZcsUA Date: Wed, 25 Mar 2020 15:37:13 +0000 Message-ID: References: <1585052118-29013-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1585052118-29013-1-git-send-email-viacheslavo@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=rasland@mellanox.com; x-originating-ip: [188.161.229.130] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 18c8696b-2183-41bb-cbb0-08d7d0d2640e x-ms-traffictypediagnostic: AM0PR05MB6737:|AM0PR05MB6737: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 0353563E2B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(55016002)(9686003)(498600001)(6506007)(53546011)(52536014)(33656002)(7696005)(71200400001)(5660300002)(26005)(186003)(76116006)(4326008)(81166006)(66946007)(450100002)(8936002)(8676002)(81156014)(110136005)(66476007)(64756008)(66446008)(2906002)(66556008)(86362001)(54906003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB6737; H:AM0PR05MB6707.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: M473t3tQWbNoKH7SEPPJ2MeTMUQbVqSDaPRFUD11ofCB8WHwEvAu1h4ORmoAZCo0SqoWMYQP/eZC/cEa4qw4pmpaDGLf9pwknWzeMffKLRhKexUQo0RgIFUzoqtkU+ri447CMe0V7W/079vWqj/2dQ+An7+tm5g5atUHJiZIOgEJFl37zei1A+igcYezYqbZ5fxTTWKnefXsEzQ2KMdkg/7PayvcTkpb+jpcC4Bf13k4DCptZ42tSvxeOleElanj/vPgcSs3EHZ5IQ59Ya7WDxrKDCPX4TYS40wQOPHcE2MKTuhko9xUpDEASVHzppJAqC/LD53DBN7xKf25EBxsOpGZhypUGz1UIvm+jQYJe3OJdFE4XHRqfFz2JNlS1nlqAtPwDSMt3ofFNg8MxG3Wm+ZUMygnqS5jtnXyTHIv6lnqphEpqrO/qAzEsWhjP8JZ x-ms-exchange-antispam-messagedata: JLew37E9pVhpR+IXwvLpnSThd0uXhf1ifomsLUofeOG+2ImCpRZl7wOdXKvKzvpff2fcy7SBJaFW9bwKrQTy6u6K5VUcBclpPobsXyhBCAVMjmRY9vVPrHb5uLAr41a3fDtDCH81M8AUWUwqBTvPAQ== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 18c8696b-2183-41bb-cbb0-08d7d0d2640e X-MS-Exchange-CrossTenant-originalarrivaltime: 25 Mar 2020 15:37:13.5878 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: VomwQxq4FAz4wZ461kYKrlAv2XV6/cgp9Vqv+aah2EiQj9uiXSRZWPHLUNrEwhZfz/vNOtppuo65ljp4Tokk1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6737 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix metadata for compressed Rx CQEs X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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, > -----Original Message----- > From: dev On Behalf Of Viacheslav Ovsiienko > Sent: Tuesday, March 24, 2020 2:15 PM > To: dev@dpdk.org > Cc: Matan Azrad ; stable@dpdk.org > Subject: [dpdk-dev] [PATCH] net/mlx5: fix metadata for compressed Rx CQEs >=20 > If packets with the same metadata are received with compressed CQE > the metadata value is not copied from the title packet in vectorized > rx_burst routines, it causes wrong metadat values seeing by > applications. >=20 > Fixes: a18ac6113331 ("net/mlx5: add metadata support to Rx datapath") > Cc: stable@dpdk.org >=20 > Signed-off-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_rxtx_vec_altivec.h | 13 +++++++++++++ > drivers/net/mlx5/mlx5_rxtx_vec_neon.h | 13 +++++++++++++ > drivers/net/mlx5/mlx5_rxtx_vec_sse.h | 14 +++++++++++++- > 3 files changed, 39 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h > b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h > index aa43cab..ae5c857 100644 > --- a/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h > +++ b/drivers/net/mlx5/mlx5_rxtx_vec_altivec.h > @@ -263,6 +263,19 @@ > elts[pos + 2]->hash.fdir.hi =3D flow_tag; > elts[pos + 3]->hash.fdir.hi =3D flow_tag; > } > + if (rte_flow_dynf_metadata_avail()) { > + const uint32_t meta =3D > *RTE_FLOW_DYNF_METADATA(t_pkt); > + > + /* Check if title packet has valid metadata. */ > + if (meta) { > + MLX5_ASSERT(t_pkt->ol_flags & > + PKT_RX_DYNF_METADATA); > + *RTE_FLOW_DYNF_METADATA(elts[pos]) =3D > meta; > + *RTE_FLOW_DYNF_METADATA(elts[pos + 1]) > =3D meta; > + *RTE_FLOW_DYNF_METADATA(elts[pos + 2]) > =3D meta; > + *RTE_FLOW_DYNF_METADATA(elts[pos + 3]) > =3D meta; > + } > + } >=20 > pos +=3D MLX5_VPMD_DESCS_PER_LOOP; > /* Move to next CQE and invalidate consumed CQEs. */ > diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h > b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h > index 6d952df..701e5e0 100644 > --- a/drivers/net/mlx5/mlx5_rxtx_vec_neon.h > +++ b/drivers/net/mlx5/mlx5_rxtx_vec_neon.h > @@ -205,6 +205,19 @@ > elts[pos + 2]->hash.fdir.hi =3D flow_tag; > elts[pos + 3]->hash.fdir.hi =3D flow_tag; > } > + if (rte_flow_dynf_metadata_avail()) { > + const uint32_t meta =3D > *RTE_FLOW_DYNF_METADATA(t_pkt); > + > + /* Check if title packet has valid metadata. */ > + if (meta) { > + MLX5_ASSERT(t_pkt->ol_flags & > + PKT_RX_DYNF_METADATA); > + *RTE_FLOW_DYNF_METADATA(elts[pos]) =3D > meta; > + *RTE_FLOW_DYNF_METADATA(elts[pos + 1]) > =3D meta; > + *RTE_FLOW_DYNF_METADATA(elts[pos + 2]) > =3D meta; > + *RTE_FLOW_DYNF_METADATA(elts[pos + 3]) > =3D meta; > + } > + } > pos +=3D MLX5_VPMD_DESCS_PER_LOOP; > /* Move to next CQE and invalidate consumed CQEs. */ > if (!(pos & 0x7) && pos < mcqe_n) { > diff --git a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h > b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h > index 406f23f..a4086df 100644 > --- a/drivers/net/mlx5/mlx5_rxtx_vec_sse.h > +++ b/drivers/net/mlx5/mlx5_rxtx_vec_sse.h > @@ -118,7 +118,6 @@ > 14, 15, 6, 7, > 10, 11, 2, 3); > #endif > - > /* > * A. load mCQEs into a 128bit register. > * B. store rearm data to mbuf. > @@ -191,6 +190,19 @@ > elts[pos + 2]->hash.fdir.hi =3D flow_tag; > elts[pos + 3]->hash.fdir.hi =3D flow_tag; > } > + if (rte_flow_dynf_metadata_avail()) { > + const uint32_t meta =3D > *RTE_FLOW_DYNF_METADATA(t_pkt); > + > + /* Check if title packet has valid metadata. */ > + if (meta) { > + MLX5_ASSERT(t_pkt->ol_flags & > + PKT_RX_DYNF_METADATA); > + *RTE_FLOW_DYNF_METADATA(elts[pos]) =3D > meta; > + *RTE_FLOW_DYNF_METADATA(elts[pos + 1]) > =3D meta; > + *RTE_FLOW_DYNF_METADATA(elts[pos + 2]) > =3D meta; > + *RTE_FLOW_DYNF_METADATA(elts[pos + 3]) > =3D meta; > + } > + } > pos +=3D MLX5_VPMD_DESCS_PER_LOOP; > /* Move to next CQE and invalidate consumed CQEs. */ > if (!(pos & 0x7) && pos < mcqe_n) { > -- > 1.8.3.1 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh