From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70048.outbound.protection.outlook.com [40.107.7.48]) by dpdk.org (Postfix) with ESMTP id 570391B3BB for ; Thu, 22 Nov 2018 12:42:34 +0100 (CET) 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=3Fyxtkwmz6fMf8E5D1kaxQZdMkhhCvV3x407hLB+0ng=; b=kq2LPB6RgWtO+04y3F61KiBqo8AsIxCrOYitCOJat58FjswqawPebe/dLAD5TWdxTh1GQOsBLti7iXZUX15jRKB4EtLn3Ho3dpvUpKQD0Gd3QK2qZUZFwelIJuzb3SlFWRDTrslE4Atp6QNv+wJ0vRlBYczzrV1XSyNvp5G0JSk= Received: from DB7PR05MB4426.eurprd05.prod.outlook.com (52.134.109.15) by DB7PR05MB5445.eurprd05.prod.outlook.com (20.177.123.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1339.28; Thu, 22 Nov 2018 11:42:32 +0000 Received: from DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::bc22:c2f5:208d:826f]) by DB7PR05MB4426.eurprd05.prod.outlook.com ([fe80::bc22:c2f5:208d:826f%2]) with mapi id 15.20.1294.048; Thu, 22 Nov 2018 11:42:31 +0000 From: Shahaf Shuler To: Slava Ovsiienko CC: "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] net/mlx5: fix VLAN inner ethernet type on E-Switch Thread-Index: AQHUgcHrJJVA1b87q02ZicJhhDpxq6VbrN4A Date: Thu, 22 Nov 2018 11:42:31 +0000 Message-ID: References: <1542822278-15153-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1542822278-15153-1-git-send-email-viacheslavo@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=shahafs@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; DB7PR05MB5445; 6:VU/QsRMsTrvNL9MLMG+t4DEr8okUQnCB9yKmXg5fUkdo31JgeE7Ff2B5eEXTYgaUZ1XjJxl2pVp/qi8czKA5u7A/eg4LkX6/+EYVzAQlpwTp59RjbpiIkxE30EAoTZ1Z38mT3jZjDhQVyS3BiO+V8veAXWWoYlkbI9NKFuuTwXwfuGr3VhDo5BRhHcvOq/s4j/hGnvYhNgOwvIbAeFDWQ12RTcGSRHRw7Gskmfc4OxkGKwGyINiK6MIYRKJ9n3IBkW1qnKFXLfSi8OaiHiB9x2R0SZJKj6ZpyvQl5hke4Xtc1HImGoffX0xP+Rtlzq3HikwiMZPNbIygcc79cW/esxQtI3CObXZw8YcTXikFO+YohUYLTd3BcNwN0hiX21z/L+2PSBLr13OiZdAgVWLszT27DgSbYhAuwaWj+JXpTiOffaQ3ONb2FVmX1e1qeHZscSbvGp0Unq9rsAM61dzqRQ==; 5:Utn2QGI9X2CkAql/C8XNnBYRj1xp8N1t32YOcPePJ3CG02FNa8pFI2+kKrJR23gOBgaxql9R94Uo2iZ8OOiqbExhobYUhJi/Nwi7sDJA/jqfVmyQgNSfqnEWhfaHFIYY3tH356bSdk8Fw7huBKnaS6pJVnKyy+NR62qO8WxsIYw=; 7:hRaL2fKXuTYoaNtYc4/EYPaqFDdu7qJ9EAUod8Z5GCv5aOh/M2TGdl8YKnHDqgETFI2VA78HqLpJz+oRgxGD9qwQyY9/wmIyaic+QRIyVGGmqfdEVKLiyVS0E2uXB1imBHIgMQSBXiV+kDZdcKwQZA== x-ms-exchange-antispam-srfa-diagnostics: SOS; x-ms-office365-filtering-correlation-id: 1d0c91e5-a7e2-4f01-5cbd-08d6506f96aa x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR05MB5445; x-ms-traffictypediagnostic: DB7PR05MB5445: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(3002001)(10201501046)(3231442)(944501410)(4982022)(52105112)(6055026)(148016)(149066)(150057)(6041310)(20161123558120)(20161123560045)(20161123564045)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(201708071742011)(7699051)(76991095); SRVR:DB7PR05MB5445; BCL:0; PCL:0; RULEID:; SRVR:DB7PR05MB5445; x-forefront-prvs: 0864A36BBF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(979002)(376002)(346002)(39860400002)(396003)(366004)(136003)(189003)(199004)(476003)(74316002)(2900100001)(5660300001)(305945005)(6636002)(14444005)(106356001)(105586002)(7736002)(53936002)(4326008)(81156014)(6306002)(9686003)(33656002)(575784001)(55016002)(6436002)(6246003)(316002)(8936002)(68736007)(229853002)(446003)(86362001)(71190400001)(71200400001)(14454004)(76176011)(102836004)(966005)(478600001)(6506007)(186003)(3846002)(26005)(99286004)(2906002)(81166006)(6862004)(11346002)(97736004)(256004)(25786009)(66066001)(7696005)(486006)(45080400002)(6116002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR05MB5445; H:DB7PR05MB4426.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-microsoft-antispam-message-info: SUCTXW7nXOnWRG+j4roJxszxDxYA0m3xO1XOfcbQ9vaOewb4tLQxedul6HgG4h6iyBktJaQFjYVcG5QYv5eMdDETjHQhk0CnnFXY8z7TWHAayZdjG0WVL85DKsQtEB99h+qwjgwWcdNBKilUe0O4okrIO6/hYiIlgtS7RG659XdYoi5ZmHi4Ic63HbJ4bvzyDOVRgkycBLjImryFajQajkwxDQIa/mvUXQ3lVeL5MaXB3CvsGo4epJl7ndwdFt+iq5qMMQ+DhDRnva9aEAsPDHx4T6crMi5iYcE5JKMhrMa4UuPkVsHXn2R0TTrh3VRqPUqSQKpVOJfFxcrj1mhtu/ilpgz1bbklFc7C3QtxHXw= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM 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: 1d0c91e5-a7e2-4f01-5cbd-08d6506f96aa X-MS-Exchange-CrossTenant-originalarrivaltime: 22 Nov 2018 11:42:31.7171 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR05MB5445 Subject: Re: [dpdk-dev] [PATCH] net/mlx5: fix VLAN inner ethernet type on E-Switch 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: , X-List-Received-Date: Thu, 22 Nov 2018 11:42:34 -0000 Wednesday, November 21, 2018 7:45 PM, Viacheslav Ovsiienko: > Subject: [dpdk-dev] [PATCH] net/mlx5: fix VLAN inner ethernet type on E- > Switch >=20 > The TCA_FLOWER_KEY_VLAN_ETH_TYPE should be specified for the E-Switch > Flows with VLAN and L3 pattern items in the Netlink messages. The patch > adds missing flower key to the messages. This patch partially reverts to = the > code smashed by > https://emea01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatc > hes.dpdk.org%2Fpatch%2F47781&data=3D02%7C01%7Cshahafs%40mellan > ox.com%7C6cdd88ebb5494ed2809908d64fd90b8f%7Ca652971c7d2e4d9ba6a4 > d149256f461b%7C0%7C0%7C636784190968004901&sdata=3Dy%2BjABP0X3 > Z%2FQ70nemjj%2FzBaFkJ8ndpK%2BO1VmIH5BGPE%3D&reserved=3D0 >=20 > Fixes: 251e8d02cf37 ("net/mlx5: add VXLAN to flow translate routine") >=20 > Signed-off-by: Viacheslav Ovsiienko Applied to next-net-mlx, thanks. Ferruh, please let me know if you think it can be added to 18.11, it is rel= atively small, local, yet important fix.=20 > --- > drivers/net/mlx5/mlx5_flow_tcf.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/net/mlx5/mlx5_flow_tcf.c > b/drivers/net/mlx5/mlx5_flow_tcf.c > index 22a866d..fb284c3 100644 > --- a/drivers/net/mlx5/mlx5_flow_tcf.c > +++ b/drivers/net/mlx5/mlx5_flow_tcf.c > @@ -3260,7 +3260,8 @@ struct pedit_parser { > assert(mask.ipv4); > spec.ipv4 =3D items->spec; > if (!decap.vxlan) { > - if (!eth_type_set && !vlan_eth_type_set) > + if (!eth_type_set || > + (!vlan_eth_type_set && vlan_present)) > mnl_attr_put_u16 > (nlh, > vlan_present ? > @@ -3317,14 +3318,14 @@ struct pedit_parser { > assert(mask.ipv6); > spec.ipv6 =3D items->spec; > if (!decap.vxlan) { > - if (!eth_type_set || !vlan_eth_type_set) { > + if (!eth_type_set || > + (!vlan_eth_type_set && vlan_present)) > mnl_attr_put_u16 > (nlh, > vlan_present ? >=20 > TCA_FLOWER_KEY_VLAN_ETH_TYPE : >=20 > TCA_FLOWER_KEY_ETH_TYPE, > RTE_BE16(ETH_P_IPV6)); > - } > eth_type_set =3D 1; > vlan_eth_type_set =3D 1; > if (mask.ipv6 =3D=3D > &flow_tcf_mask_empty.ipv6) > -- > 1.8.3.1