DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: "Yu, DapengX" <dapengx.yu@intel.com>,
	"Wu, Jingjing" <jingjing.wu@intel.com>,
	"Xing, Beilei" <beilei.xing@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"Yu, DapengX" <dapengx.yu@intel.com>,
	"stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix vector id assignment
Date: Mon, 4 Jan 2021 00:25:58 +0000	[thread overview]
Message-ID: <fda6113ed8514ae2abe7b0091b76b093@intel.com> (raw)
In-Reply-To: <20201230065347.90115-1-dapengx.yu@intel.com>



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of dapengx.yu@intel.com
> Sent: Wednesday, December 30, 2020 2:54 PM
> To: Wu, Jingjing <jingjing.wu@intel.com>; Xing, Beilei <beilei.xing@intel.com>
> Cc: dev@dpdk.org; Yu, DapengX <dapengx.yu@intel.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/iavf: fix vector id assignment
> 
> From: YU DAPENG <dapengx.yu@intel.com>
> 
> When the interrupt handle instance allows none packet I/O interrupts, the max
> value of vector_id is set to be less than the number of msix interrupts, but not
> equal to it. Which may cause same vector_id is sent to PF with opcode
> VIRTCHNL_OP_CONFIG_IRQ_MAP to setup the cause of interrupt mapping in
> iavf_config_irq_map(), these are invalid parameters, cause error:
> VIRTCHNL_STATUS_ERR_PARAM(-5). So add code to set the max value of
> vector_id to be equal to the number of msix interrupts.
> 
> Fixes: d6bde6b5eae9 ("net/avf: enable Rx interrupt")
> Cc: stable@dpdk.org
> 
> Signed-off-by: YU DAPENG <dapengx.yu@intel.com>
> ---
>  drivers/net/iavf/iavf_ethdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/iavf/iavf_ethdev.c b/drivers/net/iavf/iavf_ethdev.c index
> 7e3c26a94..54ea3a36c 100644
> --- a/drivers/net/iavf/iavf_ethdev.c
> +++ b/drivers/net/iavf/iavf_ethdev.c
> @@ -578,7 +578,7 @@ static int iavf_config_rx_queues_irqs(struct rte_eth_dev
> *dev,
>  				qv_map[i].queue_id = i;
>  				qv_map[i].vector_id = vec;
>  				intr_handle->intr_vec[i] = vec++;
> -				if (vec >= vf->nb_msix)
> +				if (vec > vf->nb_msix)

This is not correct, the nb_msix should already include the vector 0, we should not set a vector_id to a value that >= nb_msix, 

>  					vec = IAVF_RX_VEC_START;
>  			}
>  			vf->qv_map = qv_map;
> --
> 2.27.0


  parent reply	other threads:[~2021-01-04  0:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30  6:53 dapengx.yu
2020-12-30  7:31 ` Xie, WeiX
2021-01-04  0:25 ` Zhang, Qi Z [this message]
2021-01-04  2:01   ` Yu, DapengX
2021-01-08 10:21 ` dapengx.yu
2021-01-11  9:06   ` Xie, WeiX
2021-01-12  6:26   ` Xu, Ting
2021-01-12  6:44     ` Wu, Jingjing
2021-01-12  7:08       ` Yu, DapengX
2021-01-12  6:46     ` Yu, DapengX

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=fda6113ed8514ae2abe7b0091b76b093@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dapengx.yu@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).