[dpdk-dev] [PATCH v3] net/mlx5: add workaround for VLAN in virtual machine
Raslan Darawsheh
rasland at mellanox.com
Wed Jul 31 09:39:11 CEST 2019
Hi,
> -----Original Message-----
> From: dev <dev-bounces at dpdk.org> On Behalf Of Viacheslav Ovsiienko
> Sent: Tuesday, July 30, 2019 12:20 PM
> To: dev at dpdk.org
> Cc: Yongseok Koh <yskoh at mellanox.com>; Shahaf Shuler
> <shahafs at mellanox.com>
> Subject: [dpdk-dev] [PATCH v3] net/mlx5: add workaround for VLAN in
> virtual machine
>
> 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.
>
> 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:
>
> ip link add link vf.if name mlx5.wa.1.100 type vlan id 100
>
> 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.
>
> The name of created VLAN interface follows the format:
>
> evmlx.d1.d2, where d1 is VF interface ifindex, d2 - VLAN ifindex
>
> Implementation limitations:
>
> - mask in rules is ignored, rule must specify VLAN tags exactly,
> no wildcards (which are implemented by the masks) are allowed
>
> - 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.
>
> Signed-off-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
> Acked-by: Matan Azrad <matan at mellanox.com>
>
> ---
> v3: - address the comments, workaround engaged on ESXi and
> unrecognized hypervisors only.
> v2: -
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatch
> es.dpdk.org%2Fpatch%2F57257%2F&data=02%7C01%7Crasland%40mell
> anox.com%7C08938c4de2d04258577408d714cf2ed5%7Ca652971c7d2e4d9ba6
> a4d149256f461b%7C0%7C0%7C637000752398914593&sdata=af8Rd126wr
> zuOLQ3UMDbArZwDQbdGq1PwpOtHbBM3Cc%3D&reserved=0
> - rebase
> v1: -
> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fpatch
> es.dpdk.org%2Fpatch%2F56450%2F&data=02%7C01%7Crasland%40mell
> anox.com%7C08938c4de2d04258577408d714cf2ed5%7Ca652971c7d2e4d9ba6
> a4d149256f461b%7C0%7C0%7C637000752398914593&sdata=ppBPLBrdw
> O442I4xyrZOqqdqNirHlg%2FpeOn4lqjH4hc%3D&reserved=0
> ---
> 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(-)
>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
More information about the dev
mailing list