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 238D0A00E6 for ; Mon, 5 Aug 2019 15:00:20 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EA4041BDFA; Mon, 5 Aug 2019 15:00:19 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80079.outbound.protection.outlook.com [40.107.8.79]) by dpdk.org (Postfix) with ESMTP id 0DC9C1BCB8 for ; Mon, 5 Aug 2019 15:00:19 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iJw8zvhsO8p+KTmQeSKkbFv3xMfdrFper0+JIFtRlqA+LIYKfgWdAQ4Qf+fwMWu+IQBKxbjdZNOjbp36GdD0Dv0AkSliOc5/4Vvpaszwgtyc4dZOCjb9bch/We0k9QIo1/8+eGJ6dulfbkwZ6sqK7CsY8LaKAvJIixeuEWpC+cnmXxF9Uerb/o5+Su1s/ODt7jIfjZwVo4YibBQGOt2rW4ESTrzJ6OvBkdSaxHBc/2j/zQ4I9Kqcb9e3EPy0HM0rT1xvEdVBwpW9EWlefh3/PspH03I0VIHD3NT4bYG2oc1X4tLfYpLIM4OKQKrLSATNPtAEEICNdVZOyhIz3LHuUA== 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=r4kg+P0NQ6mOzTThpK/xeSfnvWVyC+kGFK4+M/Ptyos=; b=cr5CgeMxGufXca7M3gS/qlLpDuCaF0TNcjQ7kqwHBNqJx7RV4BDHG1iKLxPfh9PAhmDLe4HSh+31iSD4Ri9QDiOQvTQC/GOCcDo4N+PP+EaBwowxH1NoVA+cIXIiSP+VaDmDv3WcjGj4lD+Q2t4D8QZZ+Xrioo6kYWnlSH+T5N//gWc6LwNvWZ8fHonLtiwLeOmnJUQPPepg58SOYQFdDryWuZDqrJsKjw4XYahs3+IK4AHDm2hH0fY1ZAytrukg2w09qQKYc2e4+xqtyMvj62DuQ2j5SPhlK6bGgAYoplWhVPv6pS9wHxI4ZjPuc3xX/pytfab/pnkc5xm2A0AuzA== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=r4kg+P0NQ6mOzTThpK/xeSfnvWVyC+kGFK4+M/Ptyos=; b=cDDlZb/+xX/bMbAmYJGe0DZ2jGdG6Mh4S+qOurIx8Kq0NO20ytsGNl6ma7ryBaOKqYDhhJJ2tDUlMPFlQwWszfx1sC203aENh58T31l3kVV3mx+kIY0j3gKjEEoub55D4ClnJzDNtOFAYgg89E0yONdlhO0s7mZjZNKjkj37GBY= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB4075.eurprd05.prod.outlook.com (52.134.67.13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2136.15; Mon, 5 Aug 2019 13:00:18 +0000 Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::b4f2:f531:d3ff:b7e3]) by DB3PR0502MB3964.eurprd05.prod.outlook.com ([fe80::b4f2:f531:d3ff:b7e3%5]) with mapi id 15.20.2136.018; Mon, 5 Aug 2019 13:00:18 +0000 From: Raslan Darawsheh To: Jack Min , Shahaf Shuler , Yongseok Koh , Slava Ovsiienko CC: "dev@dpdk.org" , Ori Kam Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix VLAN inner type matching on DR/DV Thread-Index: AQHVSRNNrcA/9lLcC06cG7w4m/DTx6bsiTwg Date: Mon, 5 Aug 2019 13:00:17 +0000 Message-ID: References: <0f1b3637c93d6f923ebcd4c56cc333959a570881.1564737358.git.jackmin@mellanox.com> In-Reply-To: <0f1b3637c93d6f923ebcd4c56cc333959a570881.1564737358.git.jackmin@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: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e9d87325-6c90-417f-f2cd-08d719a4dda7 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:DB3PR0502MB4075; x-ms-traffictypediagnostic: DB3PR0502MB4075: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5797; x-forefront-prvs: 01208B1E18 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(376002)(366004)(136003)(39860400002)(346002)(199004)(189003)(13464003)(9686003)(68736007)(6636002)(53936002)(446003)(11346002)(99286004)(6436002)(186003)(107886003)(4326008)(55016002)(25786009)(486006)(476003)(54906003)(110136005)(316002)(52536014)(7696005)(102836004)(5660300002)(66066001)(71190400001)(256004)(71200400001)(478600001)(26005)(14454004)(74316002)(66446008)(76176011)(2906002)(6116002)(229853002)(86362001)(3846002)(66946007)(66476007)(66556008)(76116006)(64756008)(6246003)(8936002)(33656002)(7736002)(53546011)(6506007)(81166006)(8676002)(81156014)(305945005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB4075; H:DB3PR0502MB3964.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 8NGwcMZFXOvbeAQvjglksRjJQjOovelDwFtPYEjRRdB/OK3Fhw1muSEhfz19TXW601AHctzVqoPVoHM07qTeCwy85BvCYLVVQmae8t7cklwHeI+XDpo8bZcJsbVzWu3yWFJz+l9Vm+uf+Lj1HecWSdPSBALhyuNU0Ni1uBkIVbwcS3yBEHDbYTAwfRHy6LwcAr5azfYEogOa7Z457FDEeprLa6TgvaJWpQKgxxqCNAw02rOHPSr+JLbSAdGK1bC22magGLh5JCrG6z48QTkxdRduZKDNnBbEG1zxKUQ2vKBDunDawzCfR1fBCQDH4jlKZPVmIi2/cokkEXwZyW6ShqL1p+OOzR1gIbrI/z4LjNLFhsKEbcHgnqM00ban7sI84Hur7SMGS4LohH1TjFBJob1ieHpTmUFm1Y0IFOrki7g= 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: e9d87325-6c90-417f-f2cd-08d719a4dda7 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Aug 2019 13:00:17.9027 (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: rasland@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR0502MB4075 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix VLAN inner type matching on DR/DV 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 Xiaoyu Min > Sent: Friday, August 2, 2019 12:18 PM > To: Shahaf Shuler ; Yongseok Koh > ; Slava Ovsiienko > Cc: dev@dpdk.org; Ori Kam > Subject: [dpdk-dev] [PATCH] net/mlx5: fix VLAN inner type matching on > DR/DV >=20 > The rte_flow_item_vlan has the inner_type, which is missing on DR/DV flow > engine. >=20 > By adding this support, the example testpmd commands could be: >=20 > - matching all vlan traffic with id 2: >=20 > testpmd> flow create 0 ingress pattern eth / vlan vid is 2 / end > actions queue index 2 / end >=20 > - matching all ipv4 traffic in vlan with id 2: >=20 > testpmd> flow create 0 ingress pattern eth / vlan vid is 2 > inner_type is 0x0800 / end actions queue index 2 / end >=20 > Fixes: fc2c498ccb94 ("net/mlx5: add Direct Verbs translate items") > Cc: orika@mellanox.com >=20 > Signed-off-by: Xiaoyu Min > --- > drivers/net/mlx5/mlx5_flow_dv.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c index 9c0a2613d5..f786c7a2c4 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -3469,10 +3469,6 @@ flow_dv_translate_item_vlan(struct mlx5_flow > *dev_flow, { > const struct rte_flow_item_vlan *vlan_m =3D item->mask; > const struct rte_flow_item_vlan *vlan_v =3D item->spec; > - const struct rte_flow_item_vlan nic_mask =3D { > - .tci =3D RTE_BE16(0x0fff), > - .inner_type =3D RTE_BE16(0xffff), > - }; > void *headers_m; > void *headers_v; > uint16_t tci_m; > @@ -3481,7 +3477,7 @@ flow_dv_translate_item_vlan(struct mlx5_flow > *dev_flow, > if (!vlan_v) > return; > if (!vlan_m) > - vlan_m =3D &nic_mask; > + vlan_m =3D &rte_flow_item_vlan_mask; > if (inner) { > headers_m =3D MLX5_ADDR_OF(fte_match_param, matcher, > inner_headers); > @@ -3507,6 +3503,10 @@ flow_dv_translate_item_vlan(struct mlx5_flow > *dev_flow, > MLX5_SET(fte_match_set_lyr_2_4, headers_v, first_cfi, tci_v >> 12); > MLX5_SET(fte_match_set_lyr_2_4, headers_m, first_prio, tci_m >> > 13); > MLX5_SET(fte_match_set_lyr_2_4, headers_v, first_prio, tci_v >> > 13); > + MLX5_SET(fte_match_set_lyr_2_4, headers_m, ethertype, > + rte_be_to_cpu_16(vlan_m->inner_type)); > + MLX5_SET(fte_match_set_lyr_2_4, headers_v, ethertype, > + rte_be_to_cpu_16(vlan_m->inner_type & vlan_v- > >inner_type)); > } >=20 > /** > -- > 2.21.0 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh