Message ID | 20210416021955.9790-1-murphyx.yang@intel.com (mailing list archive) |
---|---|
State | Superseded, archived |
Delegated to: | Qi Zhang |
Headers | show |
Series | net/i40e: fix flow does not effect on uncustomed pctype | expand |
Context | Check | Description |
---|---|---|
ci/iol-testing | success | Testing PASS |
ci/iol-intel-Performance | success | Performance Testing PASS |
ci/iol-abi-testing | warning | Testing issues |
ci/github-robot | success | github build: passed |
ci/travis-robot | success | travis build: passed |
ci/intel-Testing | success | Testing PASS |
ci/Intel-compilation | success | Compilation OK |
ci/checkpatch | success | coding style OK |
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
> -----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
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;
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(-)