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 E1D77A052E; Sun, 1 Mar 2020 12:16:47 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 17C321C02D; Sun, 1 Mar 2020 12:16:47 +0100 (CET) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2074.outbound.protection.outlook.com [40.107.22.74]) by dpdk.org (Postfix) with ESMTP id 194AC1C029 for ; Sun, 1 Mar 2020 12:16:46 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jHcCvte0eUth6RjpIe1ZKLsDK0fTyPYcd+tTvrAMMueoTZ2ZMOKZVabPz/Z0E1pcnxICKd6kxlIe9BfyNWXzOWmCbO8xKDfw21V70Kl1mSIugBRBlpWq9XY6r0TJfB4ysgy7XPRvD6WKjGe8aJYd8fMFYV7LxN3TDnzuQ7+ipzbU0jWB8JffcWaC4VGSLyXACUPF0kLUlWDJUONlMwGqEraflXD80g7Qzx5I9knzBLoD/dIKyp6HVJRQlpivzPbtBlfzJKaMxQpFL1kBf3xFNztjaT9uzvDYkkkQU2PLBfaKGCMlm5SDgIKApaX1sNDKTP4pvm+i3RXCOClO3TrZHA== 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=aT9QaWdF5+F2dKKzw0cH9YeiWpNsEzgUepT0iMkbmW0=; b=WZP9geuP34MUtwWGFp/E8wK9ASZe1V5vYXFVyfu/PtY2ecWVPwCkf1Ry096dCdFRiFtcBR9vA+041Y7zd6hl6US2l+GuHNsunf5hB/q3G3x0t92yP2pphwJXfERfyEs6cuiW2qNhJl8LlgARNSFyQvMvOcHiQm+tj+zFol5oEVAN7cKe9AkO8+RQm76GUXIkt2OmWD9lppaNguXMZf7a/kMd0SxtVP9JQOi+1giP6mBdXKsqsaJZ5oi2uhcDt8eqILS/J4LHY8OCTwFawjRpO1+UkrtXg5pwqi/iyEUwz/9pd8fJMB5WZqgpVY5mVWtiyOqw0ZdZwF5T1uRuh67jWQ== 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=aT9QaWdF5+F2dKKzw0cH9YeiWpNsEzgUepT0iMkbmW0=; b=HuK1qIDLoUUTJ4tqWrZ0Z3pR99D3d/QJFyiq4JtCu2cdYlLeT26BLq1D5y7DbFjefc5sJBYjLHKlwlEid8XbzUUelrVMqJAKkOiMqQIQUFrIVR1Le51RuxYNJyQx8Dh8VzNM8EPv+eV7PK4Dsr4kSY14NthAB5TC3jobBn4yHdI= Received: from AM0PR05MB6707.eurprd05.prod.outlook.com (10.186.174.145) by AM0PR05MB6433.eurprd05.prod.outlook.com (20.179.35.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.15; Sun, 1 Mar 2020 11:16:43 +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.2772.019; Sun, 1 Mar 2020 11:16:43 +0000 From: Raslan Darawsheh To: Ophir Munk , "dev@dpdk.org" CC: Thomas Monjalon , Ophir Munk Thread-Topic: [PATCH v1] net/mlx5: fix VLAN PCP item calculation Thread-Index: AQHV7H6sFUCForwrNUafoFoJiA4sc6gznKYA Date: Sun, 1 Mar 2020 11:16:43 +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=rasland@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 8ac6272e-ffa0-4016-f829-08d7bdd205f7 x-ms-traffictypediagnostic: AM0PR05MB6433:|AM0PR05MB6433: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:800; x-forefront-prvs: 0329B15C8A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(39860400002)(136003)(346002)(376002)(366004)(396003)(189003)(199004)(478600001)(52536014)(5660300002)(86362001)(110136005)(4326008)(54906003)(316002)(2906002)(8936002)(81166006)(81156014)(8676002)(107886003)(9686003)(66476007)(76116006)(66556008)(64756008)(66446008)(7696005)(33656002)(6506007)(71200400001)(66946007)(55016002)(53546011)(186003)(26005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM0PR05MB6433; H:AM0PR05MB6707.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: 3NVaV9rRhhh/8jbboN+1dNk8d7JgGD5ADhHuLoZR7TjTfUANbbbaXkViiOKI+n/fg5b9a9f17tKg8fGvjL7mUDLG0q1MuQsrqgVcMQ/OP4BW+At7RKo76sJON9VzeEYqq54OkRPHwhO0QBeWIMjEQgn+NGHBD5KVR5A82uQukALIU0FqpafK1zYygKUh2iyw0uZvZS5bdsdwrmZIraobMJF1avhvNVxXSYAxpqnyje1OgqUlW4VjyzMq2szvQm8k2b3Hj5Zixej7wubZSQo9xn3W62WOHAnbPolBynz+eIWzYoc3lhzUZ194HE5lZV8jcv4O411sNegBXOqkJqmgja5zZKa0f6RIeO+1FK7YHJEjMtHuCJ8x2qwcr1XGdWE6A/y6xWEXsfE5WJBsLTkHIAHT5CQUvhkBbLBMEjKrshlyU0rzBck92hrTzB6zCDEo x-ms-exchange-antispam-messagedata: cmM2gXkQyTq4j2vqzzSatTvlePbZx0W5iupWMIOFaYoN4Fm3gNWg8/bQJMVLiL8dY6EN/AWvaN7qBX1WQuoXmr3s0tkmVgZOvDam/emnQyoC6XVnN+XDsr4nxRclGVPSFBLPjOWyuI+H3xPlt0dDSw== 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: 8ac6272e-ffa0-4016-f829-08d7bdd205f7 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2020 11:16:43.5898 (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: nrPabUtMYjfnbaA/Zck7F1vNEa4fZpxRq2s+/8UzE4FJT1xQEtnNpzqAbW5T3mCeh96LyGTXlRnAt9BMg1yy3w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR05MB6433 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" Hi, > -----Original Message----- > From: Ophir Munk > Sent: Wednesday, February 26, 2020 10:28 AM > To: dev@dpdk.org > Cc: Thomas Monjalon ; Raslan Darawsheh > ; Ophir Munk > Subject: [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 have used the negated mask ('~' operator) such > that only the PCP bits will be nullified 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 > --- > 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 Added Cc: stable@dpdk.org, Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh