All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Xing, Beilei" <beilei.xing@intel.com>
To: "Yang, MurphyX" <murphyx.yang@intel.com>, "dev@dpdk.org" <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 v2] net/i40e: fix FDIR issue for common PCTYPEs
Date: Wed, 21 Apr 2021 03:25:35 +0000	[thread overview]
Message-ID: <MN2PR11MB3807FDD36A0742F3A2304101F7479@MN2PR11MB3807.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210421020830.4989-1-murphyx.yang@intel.com>



> -----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


  reply	other threads:[~2021-04-21  3:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=MN2PR11MB3807FDD36A0742F3A2304101F7479@MN2PR11MB3807.namprd11.prod.outlook.com \
    --to=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jia.guo@intel.com \
    --cc=murphyx.yang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=robinx.zhang@intel.com \
    --cc=stevex.yang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.