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 6A940A04B5; Wed, 28 Oct 2020 00:41:29 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BB6DDC864; Wed, 28 Oct 2020 00:25:33 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 444CB31FC for ; Wed, 28 Oct 2020 00:24:03 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from ophirmu@nvidia.com) with SMTP; 28 Oct 2020 01:23:57 +0200 Received: from nvidia.com (pegasus05.mtr.labs.mlnx [10.210.16.100]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 09RNNrs5026642; Wed, 28 Oct 2020 01:23:57 +0200 From: Ophir Munk To: dev@dpdk.org, Raslan Darawsheh Cc: Ophir Munk , Matan Azrad , Tal Shnaiderman , Thomas Monjalon Date: Tue, 27 Oct 2020 23:23:16 +0000 Message-Id: <20201027232335.31427-54-ophirmu@nvidia.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20201027232335.31427-1-ophirmu@nvidia.com> References: <20201027232335.31427-1-ophirmu@nvidia.com> Subject: [dpdk-dev] [PATCH v1 53/72] net/mlx5/windws: add VLAN stubs 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" This commit adds stubs to VLAN VM operations. It is the Windows equivalent implementation of (1). The Linux implementation was based on Netlink APIs which are not supported in Windows. (1) commit 7af10d29a4a0 ("net/mlx5/linux: refactor VLAN") Signed-off-by: Ophir Munk --- drivers/net/mlx5/windows/meson.build | 1 + drivers/net/mlx5/windows/mlx5_vlan_os.c | 83 +++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+) create mode 100644 drivers/net/mlx5/windows/mlx5_vlan_os.c diff --git a/drivers/net/mlx5/windows/meson.build b/drivers/net/mlx5/windows/meson.build index b5d9f0e..87e34d3 100644 --- a/drivers/net/mlx5/windows/meson.build +++ b/drivers/net/mlx5/windows/meson.build @@ -6,5 +6,6 @@ sources += files( 'mlx5_os.c', 'mlx5_mp_os.c', 'mlx5_ethdev_os.c', + 'mlx5_vlan_os.c', ) diff --git a/drivers/net/mlx5/windows/mlx5_vlan_os.c b/drivers/net/mlx5/windows/mlx5_vlan_os.c new file mode 100644 index 0000000..d3b11e0 --- /dev/null +++ b/drivers/net/mlx5/windows/mlx5_vlan_os.c @@ -0,0 +1,83 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright 2020 Mellanox Technologies, Ltd + */ + +#include +#include +#include +#include + +/* + * Not needed by this file; included to work around the lack of off_t + * definition for mlx5dv.h with unpatched rdma-core versions. + */ +#include + +#include +#include + +#include +#include + +/* + * Release VLAN network device, created for VM workaround. + * + * @param[in] dev + * Ethernet device object, Netlink context provider. + * @param[in] vlan + * Object representing the network device to release. + */ +void +mlx5_vlan_vmwa_release(struct rte_eth_dev *dev, + struct mlx5_vf_vlan *vlan) +{ + RTE_SET_USED(dev); + RTE_SET_USED(vlan); +} + +/** + * Acquire VLAN interface with specified tag for VM workaround. + * + * @param[in] dev + * Ethernet device object, Netlink context provider. + * @param[in] vlan + * Object representing the network device to acquire. + */ +void +mlx5_vlan_vmwa_acquire(struct rte_eth_dev *dev, + struct mlx5_vf_vlan *vlan) +{ + RTE_SET_USED(dev); + RTE_SET_USED(vlan); +} + +/* + * Create per ethernet device VLAN VM workaround context + * + * @param dev + * Pointer to Ethernet device structure. + * @param ifindex + * Interface index. + * + * @Return + * Pointer to mlx5_nl_vlan_vmwa_context + */ +void * +mlx5_vlan_vmwa_init(struct rte_eth_dev *dev, uint32_t ifindex) +{ + RTE_SET_USED(dev); + RTE_SET_USED(ifindex); + return NULL; +} + +/* + * Destroy per ethernet device VLAN VM workaround context + * + * @param dev + * Pointer to VM context + */ +void +mlx5_vlan_vmwa_exit(void *vmctx) +{ + RTE_SET_USED(vmctx); +} -- 2.8.4