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 1982DA0577; Mon, 13 Apr 2020 21:47:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D17DC1C202; Mon, 13 Apr 2020 21:43:03 +0200 (CEST) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by dpdk.org (Postfix) with ESMTP id 213841C1FC for ; Mon, 13 Apr 2020 21:43:02 +0200 (CEST) Received: by mail-pl1-f172.google.com with SMTP id g2so3777780plo.3 for ; Mon, 13 Apr 2020 12:43:02 -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=LEJYm16Z0+PNdhXS1NKDmGWXXLhDhciICz33fQWRIHw=; b=W2NAlu13WRPYn1X2P0xl+o3HWgnldmpUhfwNKGvGcl+VtDRNFcZV1cDyCsBgFqF1i3 L26VSd5eSZUTFGOkUUagxcUMcHNmlw8n1TxldoXbFFxP+uPQFr6Af8UrUy+yzsuLDNTf eSIjlOatJdvOi+LwRjnbp8dBn/AnMxqKVFDxc= 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=LEJYm16Z0+PNdhXS1NKDmGWXXLhDhciICz33fQWRIHw=; b=inL0InRV1A7djVU7enC4vydaIIzYZKGbqZBfx6FNXeztXQZCIa+rVb9fHN4bYxNwHi zzaSuGXVo+K8fPcnXePttDMOR60NIxNaAX83KbzE+OB9joARx51CbEjLgZXxqjx4S1KP GW8jd8EyvNTT32IYPZyUCmXpekCTKNXNokV7Q6WmLaMpDdikZMYVGD7BxnFzJDtrq8e/ uKv7fUyD1KOJBd9oT3waRawLzsrPYFuysNPv3xHAu6LYTVUxmYE96R7XGtJwfkn1bEl9 Y1qt/v9pRuSWV5xa6xj1R1B6yIh0TQw7aSzKUwb6gEm/7dR46vEuw+QypE6A7oA6XKc3 K8gA== X-Gm-Message-State: AGi0PuaosDLpPofYrv1iYpILk8Yu8dvQOEfF8EQKChgGfHsltVEKyVWh P3vaUxteKECxqUyM4Z52lVDfcJ3h8E7NLBPw+plSYP6BqBFVNyfVjAm+efNQpz530pYsj999L7m 0ISU4ETaJO3Top71bfSm2ekSBwHNdcW3LVlXu0me3q5YLVN1sPavNNDA7A7jaZHwiDWm/ X-Google-Smtp-Source: APiQypIvuWg99QsIaLzF0K1l4R1S8ai2t0xetgJy0dVUCJBBA0By1Q/EM10xWbmeuW0Abfpsgdr6LQ== X-Received: by 2002:a17:902:8d8d:: with SMTP id v13mr19215315plo.260.1586806980902; Mon, 13 Apr 2020 12:43:00 -0700 (PDT) Received: from S60.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id 9sm1381663pfn.204.2020.04.13.12.42.59 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Apr 2020 12:43:00 -0700 (PDT) From: Venkat Duvvuru To: dev@dpdk.org Cc: Venkat Duvvuru Date: Tue, 14 Apr 2020 01:10:08 +0530 Message-Id: <1586806811-21736-32-git-send-email-venkatkumar.duvvuru@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586806811-21736-1-git-send-email-venkatkumar.duvvuru@broadcom.com> References: <1584459511-5353-1-git-send-email-venkatkumar.duvvuru@broadcom.com> <1586806811-21736-1-git-send-email-venkatkumar.duvvuru@broadcom.com> Subject: [dpdk-dev] [PATCH v2 31/34] 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 host based 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 | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/bnxt/bnxt.h b/drivers/net/bnxt/bnxt.h index cd20740..a70cdff 100644 --- a/drivers/net/bnxt/bnxt.h +++ b/drivers/net/bnxt/bnxt.h @@ -731,6 +731,7 @@ extern int bnxt_logtype_driver; #define PMD_DRV_LOG(level, fmt, args...) \ PMD_DRV_LOG_RAW(level, fmt, ## args) +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); diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c index 2f08921..783e6a4 100644 --- a/drivers/net/bnxt/bnxt_ethdev.c +++ b/drivers/net/bnxt/bnxt_ethdev.c @@ -3288,6 +3288,7 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev, enum rte_filter_type filter_type, enum rte_filter_op filter_op, void *arg) { + struct bnxt *bp = dev->data->dev_private; int ret = 0; ret = is_bnxt_in_error(dev->data->dev_private); @@ -3311,7 +3312,10 @@ bnxt_filter_ctrl_op(struct rte_eth_dev *dev, case RTE_ETH_FILTER_GENERIC: if (filter_op != RTE_ETH_FILTER_GET) return -EINVAL; - *(const void **)arg = &bnxt_flow_ops; + if (bp->truflow) + *(const void **)arg = &bnxt_ulp_rte_flow_ops; + else + *(const void **)arg = &bnxt_flow_ops; break; default: PMD_DRV_LOG(ERR, -- 2.7.4