* [dpdk-dev] [PATCH] net/i40e: fix flow does not effect on uncustomed pctype @ 2021-04-16 2:19 Murphy Yang 2021-04-19 8:16 ` Xing, Beilei ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Murphy Yang @ 2021-04-16 2:19 UTC (permalink / raw) To: dev Cc: qiming.yang, jia.guo, beilei.xing, stevex.yang, robinx.zhang, Murphy Yang Uncustomed flow rule does not effect, the root cause is not write the configure in register. Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate") Signed-off-by: Murphy Yang <murphyx.yang@intel.com> --- drivers/net/i40e/i40e_fdir.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index da089baa4d..77375b059a 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, /* Check if the configuration is conflicted */ if (pf->fdir.inset_flag[pctype] && - memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) - return -1; + memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) { + PMD_DRV_LOG(ERR, "Conflict with the first rule's input set."); + return -EINVAL; + } if (pf->fdir.inset_flag[pctype] && !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) @@ -1762,18 +1764,14 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev, i40e_fdir_filter_convert(filter, &check_filter); if (add) { - if (filter->input.flow_ext.is_flex_flow) { + if (!filter->input.flow_ext.customized_pctype) { ret = i40e_flow_set_fdir_inset(pf, pctype, filter->input.flow_ext.input_set); - if (ret == -1) { - PMD_DRV_LOG(ERR, "Conflict with the" - " first rule's input set."); - return -EINVAL; - } else if (ret == -EINVAL) { - PMD_DRV_LOG(ERR, "Invalid pattern mask."); - return -EINVAL; - } + if (ret) + return ret; + } + if (filter->input.flow_ext.is_flex_flow) { for (i = 0; i < filter->input.flow_ext.raw_id; i++) { layer_idx = filter->input.flow_ext.layer_idx; field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i; -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix flow does not effect on uncustomed pctype 2021-04-16 2:19 [dpdk-dev] [PATCH] net/i40e: fix flow does not effect on uncustomed pctype Murphy Yang @ 2021-04-19 8:16 ` Xing, Beilei 2021-04-21 1:46 ` Xing, Beilei 2021-04-21 2:08 ` [dpdk-dev] [PATCH v2] net/i40e: fix FDIR issue for common PCTYPEs Murphy Yang 2 siblings, 0 replies; 8+ messages in thread From: Xing, Beilei @ 2021-04-19 8:16 UTC (permalink / raw) To: Yang, MurphyX, dev; +Cc: Yang, Qiming, Guo, Jia, Yang, SteveX, Zhang, RobinX Hi, > -----Original Message----- > From: Yang, MurphyX <murphyx.yang@intel.com> > Sent: Friday, April 16, 2021 10:20 AM > To: dev@dpdk.org > Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia <jia.guo@intel.com>; > Xing, Beilei <beilei.xing@intel.com>; Yang, SteveX <stevex.yang@intel.com>; > Zhang, RobinX <robinx.zhang@intel.com>; Yang, MurphyX > <murphyx.yang@intel.com> > Subject: [PATCH] net/i40e: fix flow does not effect on uncustomed pctype > > Uncustomed flow rule does not effect, the root cause is not write the configure > in register. Could you please detail the issue case? Is it related to DDP package? > > Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate") > Signed-off-by: Murphy Yang <murphyx.yang@intel.com> > --- > drivers/net/i40e/i40e_fdir.c | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index > da089baa4d..77375b059a 100644 > --- a/drivers/net/i40e/i40e_fdir.c > +++ b/drivers/net/i40e/i40e_fdir.c > @@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, > > /* Check if the configuration is conflicted */ > if (pf->fdir.inset_flag[pctype] && > - memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > - return -1; > + memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > { > + PMD_DRV_LOG(ERR, "Conflict with the first rule's input set."); > + return -EINVAL; > + } > > if (pf->fdir.inset_flag[pctype] && > !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > @@ -1762,18 +1764,14 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev > *dev, > i40e_fdir_filter_convert(filter, &check_filter); > > if (add) { > - if (filter->input.flow_ext.is_flex_flow) { > + if (!filter->input.flow_ext.customized_pctype) { > ret = i40e_flow_set_fdir_inset(pf, pctype, > filter->input.flow_ext.input_set); > - if (ret == -1) { > - PMD_DRV_LOG(ERR, "Conflict with the" > - " first rule's input set."); > - return -EINVAL; > - } else if (ret == -EINVAL) { > - PMD_DRV_LOG(ERR, "Invalid pattern mask."); > - return -EINVAL; > - } > + if (ret) > + return ret; > + } > > + if (filter->input.flow_ext.is_flex_flow) { > for (i = 0; i < filter->input.flow_ext.raw_id; i++) { > layer_idx = filter->input.flow_ext.layer_idx; > field_idx = layer_idx * I40E_MAX_FLXPLD_FIED > + i; > -- > 2.17.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: fix flow does not effect on uncustomed pctype 2021-04-16 2:19 [dpdk-dev] [PATCH] net/i40e: fix flow does not effect on uncustomed pctype Murphy Yang 2021-04-19 8:16 ` Xing, Beilei @ 2021-04-21 1:46 ` Xing, Beilei 2021-04-21 2:08 ` [dpdk-dev] [PATCH v2] net/i40e: fix FDIR issue for common PCTYPEs Murphy Yang 2 siblings, 0 replies; 8+ messages in thread From: Xing, Beilei @ 2021-04-21 1:46 UTC (permalink / raw) To: Yang, MurphyX, dev; +Cc: Yang, Qiming, Guo, Jia, Yang, SteveX, Zhang, RobinX > -----Original Message----- > From: Yang, MurphyX <murphyx.yang@intel.com> > Sent: Friday, April 16, 2021 10:20 AM > To: dev@dpdk.org > Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia <jia.guo@intel.com>; > Xing, Beilei <beilei.xing@intel.com>; Yang, SteveX <stevex.yang@intel.com>; > Zhang, RobinX <robinx.zhang@intel.com>; Yang, MurphyX > <murphyx.yang@intel.com> > Subject: [PATCH] net/i40e: fix flow does not effect on uncustomed pctype > > Uncustomed flow rule does not effect, the root cause is not write the configure > in register. > > Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate") > Signed-off-by: Murphy Yang <murphyx.yang@intel.com> > --- > drivers/net/i40e/i40e_fdir.c | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) > > diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index > da089baa4d..77375b059a 100644 > --- a/drivers/net/i40e/i40e_fdir.c > +++ b/drivers/net/i40e/i40e_fdir.c > @@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, > > /* Check if the configuration is conflicted */ > if (pf->fdir.inset_flag[pctype] && > - memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > - return -1; > + memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > { > + PMD_DRV_LOG(ERR, "Conflict with the first rule's input set."); > + return -EINVAL; > + } > > if (pf->fdir.inset_flag[pctype] && > !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > @@ -1762,18 +1764,14 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev > *dev, > i40e_fdir_filter_convert(filter, &check_filter); > > if (add) { > - if (filter->input.flow_ext.is_flex_flow) { > + if (!filter->input.flow_ext.customized_pctype) { > ret = i40e_flow_set_fdir_inset(pf, pctype, i40e_flow_set_fdir_inset should not be called here, but outside the if statement. Since all following configuration is for flexible FDIR. > filter->input.flow_ext.input_set); > - if (ret == -1) { > - PMD_DRV_LOG(ERR, "Conflict with the" > - " first rule's input set."); > - return -EINVAL; > - } else if (ret == -EINVAL) { > - PMD_DRV_LOG(ERR, "Invalid pattern mask."); Remove the log here, then you should add the log in i40e_flow_set_fdir_inset, Right? > - return -EINVAL; > - } > + if (ret) > + return ret; > + } > > + if (filter->input.flow_ext.is_flex_flow) { > for (i = 0; i < filter->input.flow_ext.raw_id; i++) { > layer_idx = filter->input.flow_ext.layer_idx; > field_idx = layer_idx * I40E_MAX_FLXPLD_FIED > + i; > -- > 2.17.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v2] net/i40e: fix FDIR issue for common PCTYPEs 2021-04-16 2:19 [dpdk-dev] [PATCH] net/i40e: fix flow does not effect on uncustomed pctype Murphy Yang 2021-04-19 8:16 ` Xing, Beilei 2021-04-21 1:46 ` Xing, Beilei @ 2021-04-21 2:08 ` Murphy Yang 2021-04-21 3:25 ` Xing, Beilei 2021-04-21 3:44 ` [dpdk-dev] [PATCH v3] " Murphy Yang 2 siblings, 2 replies; 8+ messages in thread From: Murphy Yang @ 2021-04-21 2:08 UTC (permalink / raw) To: dev Cc: qiming.yang, jia.guo, beilei.xing, stevex.yang, robinx.zhang, Murphy Yang Currently, FDIR doesn't work for all common PCTYPEs, the root cause is that input set is not configured. Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate") Signed-off-by: Murphy Yang <murphyx.yang@intel.com> --- v2: - tune the code and modify commit message drivers/net/i40e/i40e_fdir.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index da089baa4d..6b81e09db5 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, /* Check if the configuration is conflicted */ if (pf->fdir.inset_flag[pctype] && - memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) - return -1; + memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) { + PMD_DRV_LOG(ERR, "Conflict with the first rule's input set."); + return -EINVAL; + } if (pf->fdir.inset_flag[pctype] && !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) @@ -1762,18 +1764,21 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev, i40e_fdir_filter_convert(filter, &check_filter); if (add) { - if (filter->input.flow_ext.is_flex_flow) { + /* configure the input set for common PCTYPEs*/ + if (!filter->input.flow_ext.customized_pctype) { ret = i40e_flow_set_fdir_inset(pf, pctype, filter->input.flow_ext.input_set); if (ret == -1) { PMD_DRV_LOG(ERR, "Conflict with the" - " first rule's input set."); + " first rule's input set."); return -EINVAL; } else if (ret == -EINVAL) { PMD_DRV_LOG(ERR, "Invalid pattern mask."); return -EINVAL; } + } + if (filter->input.flow_ext.is_flex_flow) { for (i = 0; i < filter->input.flow_ext.raw_id; i++) { layer_idx = filter->input.flow_ext.layer_idx; field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i; -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: fix FDIR issue for common PCTYPEs 2021-04-21 2:08 ` [dpdk-dev] [PATCH v2] net/i40e: fix FDIR issue for common PCTYPEs Murphy Yang @ 2021-04-21 3:25 ` Xing, Beilei 2021-04-21 3:44 ` [dpdk-dev] [PATCH v3] " Murphy Yang 1 sibling, 0 replies; 8+ messages in thread From: Xing, Beilei @ 2021-04-21 3:25 UTC (permalink / raw) To: Yang, MurphyX, dev; +Cc: Yang, Qiming, Guo, Jia, Yang, SteveX, Zhang, RobinX > -----Original Message----- > From: Yang, MurphyX <murphyx.yang@intel.com> > Sent: Wednesday, April 21, 2021 10:09 AM > To: dev@dpdk.org > Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia <jia.guo@intel.com>; > Xing, Beilei <beilei.xing@intel.com>; Yang, SteveX <stevex.yang@intel.com>; > Zhang, RobinX <robinx.zhang@intel.com>; Yang, MurphyX > <murphyx.yang@intel.com> > Subject: [PATCH v2] net/i40e: fix FDIR issue for common PCTYPEs > > Currently, FDIR doesn't work for all common PCTYPEs, the root cause is that > input set is not configured. > > Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate") > Signed-off-by: Murphy Yang <murphyx.yang@intel.com> > --- > v2: > - tune the code and modify commit message drivers/net/i40e/i40e_fdir.c | 13 > +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-) > > diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index > da089baa4d..6b81e09db5 100644 > --- a/drivers/net/i40e/i40e_fdir.c > +++ b/drivers/net/i40e/i40e_fdir.c > @@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, > > /* Check if the configuration is conflicted */ > if (pf->fdir.inset_flag[pctype] && > - memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > - return -1; > + memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > { > + PMD_DRV_LOG(ERR, "Conflict with the first rule's input set."); > + return -EINVAL; > + } > > if (pf->fdir.inset_flag[pctype] && > !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > @@ -1762,18 +1764,21 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev > *dev, > i40e_fdir_filter_convert(filter, &check_filter); > > if (add) { > - if (filter->input.flow_ext.is_flex_flow) { > + /* configure the input set for common PCTYPEs*/ > + if (!filter->input.flow_ext.customized_pctype) { > ret = i40e_flow_set_fdir_inset(pf, pctype, > filter->input.flow_ext.input_set); > if (ret == -1) { > PMD_DRV_LOG(ERR, "Conflict with the" > - " first rule's input set."); > + " first rule's input set."); The log is duplicated with above. > return -EINVAL; > } else if (ret == -EINVAL) { > PMD_DRV_LOG(ERR, "Invalid pattern mask."); > return -EINVAL; > } > + } > > + if (filter->input.flow_ext.is_flex_flow) { > for (i = 0; i < filter->input.flow_ext.raw_id; i++) { > layer_idx = filter->input.flow_ext.layer_idx; > field_idx = layer_idx * I40E_MAX_FLXPLD_FIED > + i; > -- > 2.17.1 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH v3] net/i40e: fix FDIR issue for common PCTYPEs 2021-04-21 2:08 ` [dpdk-dev] [PATCH v2] net/i40e: fix FDIR issue for common PCTYPEs Murphy Yang 2021-04-21 3:25 ` Xing, Beilei @ 2021-04-21 3:44 ` Murphy Yang 2021-04-21 5:10 ` Xing, Beilei 1 sibling, 1 reply; 8+ messages in thread From: Murphy Yang @ 2021-04-21 3:44 UTC (permalink / raw) To: dev Cc: qiming.yang, jia.guo, beilei.xing, stevex.yang, robinx.zhang, Murphy Yang Currently, FDIR doesn't work for all common PCTYPEs, the root cause is that input set is not configured. Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate") Signed-off-by: Murphy Yang <murphyx.yang@intel.com> --- drivers/net/i40e/i40e_fdir.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index da089baa4d..ed1c60af99 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, /* Check if the configuration is conflicted */ if (pf->fdir.inset_flag[pctype] && - memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) - return -1; + memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) { + PMD_DRV_LOG(ERR, "Conflict with the first rule's input set."); + return -EINVAL; + } if (pf->fdir.inset_flag[pctype] && !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) @@ -1616,8 +1618,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg, I40E_INSET_MASK_NUM_REG); - if (num < 0) + if (num < 0) { + PMD_DRV_LOG(ERR, "Invalid pattern mask."); return -EINVAL; + } if (pf->support_multi_driver) { for (i = 0; i < num; i++) @@ -1762,18 +1766,15 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev, i40e_fdir_filter_convert(filter, &check_filter); if (add) { - if (filter->input.flow_ext.is_flex_flow) { + /* configure the input set for common PCTYPEs*/ + if (!filter->input.flow_ext.customized_pctype) { ret = i40e_flow_set_fdir_inset(pf, pctype, filter->input.flow_ext.input_set); - if (ret == -1) { - PMD_DRV_LOG(ERR, "Conflict with the" - " first rule's input set."); - return -EINVAL; - } else if (ret == -EINVAL) { - PMD_DRV_LOG(ERR, "Invalid pattern mask."); - return -EINVAL; - } + if (ret < 0) + return ret; + } + if (filter->input.flow_ext.is_flex_flow) { for (i = 0; i < filter->input.flow_ext.raw_id; i++) { layer_idx = filter->input.flow_ext.layer_idx; field_idx = layer_idx * I40E_MAX_FLXPLD_FIED + i; -- 2.17.1 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/i40e: fix FDIR issue for common PCTYPEs 2021-04-21 3:44 ` [dpdk-dev] [PATCH v3] " Murphy Yang @ 2021-04-21 5:10 ` Xing, Beilei 2021-04-21 14:35 ` Zhang, Qi Z 0 siblings, 1 reply; 8+ messages in thread From: Xing, Beilei @ 2021-04-21 5:10 UTC (permalink / raw) To: Yang, MurphyX, dev; +Cc: Yang, Qiming, Guo, Jia, Yang, SteveX, Zhang, RobinX > -----Original Message----- > From: Yang, MurphyX <murphyx.yang@intel.com> > Sent: Wednesday, April 21, 2021 11:44 AM > To: dev@dpdk.org > Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia <jia.guo@intel.com>; > Xing, Beilei <beilei.xing@intel.com>; Yang, SteveX <stevex.yang@intel.com>; > Zhang, RobinX <robinx.zhang@intel.com>; Yang, MurphyX > <murphyx.yang@intel.com> > Subject: [PATCH v3] net/i40e: fix FDIR issue for common PCTYPEs > > Currently, FDIR doesn't work for all common PCTYPEs, the root cause is that > input set is not configured. > > Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow validate") > Signed-off-by: Murphy Yang <murphyx.yang@intel.com> > --- > drivers/net/i40e/i40e_fdir.c | 25 +++++++++++++------------ > 1 file changed, 13 insertions(+), 12 deletions(-) > > diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index > da089baa4d..ed1c60af99 100644 > --- a/drivers/net/i40e/i40e_fdir.c > +++ b/drivers/net/i40e/i40e_fdir.c > @@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, > > /* Check if the configuration is conflicted */ > if (pf->fdir.inset_flag[pctype] && > - memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > - return -1; > + memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > { > + PMD_DRV_LOG(ERR, "Conflict with the first rule's input set."); > + return -EINVAL; > + } > > if (pf->fdir.inset_flag[pctype] && > !memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > @@ -1616,8 +1618,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, > > num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg, > > I40E_INSET_MASK_NUM_REG); > - if (num < 0) > + if (num < 0) { > + PMD_DRV_LOG(ERR, "Invalid pattern mask."); > return -EINVAL; > + } > > if (pf->support_multi_driver) { > for (i = 0; i < num; i++) > @@ -1762,18 +1766,15 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev > *dev, > i40e_fdir_filter_convert(filter, &check_filter); > > if (add) { > - if (filter->input.flow_ext.is_flex_flow) { > + /* configure the input set for common PCTYPEs*/ > + if (!filter->input.flow_ext.customized_pctype) { > ret = i40e_flow_set_fdir_inset(pf, pctype, > filter->input.flow_ext.input_set); > - if (ret == -1) { > - PMD_DRV_LOG(ERR, "Conflict with the" > - " first rule's input set."); > - return -EINVAL; > - } else if (ret == -EINVAL) { > - PMD_DRV_LOG(ERR, "Invalid pattern mask."); > - return -EINVAL; > - } > + if (ret < 0) > + return ret; > + } > > + if (filter->input.flow_ext.is_flex_flow) { > for (i = 0; i < filter->input.flow_ext.raw_id; i++) { > layer_idx = filter->input.flow_ext.layer_idx; > field_idx = layer_idx * I40E_MAX_FLXPLD_FIED > + i; > -- > 2.17.1 Acked-by: Beilei Xing <beilei.xing@intel.com> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH v3] net/i40e: fix FDIR issue for common PCTYPEs 2021-04-21 5:10 ` Xing, Beilei @ 2021-04-21 14:35 ` Zhang, Qi Z 0 siblings, 0 replies; 8+ messages in thread From: Zhang, Qi Z @ 2021-04-21 14:35 UTC (permalink / raw) To: Xing, Beilei, Yang, MurphyX, dev Cc: Yang, Qiming, Guo, Jia, Yang, SteveX, Zhang, RobinX > -----Original Message----- > From: dev <dev-bounces@dpdk.org> On Behalf Of Xing, Beilei > Sent: Wednesday, April 21, 2021 1:11 PM > To: Yang, MurphyX <murphyx.yang@intel.com>; dev@dpdk.org > Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia <jia.guo@intel.com>; > Yang, SteveX <stevex.yang@intel.com>; Zhang, RobinX > <robinx.zhang@intel.com> > Subject: Re: [dpdk-dev] [PATCH v3] net/i40e: fix FDIR issue for common > PCTYPEs > > > > > -----Original Message----- > > From: Yang, MurphyX <murphyx.yang@intel.com> > > Sent: Wednesday, April 21, 2021 11:44 AM > > To: dev@dpdk.org > > Cc: Yang, Qiming <qiming.yang@intel.com>; Guo, Jia > > <jia.guo@intel.com>; Xing, Beilei <beilei.xing@intel.com>; Yang, > > SteveX <stevex.yang@intel.com>; Zhang, RobinX > > <robinx.zhang@intel.com>; Yang, MurphyX <murphyx.yang@intel.com> > > Subject: [PATCH v3] net/i40e: fix FDIR issue for common PCTYPEs > > > > Currently, FDIR doesn't work for all common PCTYPEs, the root cause is > > that input set is not configured. > > > > Fixes: 4a072ad43442 ("net/i40e: fix flow director config after flow > > validate") > > Signed-off-by: Murphy Yang <murphyx.yang@intel.com> > > --- > > drivers/net/i40e/i40e_fdir.c | 25 +++++++++++++------------ > > 1 file changed, 13 insertions(+), 12 deletions(-) > > > > diff --git a/drivers/net/i40e/i40e_fdir.c > > b/drivers/net/i40e/i40e_fdir.c index > > da089baa4d..ed1c60af99 100644 > > --- a/drivers/net/i40e/i40e_fdir.c > > +++ b/drivers/net/i40e/i40e_fdir.c > > @@ -1607,8 +1607,10 @@ i40e_flow_set_fdir_inset(struct i40e_pf *pf, > > > > /* Check if the configuration is conflicted */ > > if (pf->fdir.inset_flag[pctype] && > > - memcmp(&pf->fdir.input_set[pctype], &input_set, sizeof(uint64_t))) > > - return -1; > > + memcmp(&pf->fdir.input_set[pctype], &input_set, > > +sizeof(uint64_t))) > > { > > + PMD_DRV_LOG(ERR, "Conflict with the first rule's input set."); > > + return -EINVAL; > > + } > > > > if (pf->fdir.inset_flag[pctype] && > > !memcmp(&pf->fdir.input_set[pctype], &input_set, > > sizeof(uint64_t))) @@ -1616,8 +1618,10 @@ > > i40e_flow_set_fdir_inset(struct i40e_pf *pf, > > > > num = i40e_generate_inset_mask_reg(hw, input_set, mask_reg, > > > > I40E_INSET_MASK_NUM_REG); > > - if (num < 0) > > + if (num < 0) { > > + PMD_DRV_LOG(ERR, "Invalid pattern mask."); > > return -EINVAL; > > + } > > > > if (pf->support_multi_driver) { > > for (i = 0; i < num; i++) > > @@ -1762,18 +1766,15 @@ i40e_flow_add_del_fdir_filter(struct > > rte_eth_dev *dev, > > i40e_fdir_filter_convert(filter, &check_filter); > > > > if (add) { > > - if (filter->input.flow_ext.is_flex_flow) { > > + /* configure the input set for common PCTYPEs*/ > > + if (!filter->input.flow_ext.customized_pctype) { > > ret = i40e_flow_set_fdir_inset(pf, pctype, > > filter->input.flow_ext.input_set); > > - if (ret == -1) { > > - PMD_DRV_LOG(ERR, "Conflict with the" > > - " first rule's input set."); > > - return -EINVAL; > > - } else if (ret == -EINVAL) { > > - PMD_DRV_LOG(ERR, "Invalid pattern mask."); > > - return -EINVAL; > > - } > > + if (ret < 0) > > + return ret; > > + } > > > > + if (filter->input.flow_ext.is_flex_flow) { > > for (i = 0; i < filter->input.flow_ext.raw_id; i++) { > > layer_idx = filter->input.flow_ext.layer_idx; > > field_idx = layer_idx * I40E_MAX_FLXPLD_FIED > > + i; > > -- > > 2.17.1 > > Acked-by: Beilei Xing <beilei.xing@intel.com> Applied to dpdk-next-net-intel. Thanks Qi ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-04-21 14:35 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-04-16 2:19 [dpdk-dev] [PATCH] net/i40e: fix flow does not effect on uncustomed pctype Murphy Yang 2021-04-19 8:16 ` Xing, Beilei 2021-04-21 1:46 ` Xing, Beilei 2021-04-21 2:08 ` [dpdk-dev] [PATCH v2] net/i40e: fix FDIR issue for common PCTYPEs Murphy Yang 2021-04-21 3:25 ` Xing, Beilei 2021-04-21 3:44 ` [dpdk-dev] [PATCH v3] " Murphy Yang 2021-04-21 5:10 ` Xing, Beilei 2021-04-21 14:35 ` Zhang, Qi Z
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.