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 7EFE0A0563; Wed, 15 Apr 2020 17:35:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5ED491D96B; Wed, 15 Apr 2020 17:35:15 +0200 (CEST) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70042.outbound.protection.outlook.com [40.107.7.42]) by dpdk.org (Postfix) with ESMTP id 7F56E1D960; Wed, 15 Apr 2020 17:35:14 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KPVKLePpOcSGN3i0xqmHWoplqjFmBd4CZD4dqjsI3k1UEmKKsYEO5MpVs8RSZxDivucSmi+5kl4rvcRqAH31vJy7l9Z1boRym13aXFzajoEyDqMM4h17M9fvJO5MGggnatxlscHB64g4FXzpFD10SX0rdWGzb8y+c2C2ESyc8gR6Xl006nDIWgbpeBfUC6s/lxYxf8Jd10mZg8nF2CN9kkGs/RxOuJ3XONqPB+FF3OriXNRKeDZPJvJIdP4adgeyy52ZwAMg74vexirGlNyt9pjUwoA9SrsT26kLhggGfwBE9CC3MKnmREPApOFLXa3YjDRHpWaTSKf2K/GP5ps9JQ== 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=W6q3dMI6WOTH4zhOfZiRgP50N7Rc09yZKW5hCtizoR0=; b=Uc/rlJgKTRaB0UYA4Ztpdfozflg36/vP9TU1Vr7ixEpO3MWk9zM19IzdjEu/nI4GP2EQRbd2xNRvPG0u69vEvXpvu+6eKV/M3etuheBc8Na5e0fCsrA38mSQ8x+cNsZ6jLceoOk+I0Pdu8wXx0IU5x0nkLED/NxkV+hKRKbaU0XZI0l6ykvePEA8NN/I9O+Gl4ISNV3yTyp+DRT7ALcCZCcOUgawkRsn+fmbmBKo9eHCvxXtxr60ggsdQytdsSucjtpAA/dozOZJ+V6PmJwgJV5gT7asIbuzyw3wikj4Hm7M8TrTx6fH2rxs+MI/h6GpG73pwO2U7fHN4UUY9vhoBQ== 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=W6q3dMI6WOTH4zhOfZiRgP50N7Rc09yZKW5hCtizoR0=; b=Kmvh6IWAyWARFKQa5V63IE9l33dYNOk3pGiQtk8+HMbZWkdPsC0XnfC6g5n9ZGnTeONtUVxwihSHApjXvmXhvVS7A6l+JEHfzYTLo2/QFJUeL0lhF5zMZQ8zXMhreQmC1LPh/TTWGCMd+WzebcnnswnKkrnTkozTqEc/ozdm5gs= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (2603:10a6:20b:15b::17) by AM0PR05MB4385.eurprd05.prod.outlook.com (2603:10a6:208:67::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2900.26; Wed, 15 Apr 2020 15:35:13 +0000 Received: from AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e]) by AM0PR05MB6707.eurprd05.prod.outlook.com ([fe80::508:747b:cc12:5f6e%6]) with mapi id 15.20.2900.028; Wed, 15 Apr 2020 15:35:13 +0000 From: Raslan Darawsheh To: Jack Min , Matan Azrad , Shahaf Shuler , Slava Ovsiienko CC: "dev@dpdk.org" , "stable@dpdk.org" , Dekel Peled Thread-Topic: [PATCH v2] net/mlx5: fix push VLAN action wrongly use item info Thread-Index: AQHWEUOyLz2PEfFO60inH0ePrJLUdKh6VEyw Date: Wed, 15 Apr 2020 15:35:12 +0000 Message-ID: References: In-Reply-To: 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.230.106] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 2a4ff3c9-6d8a-4af9-0280-08d7e15296e5 x-ms-traffictypediagnostic: AM0PR05MB4385:|AM0PR05MB4385: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2887; x-forefront-prvs: 0374433C81 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM0PR05MB6707.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(376002)(39860400002)(136003)(346002)(366004)(396003)(8936002)(86362001)(64756008)(7696005)(4326008)(55016002)(110136005)(450100002)(54906003)(9686003)(107886003)(33656002)(81156014)(8676002)(71200400001)(66476007)(76116006)(26005)(6636002)(186003)(52536014)(2906002)(478600001)(316002)(53546011)(5660300002)(6506007)(66946007)(66446008)(66556008); DIR:OUT; SFP:1101; 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: yYmSB0FvZhjYs8727xqz013aY1+aTf1zE0ryimQwBT7p2IshuMQ9rQYO2Lnveu9WLtImz51FSppO1dSedtezwfICZjZlAXa/mZARs6lSjN1Bby2pxOvogHg4U829yqiNfMpYk+xlhgj35tb3DMniWpgkev29eWD+KQJc4Bmn/JyKqXwxRtcbBxOm1CkWZ6ByRHdNmd/MuVHZG+25cZQvnfqxkwg/mQNATLec171QsxSw7crvcD4EMDi4y/ArPPhNpTT7hPLRv2qtBLqoX7SmrNXHhKMw35UXzM+HKdkaVVNkSAktkRZW/No3W1gzrVFHb3WAiqNlgrRu1XVeKd0my3KnoGL7BwnHWnSdVj3HZ4oA4Ns2aWyOJZ5CgjRTlY+bzRH1dfXphY7GWSIsSdpg9PM1VwCASXEhqdpWU/GEA2risvdpPZKnk1S1ca1kXx3A x-ms-exchange-antispam-messagedata: YndCMk4jKNyNZkkXRyav4g+nrEZTqNIFXo6PIwayjxCtNlrwZjSoX1cjCrfMEbAOHnIKI+UaHl8+4etApZP1bFdqb+z1d878XhlDl6ChsuxzSC1AOZd9kONHgq3ztBzU93HwVDNIe8QOKmRtkK+45Q== 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: 2a4ff3c9-6d8a-4af9-0280-08d7e15296e5 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Apr 2020 15:35:12.9849 (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: 9vbnSDxW/Ypxyboi8+IZqX9wl5yUpXjUxUBQBrob/toiib/2eEWvo5Jmx94rShkC74IcQ0PAhcg2i+HfQLYnqw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB4385 Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: fix push VLAN action wrongly use item info 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: Xiaoyu Min > Sent: Monday, April 13, 2020 6:29 AM > To: Raslan Darawsheh ; Matan Azrad > ; Shahaf Shuler ; Slava > Ovsiienko > Cc: dev@dpdk.org; stable@dpdk.org; Dekel Peled > Subject: [PATCH v2] net/mlx5: fix push VLAN action wrongly use item info >=20 > Currently when PMD create push VLAN action it need to provide VID to HW > and PMD get VID value from item VLAN in pattern if there is no > of_set_vlan_vid action following. >=20 > When user create rule like [1], which has of_set_vlan_vid action > before of_push_vlan, the intention is to modify VID on existing VLAN > header and push a new VLAN header with VID _inherit_ from the previous > of_set_vlan_vid. >=20 > Currently the above is not covered by PMD, PMD always fetch the VLAN > information from item for of_push_vlan action. >=20 > Fix it by only fetch VLAN information from item when there is no > previous of_set_vlan_vid action. >=20 > [1]: testpmd> flow create 2 ingress transfer group 1 priority 3 pattern > eth / vlan vid is 2731 / ipv4 / end actions > of_set_vlan_vid vlan_vid 3209 / of_push_vlan ethertype > 0x88A8 / port_id id 1 / end >=20 > Fixes: b8c0372bc5ac ("net/mlx5: fix set VLAN ID/PCP in new header") > Cc: stable@dpdk.org >=20 > Signed-off-by: Xiaoyu Min > Reviewed-by: Dekel Peled > Acked-by: Viacheslav Ovsiienko > --- > v2: > - rebased > - added Acked-by tag >=20 > drivers/net/mlx5/mlx5_flow_dv.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c > index 18ea577f8c..106d0b9461 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -7511,7 +7511,9 @@ __flow_dv_translate(struct rte_eth_dev *dev, > action_flags |=3D > MLX5_FLOW_ACTION_OF_POP_VLAN; > break; > case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN: > - flow_dev_get_vlan_info_from_items(items, &vlan); > + if (!(action_flags & > + MLX5_FLOW_ACTION_OF_SET_VLAN_VID)) > + flow_dev_get_vlan_info_from_items(items, > &vlan); > vlan.eth_proto =3D rte_be_to_cpu_16 > ((((const struct rte_flow_action_of_push_vlan *) > actions->conf)- > >ethertype)); > -- > 2.26.0 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh