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 19F7FA0577; Tue, 7 Apr 2020 17:26:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5794B2B96; Tue, 7 Apr 2020 17:26:53 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 80E6B2B86; Tue, 7 Apr 2020 17:26:51 +0200 (CEST) IronPort-SDR: yQEwvHLJL9m5WXuyOOa3TzqHRTwFHvl/EfWdYgP9XX2mDxScuX06tR2NHvxRsBtb67avik6LQw eK6E/ZGncxvg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2020 08:26:49 -0700 IronPort-SDR: EPjKrSEzI/i9NfmRF3TOvXbCcXFJnqRpajfoG6LD6y6+t8AY5NvXnZNB4FsEGzZ193GKsk/9mP 3RQf+wDOumog== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.72,355,1580803200"; d="scan'208";a="249938455" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga008.jf.intel.com with ESMTP; 07 Apr 2020 08:26:46 -0700 Received: from sivswdev08.ir.intel.com (sivswdev08.ir.intel.com [10.237.217.47]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id 037FQk4N025060; Tue, 7 Apr 2020 16:26:46 +0100 Received: from sivswdev08.ir.intel.com (localhost [127.0.0.1]) by sivswdev08.ir.intel.com with ESMTP id 037FQklv022328; Tue, 7 Apr 2020 16:26:46 +0100 Received: (from bairemon@localhost) by sivswdev08.ir.intel.com with LOCAL id 037FQkep022324; Tue, 7 Apr 2020 16:26:46 +0100 From: Bernard Iremonger To: dev@dpdk.org, beilei.xing@intel.com, qi.z.zhang@intel.com Cc: declan.doherty@intel.com, konstantin.ananyev@intel.com, Praveen.Shetty@intel.com, Bernard Iremonger , stable@dpdk.org Date: Tue, 7 Apr 2020 16:26:41 +0100 Message-Id: <1586273201-21961-1-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH] net/i40e: fix flow director initialisation 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" Remove references to struct rte_fdir_conf which is deprecated, in i40e_flow_parse_fdir_filter(), i40e_flow_destroy() and i40e_flow_add_del_fdir_filter(). Fixes: c3be43817cfb ("net/i40e: fix unexpected skip FDIR setup") Fixes: 2e67a7fbf3ff ("net/i40e: config flow director automatically") Fixes: 4149825bbdb9 ("net/i40e: finish integration FDIR with generic flow API") CC: stable@dpdk.org Signed-off-by: Bernard Iremonger --- drivers/net/i40e/i40e_fdir.c | 4 ++-- drivers/net/i40e/i40e_flow.c | 7 +------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 931f259..b603b33 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -1689,8 +1689,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev, struct i40e_fdir_filter check_filter; /* Check if the filter exists */ int ret = 0; - if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT) { - PMD_DRV_LOG(ERR, "FDIR is not enabled, please check the mode in fdir_conf."); + if (pf->fdir.fdir_vsi == NULL) { + PMD_DRV_LOG(ERR, "FDIR is not enabled"); return -ENOTSUP; } diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index d877ac2..8b6e1e4 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -3394,8 +3394,7 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev, cons_filter_type = RTE_ETH_FILTER_FDIR; - if (dev->data->dev_conf.fdir_conf.mode != RTE_FDIR_MODE_PERFECT || - pf->fdir.fdir_vsi == NULL) { + if (pf->fdir.fdir_vsi == NULL) { /* Enable fdir when fdir flow is added at first time. */ ret = i40e_fdir_setup(pf); if (ret != I40E_SUCCESS) { @@ -3411,8 +3410,6 @@ i40e_flow_parse_fdir_filter(struct rte_eth_dev *dev, NULL, "Failed to configure fdir."); goto err; } - - dev->data->dev_conf.fdir_conf.mode = RTE_FDIR_MODE_PERFECT; } return 0; @@ -4983,8 +4980,6 @@ i40e_flow_destroy(struct rte_eth_dev *dev, /* If the last flow is destroyed, disable fdir. */ if (!ret && TAILQ_EMPTY(&pf->fdir.fdir_list)) { i40e_fdir_teardown(pf); - dev->data->dev_conf.fdir_conf.mode = - RTE_FDIR_MODE_NONE; i40e_fdir_rx_proc_enable(dev, 0); } break; -- 2.7.4