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 38D52A0563; Wed, 15 Apr 2020 10:26:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 005381D61D; Wed, 15 Apr 2020 10:20:48 +0200 (CEST) Received: from mail-pj1-f68.google.com (mail-pj1-f68.google.com [209.85.216.68]) by dpdk.org (Postfix) with ESMTP id D450F1D614 for ; Wed, 15 Apr 2020 10:20:45 +0200 (CEST) Received: by mail-pj1-f68.google.com with SMTP id cl8so5274172pjb.3 for ; Wed, 15 Apr 2020 01:20:45 -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=Oprhwj47s8V7E0LwoK69PcjWopeJBVC+VZO3vnoek+BFW3Hl7y6DhSJzX1HPBmL82L 5mBS35HoYD5OzHNLYjN4LSOsPFL4cK2xv/tiBy3D9YcJNIurdtGDpYTGOsYo+UHqkCKg s5BFq/S9hwgLHeKpXjtxfqI1UzLVDTp6NR8lo= 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=ijx5wJYqeEPd1e8xn+tT/YzpUjYpAhxW6IYn5a2awWQtk5h9TQay9cuMp4Z6Zlj4b5 4UYx2QuljlXI44MpqBEl9v+G7JOV9bF14PlPu5y6O2Gun29+gKOTYmSpjCIJ6yClzalK 5+PCICs+0GsJsUubrYHMS7eyzYGxKGXRtZpc6hJ2KohEXOxbVWJHCKb2LG6GGLad6zGg YOsvZap8YTYqoOVJht9hN5Jp97wZgg+ssdZ8305gHqtduwS82J/T9P3ToqnukLWD5A/c qGshS6up7CqUhLsgAGOyrLPezuS5W3SIMgvzwKcNIU7x53B9QlNQK5g/+BOm60+F1/BL RRpA== X-Gm-Message-State: AGi0Pubc652zMuidrYUQLWNul0nb9xUbaaP7iCsImz4AecuiXxIkwfwk H2j9jkvBB/3Vl86g7jan5a7lEQ4owPl0AWSRnfBQzy+mKIXuVPNQ7pZIsC1qQiu5/ZNDxf/Byc1 L2y6x2+Lq2Y/pg1lf73k8M3nyFSdfzw+A+p10YTSSEGovsBCVx11KByysu+87+xwTH4vg X-Google-Smtp-Source: APiQypLraF5atHNt0Pwpym7F8patuN2o4Dpgcw8FoVS2x+xKhpvHBmyMcFCvmjc8lEliI8st6br6PQ== X-Received: by 2002:a17:902:9892:: with SMTP id s18mr3900598plp.321.1586938844706; Wed, 15 Apr 2020 01:20:44 -0700 (PDT) Received: from S60.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id fy21sm3819019pjb.25.2020.04.15.01.20.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Apr 2020 01:20:44 -0700 (PDT) From: Venkat Duvvuru To: dev@dpdk.org Cc: Venkat Duvvuru Date: Wed, 15 Apr 2020 13:49:08 +0530 Message-Id: <1586938751-32808-32-git-send-email-venkatkumar.duvvuru@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586938751-32808-1-git-send-email-venkatkumar.duvvuru@broadcom.com> References: <1586852011-37536-1-git-send-email-venkatkumar.duvvuru@broadcom.com> <1586938751-32808-1-git-send-email-venkatkumar.duvvuru@broadcom.com> Subject: [dpdk-dev] [PATCH v4 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