patches for DPDK stable branches
 help / color / mirror / Atom feed
From: "Xing, Beilei" <beilei.xing@intel.com>
To: "Zhang, AlvinX" <alvinx.zhang@intel.com>,
	"Zhang, Qi Z" <qi.z.zhang@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>, "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-stable] [PATCH] net/i40e: fix conflict with multi-driver
Date: Wed, 25 Sep 2019 09:16:29 +0000
Message-ID: <94479800C636CB44BD422CB454846E013CE48658@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <20190920105722.48921-1-alvinx.zhang@intel.com>


> -----Original Message-----
> From: Zhang, AlvinX
> Sent: Friday, September 20, 2019 6:57 PM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Zhang, AlvinX <alvinx.zhang@intel.com>;
> stable@dpdk.org
> Subject: [PATCH] net/i40e: fix conflict with multi-driver
> 
> From: Alvin Zhang <alvinx.zhang@intel.com>
> 
> If support-multi-driver option been set, we suppose the DPDK will not modify
> the value of global register GLQF_FD_MSK. Current situation is if we create a
> new flow with 'flow creat ...' command, the register value may be changed.

Thanks for the fix, the patch looks OK for me, but the commit log should be amended.
How about 
"If support-multi-driver is enabled, the global registers should not be configured.
But with the correct code base, if creating a flow with rte_flow API, the global
register GLQF_FD_MSK may be changed." ?

Beilei

> 
> Fixes: cfdfca493cae ("net/i40e: fix multiple driver support")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Alvin Zhang <alvinx.zhang@intel.com>
> ---
>  drivers/net/i40e/i40e_flow.c | 34 +++++++++++++++++++++++++++-------
>  1 file changed, 27 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c
> index e902a35..8c54394 100644
> --- a/drivers/net/i40e/i40e_flow.c
> +++ b/drivers/net/i40e/i40e_flow.c
> @@ -2349,6 +2349,33 @@ static int i40e_flow_destroy_tunnel_filter(struct
> i40e_pf *pf,
>  	if (num < 0)
>  		return -EINVAL;
> 
> +	if (pf->support_multi_driver) {
> +		for (i = 0; i < num; i++)
> +			if (i40e_read_rx_ctl(hw,
> +					I40E_GLQF_FD_MSK(i, pctype)) !=
> +					mask_reg[i]) {
> +				PMD_DRV_LOG(ERR, "Input set setting is not"
> +						" supported.");
> +				return -1;
> +			}
> +		for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
> +			if (i40e_read_rx_ctl(hw,
> +					I40E_GLQF_FD_MSK(i, pctype)) != 0) {
> +				PMD_DRV_LOG(ERR, "Input set setting is not"
> +						" supported.");
> +				return -1;
> +			}
> +
> +	} else {
> +		for (i = 0; i < num; i++)
> +			i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),
> +				mask_reg[i]);
> +		/*clear unused mask registers of the pctype */
> +		for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
> +			i40e_check_write_reg(hw,
> +					I40E_GLQF_FD_MSK(i, pctype), 0);
> +	}
> +
>  	inset_reg |= i40e_translate_input_set_reg(hw->mac.type, input_set);
> 
>  	i40e_check_write_reg(hw, I40E_PRTQF_FD_INSET(pctype, 0), @@
> -2357,13 +2384,6 @@ static int i40e_flow_destroy_tunnel_filter(struct
> i40e_pf *pf,
>  			     (uint32_t)((inset_reg >>
>  					 I40E_32_BIT_WIDTH) & UINT32_MAX));
> 
> -	for (i = 0; i < num; i++)
> -		i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype),
> -				     mask_reg[i]);
> -
> -	/*clear unused mask registers of the pctype */
> -	for (i = num; i < I40E_INSET_MASK_NUM_REG; i++)
> -		i40e_check_write_reg(hw, I40E_GLQF_FD_MSK(i, pctype), 0);
>  	I40E_WRITE_FLUSH(hw);
> 
>  	pf->fdir.input_set[pctype] = input_set;
> --
> 1.8.3.1


  reply	other threads:[~2019-09-25  9:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-20 10:57 alvinx.zhang
2019-09-25  9:16 ` Xing, Beilei [this message]
2019-09-26 10:57 ` [dpdk-stable] [PATCH v2] net/i40e: fix exception " alvinx.zhang
2019-09-30 10:07   ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
2019-10-08 10:41 ` [dpdk-stable] [PATCH v3] " alvinx.zhang
2019-10-08 10:52   ` alvinx.zhang
2019-10-24  6:27   ` [dpdk-stable] [dpdk-dev] " Ye Xiaolong
2020-11-19  6:16 [dpdk-stable] [PATCH] net/i40e: fix conflict " beilei.xing
2020-11-19  6:24 ` Guo, Jia

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=94479800C636CB44BD422CB454846E013CE48658@SHSMSX101.ccr.corp.intel.com \
    --to=beilei.xing@intel.com \
    --cc=alvinx.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=stable@dpdk.org \
    /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

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git