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 6D139A04B5; Sun, 13 Dec 2020 21:58:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 09C96CAAF; Sun, 13 Dec 2020 21:51:00 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id D6750C97C for ; Sun, 13 Dec 2020 21:50:20 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from talshn@nvidia.com) with SMTP; 13 Dec 2020 22:50:16 +0200 Received: from nvidia.com (l-wincomp04-vm.mtl.labs.mlnx [10.237.1.5]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 0BDKoDfl010910; Sun, 13 Dec 2020 22:50:16 +0200 From: Tal Shnaiderman To: dev@dpdk.org Cc: thomas@monjalon.net, matan@nvidia.com, rasland@nvidia.com, ophirmu@nvidia.com Date: Sun, 13 Dec 2020 22:50:03 +0200 Message-Id: <20201213205005.7300-31-talshn@nvidia.com> X-Mailer: git-send-email 2.16.1.windows.4 In-Reply-To: <20201213205005.7300-1-talshn@nvidia.com> References: <20201213102056.11380-2-talshn@nvidia.com> <20201213205005.7300-1-talshn@nvidia.com> Subject: [dpdk-dev] [PATCH v4 30/32] net/mlx5/windows: add mlx5_os.c 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" From: Ophir Munk mlx5_os_set_nonblock_channel_fd mlx5_os_dev_shared_handler_install mlx5_os_dev_shared_handler_uninstall mlx5_os_read_dev_stat mlx5_os_mac_addr_flush mlx5_os_mac_addr_remove mlx5_os_vf_mac_addr_modify mlx5_os_set_promisc mlx5_os_set_allmulti Set struct mlx5_flow_driver_ops mlx5_flow_verbs_drv_ops with NULL pointers. Signed-off-by: Ophir Munk Acked-by: Matan Azrad --- drivers/net/mlx5/windows/mlx5_os.c | 187 +++++++++++++++++++++++++++++++++++++ 1 file changed, 187 insertions(+) diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c index e0646670a3..4a7c745a71 100644 --- a/drivers/net/mlx5/windows/mlx5_os.c +++ b/drivers/net/mlx5/windows/mlx5_os.c @@ -13,10 +13,18 @@ #include #include #include +#include +#include +#include #include "mlx5_defs.h" #include "mlx5.h" +#include "mlx5_common_os.h" +#include "mlx5_utils.h" +#include "mlx5_rxtx.h" #include "mlx5_autoconf.h" +#include "mlx5_mr.h" +#include "mlx5_flow.h" /** * Get mlx5 device attributes. @@ -73,3 +81,182 @@ mlx5_os_get_dev_attr(void *ctx, struct mlx5_dev_attr *device_attr) } return err; } + +/** + * Set the completion channel file descriptor interrupt as non-blocking. + * Currently it has no support under Windows. + * + * @param[in] rxq_obj + * Pointer to RQ channel object, which includes the channel fd + * + * @param[out] fd + * The file descriptor (representing the intetrrupt) used in this channel. + * + * @return + * 0 on successfully setting the fd to non-blocking, non-zero otherwise. + */ +int +mlx5_os_set_nonblock_channel_fd(int fd) +{ + (void)fd; + DRV_LOG(WARNING, "mlx5_os_set_nonblock_channel_fd is not supported"); + return -ENOTSUP; +} + +/** + * This function should share events between multiple ports of single IB + * device. Currently it has no support under Windows. + * + * @param sh + * Pointer to mlx5_dev_ctx_shared object. + */ +void +mlx5_os_dev_shared_handler_install(struct mlx5_dev_ctx_shared *sh) +{ + (void)sh; + DRV_LOG(WARNING, "mlx5_os_dev_shared_handler_install is not supported"); +} + +/** + * This function should share events between multiple ports of single IB + * device. Currently it has no support under Windows. + * + * @param dev + * Pointer to mlx5_dev_ctx_shared object. + */ +void +mlx5_os_dev_shared_handler_uninstall(struct mlx5_dev_ctx_shared *sh) +{ + (void)sh; + DRV_LOG(WARNING, "mlx5_os_dev_shared_handler_uninstall is not supported"); +} + +/** + * Read statistics by a named counter. + * + * @param[in] priv + * Pointer to the private device data structure. + * @param[in] ctr_name + * Pointer to the name of the statistic counter to read + * @param[out] stat + * Pointer to read statistic value. + * @return + * 0 on success and stat is valud, 1 if failed to read the value + * rte_errno is set. + * + */ +int +mlx5_os_read_dev_stat(struct mlx5_priv *priv, const char *ctr_name, + uint64_t *stat) +{ + RTE_SET_USED(priv); + RTE_SET_USED(ctr_name); + RTE_SET_USED(stat); + DRV_LOG(WARNING, "mlx5_os_read_dev_stat is not supported"); + return -ENOTSUP; +} + +/** + * Flush device MAC addresses + * Currently it has no support under Windows. + * + * @param dev + * Pointer to Ethernet device structure. + * + */ +void +mlx5_os_mac_addr_flush(struct rte_eth_dev *dev) +{ + (void)dev; + DRV_LOG(WARNING, "mlx5_os_mac_addr_flush is not supported"); +} + +/** + * Remove a MAC address from device + * Currently it has no support under Windows. + * + * @param dev + * Pointer to Ethernet device structure. + * @param index + * MAC address index. + */ +void +mlx5_os_mac_addr_remove(struct rte_eth_dev *dev, uint32_t index) +{ + (void)dev; + (void)(index); + DRV_LOG(WARNING, "mlx5_os_mac_addr_remove is not supported"); +} + +/** + * Modify a VF MAC address + * Currently it has no support under Windows. + * + * @param priv + * Pointer to device private data. + * @param mac_addr + * MAC address to modify into. + * @param iface_idx + * Net device interface index + * @param vf_index + * VF index + * + * @return + * 0 on success, a negative errno value otherwise + */ +int +mlx5_os_vf_mac_addr_modify(struct mlx5_priv *priv, + unsigned int iface_idx, + struct rte_ether_addr *mac_addr, + int vf_index) +{ + (void)priv; + (void)iface_idx; + (void)mac_addr; + (void)vf_index; + DRV_LOG(WARNING, "mlx5_os_vf_mac_addr_modify is not supported"); + return -ENOTSUP; +} + +/** + * Set device promiscuous mode + * Currently it has no support under Windows. + * + * @param dev + * Pointer to Ethernet device structure. + * @param enable + * 0 - promiscuous is disabled, otherwise - enabled + * + * @return + * 0 on success, a negative error value otherwise + */ +int +mlx5_os_set_promisc(struct rte_eth_dev *dev, int enable) +{ + (void)dev; + (void)enable; + DRV_LOG(WARNING, "mlx5_os_set_promisc is not supported"); + return -ENOTSUP; +} + +/** + * Set device allmulti mode + * + * @param dev + * Pointer to Ethernet device structure. + * @param enable + * 0 - all multicase is disabled, otherwise - enabled + * + * @return + * 0 on success, a negative error value otherwise + */ +int +mlx5_os_set_allmulti(struct rte_eth_dev *dev, int enable) +{ + (void)dev; + (void)enable; + DRV_LOG(WARNING, "mlx5_os_set_allmulti is not supported"); + return -ENOTSUP; +} + +const struct mlx5_flow_driver_ops mlx5_flow_verbs_drv_ops = {0}; -- 2.16.1.windows.4