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 28E14A055E; Wed, 26 Feb 2020 10:34:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D0911BFB1; Wed, 26 Feb 2020 10:34:24 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140051.outbound.protection.outlook.com [40.107.14.51]) by dpdk.org (Postfix) with ESMTP id AAD2E2C02 for ; Wed, 26 Feb 2020 10:34:22 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OnLL+Wbk29BLY8sdyt71f5OhWUPHeSjDAAXNh13Fv6FckNDiWkmAqxRsQQ7T/gm7VJD6xrlLxqTZD1XPuVEj00qkclcRNVr3kU2LBvNt0V6IoxCn9ac/Txy7HvRq6kdvJ+uK3GZPcaTRjfpKvCQ8Y7xDl51qYQqS3oTeqCVXNdYSx/rjFYuRGKcIzYzspdTUyMpawNB7v+Um9kSgICdrEPoxMwTkmZz2TFGkAZvEqBR77qlW/nu2QJlR2GpBVwvdvbOfoeti+1DWX64JN9Y5UVKhx7zJpWZcVvBmXMEd/suDgTCa8i/wJPDfjwGfdwU/gOghjCoHtgJobKVTGFxlRA== 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=IEqhKUu5gy+lyYXmUgrz4VAa2xJaNDOZTtqEoyuSF44=; b=nZXHTgqGUt9pd3Z5rF1yi6lKttXBccLy5Y382L80pC1teFKOv7/0s0PcZ7F4MpBPAeC9v8ivBJDa7uDysJ3risduims2QkGm8tU6w5FhLp/G2ybhE7rrDGtTuTbqSQwM90rhnR0gPHGT0Tgd6O2w6bRlCZExwPAwn70ipfRKAe3eQrGdSxRhNddm3clBznwLlBFCjjLXh9awhs4zRM0eTOiM6ig8ijCvPal48J8AmPpkDXngCvLY9WrL/wdmtmSdXaYLtfCSBvaQHYkxn7e9WCq8MbuHmQ5uadCUCjFEeC8BLh0rZ23aWbvgQYowg5+M0ztctp195i0rwxhAymsH9Q== 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=IEqhKUu5gy+lyYXmUgrz4VAa2xJaNDOZTtqEoyuSF44=; b=rzReMn0+m4U9MOAvVD4bsagoU60kkgkkWwd0KuH0mcmR7V7k20P2oux+s24uGzXz9LzTip8Z8xzr7o+hl3ZdiA7AQudOIYQXlwTep66P9Yklrxl/rLBcyd62lZxz6EDBKQwFTaOIy9QXsuToVaGbLUfrpnP6yGg8Hsc3X9YRDNI= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3411.eurprd05.prod.outlook.com (10.171.190.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2750.21; Wed, 26 Feb 2020 09:34:21 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::da5:7919:35c1:894]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::da5:7919:35c1:894%6]) with mapi id 15.20.2772.012; Wed, 26 Feb 2020 09:34:21 +0000 From: Slava Ovsiienko To: Ophir Munk , "dev@dpdk.org" CC: Thomas Monjalon , Raslan Darawsheh , Ophir Munk Thread-Topic: [dpdk-dev] [PATCH v1] net/mlx5: fix VLAN PCP item calculation Thread-Index: AQHV7H6qVJE5b42wok6pJhR4IWlTvqgtNBgA Date: Wed, 26 Feb 2020 09:34:20 +0000 Message-ID: References: <20200226082748.18445-1-ophirmu@mellanox.com> In-Reply-To: <20200226082748.18445-1-ophirmu@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=viacheslavo@mellanox.com; x-originating-ip: [95.164.10.10] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: a2825915-cfda-4901-3498-08d7ba9f0f05 x-ms-traffictypediagnostic: AM4PR05MB3411:|AM4PR05MB3411: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtFwd,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2582; x-forefront-prvs: 0325F6C77B x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(199004)(189003)(2906002)(81166006)(66946007)(64756008)(66556008)(76116006)(498600001)(66446008)(33656002)(71200400001)(81156014)(7696005)(66476007)(52536014)(86362001)(8936002)(54906003)(107886003)(4326008)(53546011)(9686003)(110136005)(8676002)(26005)(6506007)(5660300002)(55016002)(186003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3411; H:AM4PR05MB3265.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: BCL:0; x-microsoft-antispam-message-info: l6iyDVHz3OWJqN0eahh+QasTEEXxcCIjJMAf5iAqZuYsDXVz0RyRJGWfiuSPRimytsN3/cavwjFkeP5Puvp3tLHq2mxAYPkppyVOqBXDIAnIO+HbEvD2kFuBAZkuvXLWjz/TznYwsYfwu5j8vhSpBIVv0C438X+ZqmJPM1mYdVSQZ5oRS61JP548QsBQ6HwwtjgZOqxZNM/IPaTAOsDSKYlIX4aUdvoGy4nIHa8IDowN2EFtvRYTkL6mGVR9mqRYHOa2OfSvReezWtbNoN9y6BMG/FcA48G2XwRZ69zV7f+jSBRRZZCohUB+MoSb18Q+K+MRdWsnVRgsTfstLkx0eA1Q7KRM0T3DBEOX4UtIN2xJAjUAHYpkrn1nGPRBInaFesazKVMGrVpJTpvOZBuIEPLNT0eyvSDgvU0YLZqgyD3+NSzD/kZLIXypnOSV49/5 x-ms-exchange-antispam-messagedata: t/6tPayxV8E+Zh1p3jxF+sQdkwua0ru3VqwJ30Nfh3p4D/aek17HysIM7G8IoEpxzxozfHOdf049E5ztLcGfuuK0O1ax8X18kFQJCJtRoB6gX6GhWjQo6d5LQNpWU/X2czbCt2V9NJgfHRSFPHA4bw== 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: a2825915-cfda-4901-3498-08d7ba9f0f05 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Feb 2020 09:34:20.9860 (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: JOLqP84R+LBgnmqLyTRHs6Sf1tebb4dpSku8vPfpNNnimBdeFNlc6sD86pK8qzg4gkMzdmd4Bp13bCEVjiR1hVMK5LLgI/5BYc4DYS0GFjE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3411 Subject: Re: [dpdk-dev] [PATCH v1] net/mlx5: fix VLAN PCP item calculation 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" > -----Original Message----- > From: dev On Behalf Of Ophir Munk > Sent: Wednesday, February 26, 2020 10:28 > To: dev@dpdk.org > Cc: Thomas Monjalon ; Raslan Darawsheh > ; Ophir Munk > Subject: [dpdk-dev] [PATCH v1] net/mlx5: fix VLAN PCP item calculation >=20 > The VLAN 16 bits tci field contains both values of PCP and VID. When > extracting any one of them - it is required not to affect the other one. > Previous to this commit in routine flow_dev_get_vlan_info_from_items() > we calcualted the PCP as follows: > (1) vlan->vlan_tci &=3D MLX5DV_FLOW_VLAN_PCP_MASK; > (2) vlan->vlan_tci |=3D <3 bits value of PCP> In line (1) we should h= ave used > the negated mask ('~' operator) such that only the PCP bits will be nulli= fied > before ORing them with the updated PCP value. >=20 > Fixes: 9aee7a8418 ("net/mlx5: support push flow action on VLAN header") >=20 > Signed-off-by: Ophir Munk Acked-by: Viacheslav Ovsiienko PS. Ophir, I suppose this patch should be sent to the stable@dpdk.org eithe= r. > --- > drivers/net/mlx5/mlx5_flow_dv.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c > b/drivers/net/mlx5/mlx5_flow_dv.c index 06592b5..2414a97 100644 > --- a/drivers/net/mlx5/mlx5_flow_dv.c > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > @@ -1771,7 +1771,7 @@ flow_dev_get_vlan_info_from_items(const struct > rte_flow_item *items, > /* Only full match values are accepted */ > if ((vlan_m->tci & MLX5DV_FLOW_VLAN_PCP_MASK_BE) =3D=3D > MLX5DV_FLOW_VLAN_PCP_MASK_BE) { > - vlan->vlan_tci &=3D MLX5DV_FLOW_VLAN_PCP_MASK; > + vlan->vlan_tci &=3D ~MLX5DV_FLOW_VLAN_PCP_MASK; > vlan->vlan_tci |=3D > rte_be_to_cpu_16(vlan_v->tci & >=20 > MLX5DV_FLOW_VLAN_PCP_MASK_BE); > -- > 2.8.4