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 E095FA0577; Tue, 14 Apr 2020 10:20:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2C93E1D167; Tue, 14 Apr 2020 10:15:09 +0200 (CEST) Received: from mail-pl1-f195.google.com (mail-pl1-f195.google.com [209.85.214.195]) by dpdk.org (Postfix) with ESMTP id 4CDE11D167 for ; Tue, 14 Apr 2020 10:15:07 +0200 (CEST) Received: by mail-pl1-f195.google.com with SMTP id a23so4395529plm.1 for ; Tue, 14 Apr 2020 01:15: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=LEJYm16Z0+PNdhXS1NKDmGWXXLhDhciICz33fQWRIHw=; b=FSpRTS/EGP9GVpo+GaUE95GL9gm6GOXiaY9A5mT/+mixAWMZrWAn4R1s/LUKjrg4Ls dELeSO3Dq1xSFsXkRMMkCfILgAaAGB2FsxPlpmq0Yea1YSXL4AahGxtzk10PkhhV9m6y k9QekWRZH8vndBUWQEm+9YUkrIlmSuBIBKnAM= 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=oHDe4dJ6vndxYWPNmVP6A4Wgp672dnFCN0hzKrNsuJnlGrUk5iMBcq6I9CD4JK/wpU b9xtTEkugAEZSLeTBsbL7ynkUFvKMr6zPu89Nb+Wn/4wcDTzGt6oHVoaK5yq36mL0+fx OqjwnukCR9ETv2k9AhjsZ+aA1vVVwU7AIagIEkSwtkeaRPV/T+7i989CjjKXL2wXKzpm R1H2V0xOZYTC9P3op6whG/tBCt9HuqprjTb4UwkJIgc39FkIOiuQZKqUl/OXqvN2mYEq uPNrSJ1NrpGhDrWXSNU6kawLJVw+mV8FrZ5uVrjnTa7oVduMtxNrfLVWScniIyQcpXRO /DAw== X-Gm-Message-State: AGi0PuYBHxfChkRGk0HE+aNEK1bKKVf4HhyGkFJiG1+MaslpSkRBN6An f4hzPam79Hoqo7UlJmogA3w2Uny/4pndVxT+VuHMacv4foScoy1EtZCHQHEpCZrYdiy9HGDbc6r RAzLqbWE8DxRJrcjfb5+BKvAtC8J5XsgNea169PQnG4xGsCMIVdTY7NEPNDLB0yql0eX+ X-Google-Smtp-Source: APiQypILI4uDyVIXPSd1uRx6I5ENjkP5Z/g3QpBHsJ2Rp0qQA+cKPzuRAANhr/iZztZppqYkbcDNpA== X-Received: by 2002:a17:902:598f:: with SMTP id p15mr484771pli.264.1586852106070; Tue, 14 Apr 2020 01:15:06 -0700 (PDT) Received: from S60.dhcp.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id e196sm671176pfh.43.2020.04.14.01.15.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Apr 2020 01:15:05 -0700 (PDT) From: Venkat Duvvuru To: dev@dpdk.org Cc: Venkat Duvvuru Date: Tue, 14 Apr 2020 13:43:28 +0530 Message-Id: <1586852011-37536-32-git-send-email-venkatkumar.duvvuru@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1586852011-37536-1-git-send-email-venkatkumar.duvvuru@broadcom.com> References: <1586806811-21736-1-git-send-email-venkatkumar.duvvuru@broadcom.com> <1586852011-37536-1-git-send-email-venkatkumar.duvvuru@broadcom.com> Subject: [dpdk-dev] [PATCH v3 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