From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 96414A00E6 for ; Sat, 20 Apr 2019 02:07:33 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 92E0C1BB4F; Sat, 20 Apr 2019 02:07:32 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 543DC1BB4B for ; Sat, 20 Apr 2019 02:07:31 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from yskoh@mellanox.com) with ESMTPS (AES256-SHA encrypted); 20 Apr 2019 03:02:47 +0300 Received: from scfae-sc-2.mti.labs.mlnx (scfae-sc-2.mti.labs.mlnx [10.101.0.96]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x3K02jka011598; Sat, 20 Apr 2019 03:02:45 +0300 From: Yongseok Koh To: shahafs@mellanox.com Cc: dev@dpdk.org, viacheslavo@mellanox.com Date: Fri, 19 Apr 2019 17:02:43 -0700 Message-Id: <20190420000243.39143-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH] net/mlx5: fix Direct Rules build 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190420000243.mx-I-3Udp1OQI5WOp6KCp64C4XAQB4Ctka2oIjBXipQ@z> All the library calls must be called via the glue layer. Fixes: b2177648b8de ("net/mlx5: add Direct Rules flow data alloc/free routines") Fixes: 79e35d0d5979 ("net/mlx5: share Direct Rules/Verbs flow related structures") Cc: viacheslavo@mellanox.com Signed-off-by: Yongseok Koh --- drivers/net/mlx5/mlx5.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 65c69afe5a..08ed678d0d 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -332,14 +332,16 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv) return 0; } /* Reference counter is zero, we should initialize structures. */ - ns = mlx5dv_dr_create_ns(sh->ctx, MLX5DV_DR_NS_DOMAIN_INGRESS_BYPASS); + ns = mlx5_glue->dr_create_ns(sh->ctx, + MLX5DV_DR_NS_DOMAIN_INGRESS_BYPASS); if (!ns) { DRV_LOG(ERR, "ingress mlx5dv_dr_create_ns failed"); err = errno; goto error; } sh->rx_ns = ns; - ns = mlx5dv_dr_create_ns(sh->ctx, MLX5DV_DR_NS_DOMAIN_EGRESS_BYPASS); + ns = mlx5_glue->dr_create_ns(sh->ctx, + MLX5DV_DR_NS_DOMAIN_EGRESS_BYPASS); if (!ns) { DRV_LOG(ERR, "egress mlx5dv_dr_create_ns failed"); err = errno; @@ -367,11 +369,11 @@ mlx5_alloc_shared_dr(struct mlx5_priv *priv) error: /* Rollback the created objects. */ if (sh->rx_ns) { - mlx5dv_dr_destroy_ns(sh->rx_ns); + mlx5_glue->dr_destroy_ns(sh->rx_ns); sh->rx_ns = NULL; } if (sh->tx_ns) { - mlx5dv_dr_destroy_ns(sh->tx_ns); + mlx5_glue->dr_destroy_ns(sh->tx_ns); sh->tx_ns = NULL; } if (sh->fdb_ns) { @@ -410,11 +412,11 @@ mlx5_free_shared_dr(struct mlx5_priv *priv) if (sh->dv_refcnt && --sh->dv_refcnt) return; if (sh->rx_ns) { - mlx5dv_dr_destroy_ns(sh->rx_ns); + mlx5_glue->dr_destroy_ns(sh->rx_ns); sh->rx_ns = NULL; } if (sh->tx_ns) { - mlx5dv_dr_destroy_ns(sh->tx_ns); + mlx5_glue->dr_destroy_ns(sh->tx_ns); sh->tx_ns = NULL; } #ifdef HAVE_MLX5DV_DR_ESWITCH -- 2.11.0