* [dpdk-dev] [PATCH] net/i40e: fix flow director initialisation
@ 2020-04-07 15:26 Bernard Iremonger
2020-04-13 3:03 ` Xing, Beilei
2020-04-21 6:46 ` [dpdk-dev] [dpdk-stable] " Ye Xiaolong
0 siblings, 2 replies; 3+ messages in thread
From: Bernard Iremonger @ 2020-04-07 15:26 UTC (permalink / raw)
To: dev, beilei.xing, qi.z.zhang
Cc: declan.doherty, konstantin.ananyev, Praveen.Shetty,
Bernard Iremonger, stable
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 <bernard.iremonger@intel.com>
---
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix flow director initialisation
2020-04-07 15:26 [dpdk-dev] [PATCH] net/i40e: fix flow director initialisation Bernard Iremonger
@ 2020-04-13 3:03 ` Xing, Beilei
2020-04-21 6:46 ` [dpdk-dev] [dpdk-stable] " Ye Xiaolong
1 sibling, 0 replies; 3+ messages in thread
From: Xing, Beilei @ 2020-04-13 3:03 UTC (permalink / raw)
To: Iremonger, Bernard, dev, Zhang, Qi Z
Cc: Doherty, Declan, Ananyev, Konstantin, Shetty, Praveen, stable
> -----Original Message-----
> From: Iremonger, Bernard <bernard.iremonger@intel.com>
> Sent: Tuesday, April 7, 2020 11:27 PM
> To: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z
> <qi.z.zhang@intel.com>
> Cc: Doherty, Declan <declan.doherty@intel.com>; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; Shetty, Praveen
> <praveen.shetty@intel.com>; Iremonger, Bernard
> <bernard.iremonger@intel.com>; stable@dpdk.org
> Subject: [PATCH] net/i40e: fix flow director initialisation
>
> 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 <bernard.iremonger@intel.com>
> ---
> 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
Acked-by: Beilei Xing <beilei.xing@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [dpdk-stable] [PATCH] net/i40e: fix flow director initialisation
2020-04-07 15:26 [dpdk-dev] [PATCH] net/i40e: fix flow director initialisation Bernard Iremonger
2020-04-13 3:03 ` Xing, Beilei
@ 2020-04-21 6:46 ` Ye Xiaolong
1 sibling, 0 replies; 3+ messages in thread
From: Ye Xiaolong @ 2020-04-21 6:46 UTC (permalink / raw)
To: Bernard Iremonger
Cc: dev, beilei.xing, qi.z.zhang, declan.doherty, konstantin.ananyev,
Praveen.Shetty, stable
On 04/07, Bernard Iremonger wrote:
>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 <bernard.iremonger@intel.com>
>---
> 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
>
Applied to dpdk-next-net-intel, Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-21 6:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-07 15:26 [dpdk-dev] [PATCH] net/i40e: fix flow director initialisation Bernard Iremonger
2020-04-13 3:03 ` Xing, Beilei
2020-04-21 6:46 ` [dpdk-dev] [dpdk-stable] " Ye Xiaolong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).