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 7F6FCA0487 for ; Mon, 29 Jul 2019 17:28:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 21ED21BFB8; Mon, 29 Jul 2019 17:28:27 +0200 (CEST) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-eopbgr140077.outbound.protection.outlook.com [40.107.14.77]) by dpdk.org (Postfix) with ESMTP id 353561BF71; Mon, 29 Jul 2019 17:28:25 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U0lkbvd5TWaw04RrMgy963/VbP/DJHC3Ufzd+fReLz4mgyyOsRdTnCpvchFjtZDN5IMNGahKsfvU8oLq0IGa8cjNyQFCBVUKs3tBNJuaQpIoZVkQyeC3LFMN4wiU+yZTwcuCIJP3KOSaJN4xijb9I+XVYRaqzgPG+NsH+LivL23PCtehhsLs0DtudVFVV+YaeuS1nVScfD+5ER2VBlucfvGQWW6nEt+0AiNSC1I6mEpqtX2Vc9oJI+i+9pVWi8q7CpZ7Ll65JZOka3JzBcQPF38p2iqCYWn1ZBa9vz1EETx+RLlrgFSLgfNHWHx/v4HpnfUqYJkPI612e9mWvNUAcg== 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=y21yRfjCYTBPRzsfvz467W4R9IWejnrfN7aHkLm+mrM=; b=N7byr5OpTCcCzryTtOaKWLKY5bVg4tjYLXkyu+gmTiV5Qz0r3nVr+nGijCDBu8xjDtlpeyxm/4ccsNN8qMMrZOJ5MnOXpjY6JLd7XILm0ICRDjeQX4HyYq2n4TBdOjBEgjOaqvd5g8/sl/gN3H4mz3wUXY/mIWzwnh8l2r+XaLvgQDyLBv2gqsTsVnl69iAtdkU6cd3gqDBvXVPTUjz7iFIXXQ/VrrFWM1ytxhsUVeL6iLQRG/StjvoDGNNTflLV4JjwD0UPpv41je4OaghRotKk8G+soDooH+AS7bC1LberQnDRhH0aUn87eEzYiF4oGiYdwwRAGhcc1Cng40SD1A== 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=y21yRfjCYTBPRzsfvz467W4R9IWejnrfN7aHkLm+mrM=; b=bqvvgH0Y1hi7u8SoDQq3jxYDXcZNaSi1rtel/zn9XjyHgJNO6F7u+G3ob/gcAn3NdUYL+sgEunDdOkcQFlltvU3DtnsUtpPs95EbcLsc/pYnFN2Vsnv+oz/wJqTP6ONMEAElT18iciQxwtSu8s9XaJ23/qo57LM9gH0J/v3KWMs= Received: from AM4PR05MB3265.eurprd05.prod.outlook.com (10.171.188.154) by AM4PR05MB3442.eurprd05.prod.outlook.com (10.170.126.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2094.16; Mon, 29 Jul 2019 15:28:22 +0000 Received: from AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::ec83:c573:8eda:b6a]) by AM4PR05MB3265.eurprd05.prod.outlook.com ([fe80::ec83:c573:8eda:b6a%4]) with mapi id 15.20.2115.005; Mon, 29 Jul 2019 15:28:22 +0000 From: Slava Ovsiienko To: Dekel Peled , Yongseok Koh , Shahaf Shuler CC: Ori Kam , "dev@dpdk.org" , "stable@dpdk.org" Thread-Topic: [PATCH] net/mlx5: fix validation of VLAN pcp item Thread-Index: AQHVRiB4jKDFQjkwjkOGxis8oovKjqbhuC7w Date: Mon, 29 Jul 2019 15:28:22 +0000 Message-ID: References: <8a12820a10a6d485a24fa224601ba0a487363ca6.1564413233.git.dekelp@mellanox.com> In-Reply-To: <8a12820a10a6d485a24fa224601ba0a487363ca6.1564413233.git.dekelp@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-correlation-id: 920e164d-c882-44cd-fd23-08d714396445 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600148)(711020)(4605104)(1401327)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:AM4PR05MB3442; x-ms-traffictypediagnostic: AM4PR05MB3442: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:826; x-forefront-prvs: 01136D2D90 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(136003)(39860400002)(346002)(396003)(376002)(13464003)(199004)(189003)(66556008)(64756008)(71200400001)(66446008)(66476007)(305945005)(81166006)(81156014)(7736002)(33656002)(11346002)(71190400001)(14454004)(66946007)(6116002)(74316002)(186003)(4326008)(76116006)(476003)(26005)(8936002)(446003)(3846002)(99286004)(53936002)(6636002)(486006)(68736007)(6436002)(478600001)(9686003)(6506007)(53546011)(5660300002)(14444005)(6246003)(8676002)(256004)(25786009)(86362001)(450100002)(229853002)(2906002)(102836004)(76176011)(7696005)(316002)(55016002)(52536014)(54906003)(110136005)(66066001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3442; 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-message-info: LZugII9IUbT/nuh7SMetfDqZmtcheVsbks8TCNzVnQ7IiY7LLIcVnrBlUWkxYsOKI3yRR4nuEvK1KjiA81T0ctRRdIUglYJ5VIllX++e2M3gjz3T4WJ3IrF9nQkLNW3qAX5LKNTxkKjw+DJdrqudIp/8jRI+Mq9ilGUx81/FQiXqlrW+NEOtyezSr1BctXR1FAeWvn1BO7BlfZOZ8kapyrLDzlqXjnQcBX0aP0ziS9/1MqdixHTKdnS4OTn7vVhJ/vLrTzjmc8M2XNVo0ccGY6JQUdc/mJOADncdTaLwCO/0vuHY9DQB5nU+aCjlTnF5D8tGkR2k77Kn3SVjJ4eyY/FfcKMZCXiuDJXFE97oT9e2Zsind4m/+I1U1OBC/xPHIhcFXyp4wIuomjjWg9RgKJQq4paQ2Jp2Mmob3Z5hWSg= 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: 920e164d-c882-44cd-fd23-08d714396445 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jul 2019 15:28:22.3114 (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: viacheslavo@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3442 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix validation of VLAN pcp item 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: Dekel Peled > Sent: Monday, July 29, 2019 18:15 > To: Yongseok Koh ; Slava Ovsiienko > ; Shahaf Shuler > Cc: Ori Kam ; dev@dpdk.org; stable@dpdk.org > Subject: [PATCH] net/mlx5: fix validation of VLAN pcp item >=20 > Function mlx5_flow_validate_item_vlan() validates the user setting is > supported by NIC, using a mask with TCI mask 0x0fff. > This check will reject a flow rule specifying a vlan pcp item. >=20 > This patch updates mlx5_flow_validate_item_vlan() to use mask 0xffff, so > flow rules with vlan pcp item are accepted. >=20 > Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated functi= on") > Cc: stable@dpdk.org >=20 > Signed-off-by: Dekel Peled Acked-by: Viacheslav Ovsiienko > --- > drivers/net/mlx5/mlx5_flow.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c > index 3d2d5fc..ec25fde 100644 > --- a/drivers/net/mlx5/mlx5_flow.c > +++ b/drivers/net/mlx5/mlx5_flow.c > @@ -1218,8 +1218,8 @@ uint32_t mlx5_flow_adjust_priority(struct > rte_eth_dev *dev, int32_t priority, > const struct rte_flow_item_vlan *spec =3D item->spec; > const struct rte_flow_item_vlan *mask =3D item->mask; > const struct rte_flow_item_vlan nic_mask =3D { > - .tci =3D RTE_BE16(0x0fff), > - .inner_type =3D RTE_BE16(0xffff), > + .tci =3D RTE_BE16(UINT16_MAX), > + .inner_type =3D RTE_BE16(UINT16_MAX), > }; > uint16_t vlan_tag =3D 0; > const int tunnel =3D !!(item_flags & MLX5_FLOW_LAYER_TUNNEL); > -- > 1.8.3.1