DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: taox.zhu@intel.com, qiming.yang@intel.com, wenzhuo.lu@intel.com
Cc: dev@dpdk.org, beilei.xing@intel.com, qi.z.zhang@intel.com,
	xiaolong.ye@intel.com, stable@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/ice: fix queue bind MSI-X interrupt error
Date: Thu, 20 Feb 2020 09:20:41 +0000	[thread overview]
Message-ID: <eff245e6-4b63-72a4-7033-2df6df806898@intel.com> (raw)
In-Reply-To: <20200219101712.9525-1-taox.zhu@intel.com>

On 2/19/2020 10:17 AM, taox.zhu@intel.com wrote:
> From: Zhu Tao <taox.zhu@intel.com>
> 
> To bind a queue to an MSI-X interrupt, need to set some register.
> The register consists of many parts, each of which has several
> bits; therefore, the shift operator '<<' was used; so the operator
> '<' in the code should be '<<'.
> 
> Old code adds 1 on even MSI-X interrupt vector index used by queue,
> resulting in interrupt mapping error.
> 
> Fixes: 65dfc889d8 ("net/ice: support Rx queue interruption")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Zhu Tao <taox.zhu@intel.com>
> ---
>  drivers/net/ice/ice_ethdev.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
> index 8e9369e0a..85ef83e92 100644
> --- a/drivers/net/ice/ice_ethdev.c
> +++ b/drivers/net/ice/ice_ethdev.c
> @@ -2605,9 +2605,9 @@ __vsi_queues_bind_intr(struct ice_vsi *vsi, uint16_t msix_vect,
>  	for (i = 0; i < nb_queue; i++) {
>  		/*do actual bind*/
>  		val = (msix_vect & QINT_RQCTL_MSIX_INDX_M) |
> -		      (0 < QINT_RQCTL_ITR_INDX_S) | QINT_RQCTL_CAUSE_ENA_M;
> +		      (0 << QINT_RQCTL_ITR_INDX_S) | QINT_RQCTL_CAUSE_ENA_M;
>  		val_tx = (msix_vect & QINT_TQCTL_MSIX_INDX_M) |
> -			 (0 < QINT_TQCTL_ITR_INDX_S) | QINT_TQCTL_CAUSE_ENA_M;
> +			 (0 << QINT_TQCTL_ITR_INDX_S) | QINT_TQCTL_CAUSE_ENA_M;

Hi Tao,

Out of curiosity, what is the point of left shifting "0"?

  parent reply	other threads:[~2020-02-20  9:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-19 10:17 taox.zhu
2020-02-20  6:11 ` Ye Xiaolong
2020-02-20  9:20 ` Ferruh Yigit [this message]
2020-02-20  9:43   ` Zhu, TaoX
2020-02-20 10:45     ` Ferruh Yigit

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=eff245e6-4b63-72a4-7033-2df6df806898@intel.com \
    --to=ferruh.yigit@intel.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=taox.zhu@intel.com \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiaolong.ye@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 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).