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 7AE44A10DA for ; Wed, 31 Jul 2019 09:39:15 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 024A91C0C3; Wed, 31 Jul 2019 09:39:14 +0200 (CEST) Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80077.outbound.protection.outlook.com [40.107.8.77]) by dpdk.org (Postfix) with ESMTP id 23ADC1C08C for ; Wed, 31 Jul 2019 09:39:12 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IA+MurSU/tczEDW1gkuVkTsuiRncj3ZpzSbd6WmP1SEmMxrLkXiRcPxqUdOGHdiCd8VE/gOC1EAeyRsSmLSs+hH+eO/BjJSOGJEDd7feLnibkZAWZyDzy0Ih9504YY1OAy9eJQKirwpz2suJL+n85FSgiWnwV7j7LA0TyWF7Uo//YMFEEwkqzJjCl67g7zH/ktKlxfBU9SKpLZXN5M3+03zbcVyCBDqa8ySbnEvgUKypw2k54WxOz/eaK0oTv/POVDnfNfoQNGD9AWmnp7QejZC4FMMmDI3OyaRPzGVmcKfj+C+SHm14+1/KLGj1EUqcU1w9cH7RW1gVRQFLPrB3lA== 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=dRaz8JbXUb8CPHEyZFN0fS1T3LbNBTyWV9D+1NobzKk=; b=Bs9aOEOS4zaDSvQNc+k1EiWa1VVeuorfWTujyqQq8pwloh13D9G86V0V5C1q5pCNGCtm7EaQcpueqfrq9BsZcEYeoa9DGgENv50uocZaOZGGUYmegpiVbjeiE/hrmW+ak0TTD4OiLEPUh4n3AQTqEp2oPXKiL4wvPZusI+mR0z9pL+zEsyaLiFhYbfytdamDaHsFffdH8u+LU4EQYfcqnS0OkGKuaTP8j/JfkDmvpzFx0gViyf7jJJXwEd6OAhB2JvyXrUsPQzvLnXtD0irqY5aqGk3T2d1WYlkbZnpf7Os4qfl0gZHDF8Ctc1AKMcAEhjGWv8gDc4B+A26u2hcV9w== 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=dRaz8JbXUb8CPHEyZFN0fS1T3LbNBTyWV9D+1NobzKk=; b=XQCL1iIBnnjP3P+ZhEhURVdcqN/O81T43o9xrkloNvUbXtOc8LjSYVR6bIRgA4xASCFM0KJ5ab5zdBVpgi7he8KC0KzWoV2/ASZ4n18Dso+D6rW/ETGbWyI7CDApArzVx0p/5xTRPBHHl3TG61QknzOTDjaEbtOf4cEc8HGSqmw= Received: from DB3PR0502MB3964.eurprd05.prod.outlook.com (52.134.65.161) by DB3PR0502MB3945.eurprd05.prod.outlook.com (52.134.65.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2115.15; Wed, 31 Jul 2019 07:39:11 +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.2115.005; Wed, 31 Jul 2019 07:39:11 +0000 From: Raslan Darawsheh To: Slava Ovsiienko , "dev@dpdk.org" CC: Yongseok Koh , Shahaf Shuler Thread-Topic: [dpdk-dev] [PATCH v3] net/mlx5: add workaround for VLAN in virtual machine Thread-Index: AQHVRrgOKFlo3/+DeUiyPZ3pP/XzGKbkWHvQ Date: Wed, 31 Jul 2019 07:39:11 +0000 Message-ID: References: <1564414004-24336-1-git-send-email-viacheslavo@mellanox.com> <1564478424-7686-1-git-send-email-viacheslavo@mellanox.com> In-Reply-To: <1564478424-7686-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=rasland@mellanox.com; x-originating-ip: [212.29.221.74] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 73fe7935-b272-490d-8418-08d7158a2d9a 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:DB3PR0502MB3945; x-ms-traffictypediagnostic: DB3PR0502MB3945: x-ms-exchange-purlcount: 1 x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 011579F31F x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(346002)(39860400002)(396003)(136003)(366004)(199004)(189003)(13464003)(76116006)(7696005)(66946007)(66446008)(64756008)(66556008)(66476007)(76176011)(99286004)(53936002)(9686003)(6306002)(6436002)(5660300002)(4326008)(6246003)(66066001)(966005)(107886003)(229853002)(25786009)(52536014)(14454004)(478600001)(7736002)(74316002)(305945005)(45080400002)(71190400001)(71200400001)(6116002)(3846002)(2501003)(33656002)(68736007)(486006)(86362001)(14444005)(11346002)(446003)(256004)(476003)(186003)(26005)(102836004)(55016002)(81166006)(81156014)(8936002)(53546011)(6506007)(316002)(2906002)(54906003)(110136005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR0502MB3945; 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: 8vddAkGgQzmDPo9xbhKOUtCCNgI6e7QcqftP210W4bkLKnzZW6aPXODRhnPY/IXNBUwnVWjchcZisuX6q4fiBHKLObrEmdT5UthvraoajXgmg58pXBhcX5iubTmu7ZMa9CPbPXb+AvfNQvlYMQe4p8G2QXZRdFq+Ph6UuGhEhjQwfDU+nt2CfraJY7+Ul/snKJOr7k+wqz5tB4nonKWkMCSYNtqv4fZBrQSX7+tvExmo1DrZ8bp5wT3FjgHoafTkwsuVCoM/1DTxnEZi20IBfKXkbYRthHdO0modexlXyIaD8zt3X3INCr7nLWxDSrDCErADkGB6iNnDqGRvbKdOAbUb724cjX+Sg0PXSoxlljcjfQnjDURzY0e5ih9fGiqozCdJiADyqJPs60zZ5TKo3IVj5vBZhq72CoKi2zMegM0= 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: 73fe7935-b272-490d-8418-08d7158a2d9a X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jul 2019 07:39:11.0506 (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: DB3PR0502MB3945 Subject: Re: [dpdk-dev] [PATCH v3] net/mlx5: add workaround for VLAN in virtual machine 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 Viacheslav Ovsiienko > Sent: Tuesday, July 30, 2019 12:20 PM > To: dev@dpdk.org > Cc: Yongseok Koh ; Shahaf Shuler > > Subject: [dpdk-dev] [PATCH v3] net/mlx5: add workaround for VLAN in > virtual machine >=20 > On some virtual setups (particularly on ESXi) when we have SR-IOV and > E-Switch enabled there is the problem to receive VLAN traffic on VF > interfaces. The NIC driver in ESXi hypervisor does not setup E-Switch > vport setting correctly and VLAN traffic targeted to VF is dropped. >=20 > The patch provides the temporary workaround - if the rule > containing the VLAN pattern is being installed for VF the VLAN > network interface over VF is created, like the command does: >=20 > ip link add link vf.if name mlx5.wa.1.100 type vlan id 100 >=20 > The PMD in DPDK maintains the database of created VLAN interfaces > for each existing VF and requested VLAN tags. When all of the RTE > Flows using the given VLAN tag are removed the created VLAN interface > with this VLAN tag is deleted. >=20 > The name of created VLAN interface follows the format: >=20 > evmlx.d1.d2, where d1 is VF interface ifindex, d2 - VLAN ifindex >=20 > Implementation limitations: >=20 > - mask in rules is ignored, rule must specify VLAN tags exactly, > no wildcards (which are implemented by the masks) are allowed >=20 > - virtual environment is detected via rte_hypervisor() call, > and the type of hypervisor is checked. Currently we engage > the workaround for ESXi and unrecognized hypervisors (which > always happen on platforms other than x86 - it means workaround > applied for the Flow over PCI VF). There are no confirmed data > the other hypervisors (HyperV, Qemu) need this workaround, > we are trying to reduce the list of configurations on those > workaround should be applied. >=20 > Signed-off-by: Viacheslav Ovsiienko > Acked-by: Matan Azrad >=20 > --- > v3: - address the comments, workaround engaged on ESXi and > unrecognized hypervisors only. > v2: - > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatch > es.dpdk.org%2Fpatch%2F57257%2F&data=3D02%7C01%7Crasland%40mell > anox.com%7C08938c4de2d04258577408d714cf2ed5%7Ca652971c7d2e4d9ba6 > a4d149256f461b%7C0%7C0%7C637000752398914593&sdata=3Daf8Rd126wr > zuOLQ3UMDbArZwDQbdGq1PwpOtHbBM3Cc%3D&reserved=3D0 > - rebase > v1: - > https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fpatch > es.dpdk.org%2Fpatch%2F56450%2F&data=3D02%7C01%7Crasland%40mell > anox.com%7C08938c4de2d04258577408d714cf2ed5%7Ca652971c7d2e4d9ba6 > a4d149256f461b%7C0%7C0%7C637000752398914593&sdata=3DppBPLBrdw > O442I4xyrZOqqdqNirHlg%2FpeOn4lqjH4hc%3D&reserved=3D0 > --- > drivers/net/mlx5/mlx5.c | 6 + > drivers/net/mlx5/mlx5.h | 33 +++++ > drivers/net/mlx5/mlx5_flow.c | 22 +++ > drivers/net/mlx5/mlx5_flow.h | 5 + > drivers/net/mlx5/mlx5_flow_dv.c | 33 ++++- > drivers/net/mlx5/mlx5_flow_verbs.c | 25 +++- > drivers/net/mlx5/mlx5_nl.c | 294 > +++++++++++++++++++++++++++++++++++++ > 7 files changed, 414 insertions(+), 4 deletions(-) >=20 Patch applied to next-net-mlx, Kindest regards, Raslan Darawsheh