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 3FB27A0565; Tue, 17 Mar 2020 16:46:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E1A641C1E9; Tue, 17 Mar 2020 16:40:10 +0100 (CET) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by dpdk.org (Postfix) with ESMTP id 3C6591C1D6 for ; Tue, 17 Mar 2020 16:40:07 +0100 (CET) Received: by mail-wm1-f66.google.com with SMTP id n8so21976477wmc.4 for ; Tue, 17 Mar 2020 08:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=UhDHobNUeWgWAZLkhF21coMf+V50Mdmlc+yp7+3cLNo=; b=gabDLWl9DO6Y/ISemaXRzsOHiA5wAHFtbFlmLUHYNZV0y6tM9WDNXR7zPS/yXRareL yhXzENHG4bmVo4SxJAV7012O5GVXmMKAnug/jDdKEo7I6mI4/e9Bm6gPJMeTN3yr5Pev N4FqAZecGPDCMLwv+Z+m7eeI/NKk71l8kudhI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=UhDHobNUeWgWAZLkhF21coMf+V50Mdmlc+yp7+3cLNo=; b=O5gVKPFzdtPGsZ6WgJlpq8erOZ6UWSIKd2HSQB+NK2FitFfws+fdultcNS6W3ciPGp b/wqtow9lZfDCqNV2kqv/foMTiy8UnIvPQ29TSR/OQpgdGZhr2lqzqCguwY+5TtO9WuY 3G9nlC0ag4JysBaszmaTZyuM74NRDwFfzk5ozjcibktHj7dqEOAa8CaDIKhQZHem+YPu 7fKn3Pd0PcRqQN3pZNWsYO8FLi8OB6nZy0iSvp/CkZ6CUe7i3KX2EfzDiapd+AX3ETiM Rn02dV2ngVFRugDCQFTaDh8QiOsfZYppphvd5nqT4YKMj8lKptfKJKydT7do81nPRlD1 g6iA== X-Gm-Message-State: ANhLgQ2E1pC4hPXAMiDL/IKXTJENdQxIr4EiACnTvrIvuzd040sS8rRL Ic0zWtbEUZyF3cP9Bws3PTnPzA24z+QhHkjfYr1wMjV8GRCNupySu5zhE2GEQI1/p/f/9Xmb1zG qRVCJ15wZrlF/3E6xXwnhqfho1SK985RNVEUYssMFKus28AdCB4GZnjro/GVY/TCA3jrw X-Google-Smtp-Source: ADFU+vtSFyn2hJi+6q6hZwg++/oXFhCmgRZSvh3OJ20TKpJDMuF6SCuFY32iTDqOvSlpJR/nT6qQGw== X-Received: by 2002:a05:600c:2250:: with SMTP id a16mr5687748wmm.57.1584459606654; Tue, 17 Mar 2020 08:40:06 -0700 (PDT) Received: from S60.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id q4sm5052142wro.56.2020.03.17.08.40.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 17 Mar 2020 08:40:06 -0700 (PDT) From: Venkat Duvvuru To: dev@dpdk.org Cc: Venkat Duvvuru Date: Tue, 17 Mar 2020 21:08:28 +0530 Message-Id: <1584459511-5353-31-git-send-email-venkatkumar.duvvuru@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1584459511-5353-1-git-send-email-venkatkumar.duvvuru@broadcom.com> References: <1584459511-5353-1-git-send-email-venkatkumar.duvvuru@broadcom.com> Subject: [dpdk-dev] [PATCH 30/33] net/bnxt: register tf rte flow ops 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" Register bnxt_ulp_rte_flow_ops when RTE_LIBRTE_BNXT_TRUFLOW is enabled. Signed-off-by: Venkat Duvvuru Reviewed-by: Lance Richardson Reviewed-by: Ajit Kumar Khaparde --- drivers/net/bnxt/bnxt.h | 1 + drivers/net/bnxt/bnxt_ethdev.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index 3cb8ba3..98dc575 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -734,6 +734,7 @@ extern int bnxt_logtype_driver; #define PMD_DRV_LOG(level, fmt, args...) \ PMD_DRV_LOG_RAW(level, fmt, ## args) #ifdef RTE_LIBRTE_BNXT_TRUFLOW +extern const struct rte_flow_ops bnxt_ulp_rte_flow_ops; int32_t bnxt_ulp_init(struct bnxt *bp); void bnxt_ulp_deinit(struct bnxt *bp); #endif diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 2064f21..7f73fe6 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -3300,7 +3300,11 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev, case RTE_ETH_FILTER_GENERIC: if (filter_op != RTE_ETH_FILTER_GET) return -EINVAL; +#ifdef RTE_LIBRTE_BNXT_TRUFLOW + *(const void **)arg = &bnxt_ulp_rte_flow_ops; +#else *(const void **)arg = &bnxt_flow_ops; +#endif break; default: PMD_DRV_LOG(ERR, -- 2.7.4