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 F3390A09FF; Mon, 28 Dec 2020 13:44:45 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0AA9FCCA0; Mon, 28 Dec 2020 13:34:28 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id C1887CA67 for ; Mon, 28 Dec 2020 13:33:37 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from talshn@nvidia.com) with SMTP; 28 Dec 2020 14:33:35 +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 0BSCXWnm001295; Mon, 28 Dec 2020 14:33:35 +0200 From: Tal Shnaiderman To: dev@dpdk.org Cc: thomas@monjalon.net, matan@nvidia.com, rasland@nvidia.com, ophirmu@nvidia.com Date: Mon, 28 Dec 2020 14:33:00 +0200 Message-Id: <20201228123302.3608-34-talshn@nvidia.com> X-Mailer: git-send-email 2.16.1.windows.4 In-Reply-To: <20201228123302.3608-1-talshn@nvidia.com> References: <20201217173037.11396-2-talshn@nvidia.com> <20201228123302.3608-1-talshn@nvidia.com> Subject: [dpdk-dev] [PATCH v2 33/35] mlx5: use OS function for dr_sync_domain 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" use OS functions for flow_dv_sync_domain to compile Windows. mlx5_os_flow_dr_sync_domain is unsupported for Windows. Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_flow_os.h | 6 ++++++ drivers/net/mlx5/mlx5_flow_dv.c | 6 +++--- drivers/net/mlx5/windows/mlx5_flow_os.h | 9 +++++++++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_flow_os.h b/drivers/net/mlx5/linux/mlx5_flow_os.h index 6f3b7324ff..45b7b9f001 100644 --- a/drivers/net/mlx5/linux/mlx5_flow_os.h +++ b/drivers/net/mlx5/linux/mlx5_flow_os.h @@ -427,4 +427,10 @@ mlx5_os_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, { return mlx5_flow_adjust_priority(dev, priority, subpriority); } + +static inline int +mlx5_os_flow_dr_sync_domain(void *domain, uint32_t flags) +{ + return mlx5_glue->dr_sync_domain(domain, flags); +} #endif /* RTE_PMD_MLX5_FLOW_OS_H_ */ diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index b73ee8401c..51b5e5a2e3 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -12680,18 +12680,18 @@ flow_dv_sync_domain(struct rte_eth_dev *dev, uint32_t domains, uint32_t flags) int ret = 0; if ((domains & MLX5_DOMAIN_BIT_NIC_RX) && priv->sh->rx_domain != NULL) { - ret = mlx5_glue->dr_sync_domain(priv->sh->rx_domain, + ret = mlx5_os_flow_dr_sync_domain(priv->sh->rx_domain, flags); if (ret != 0) return ret; } if ((domains & MLX5_DOMAIN_BIT_NIC_TX) && priv->sh->tx_domain != NULL) { - ret = mlx5_glue->dr_sync_domain(priv->sh->tx_domain, flags); + ret = mlx5_os_flow_dr_sync_domain(priv->sh->tx_domain, flags); if (ret != 0) return ret; } if ((domains & MLX5_DOMAIN_BIT_FDB) && priv->sh->fdb_domain != NULL) { - ret = mlx5_glue->dr_sync_domain(priv->sh->fdb_domain, flags); + ret = mlx5_os_flow_dr_sync_domain(priv->sh->fdb_domain, flags); if (ret != 0) return ret; } diff --git a/drivers/net/mlx5/windows/mlx5_flow_os.h b/drivers/net/mlx5/windows/mlx5_flow_os.h index 50185669cf..630b2148b9 100644 --- a/drivers/net/mlx5/windows/mlx5_flow_os.h +++ b/drivers/net/mlx5/windows/mlx5_flow_os.h @@ -345,6 +345,15 @@ mlx5_os_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, return 0; } +static inline int +mlx5_os_flow_dr_sync_domain(void *domain, uint32_t flags) +{ + RTE_SET_USED(domain); + RTE_SET_USED(flags); + errno = ENOTSUP; + return errno; +} + int mlx5_flow_os_validate_flow_attributes(struct rte_eth_dev *dev, const struct rte_flow_attr *attributes, bool external, -- 2.16.1.windows.4