DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: "Min Hu (Connor)" <humin29@huawei.com>
Cc: dev@dpdk.org, Ferruh Yigit <ferruh.yigit@intel.com>
Subject: Re: [dpdk-dev] [PATCH] net/hns3: fix mailbox communication with HW
Date: Fri, 29 Oct 2021 11:34:43 +0200	[thread overview]
Message-ID: <2036285.1fVU3BL5Eb@thomas> (raw)
In-Reply-To: <a8a415ff-49f0-b0d2-112d-5c5f83bf646f@huawei.com>

29/10/2021 05:25, Min Hu (Connor):
> Hi, Thomos, Ferruh,
> 	As this patch is to fix a critical bug for hns3 PMD, we hope this patch 
> could be merged into 21.11.

No reason to not take a fix.

> 	Please check it out. Thanks.

You sent it yesterday, no need to ping on it.


> 在 2021/10/28 19:52, Min Hu (Connor) 写道:
> > Mailbox is the communication mechanism between SW and HW. There exist two
> > approaches for SW to recongnize mailbox message from HW. One way is using
> > match_id, the other is to compare the message code. The two approaches are
> > independent and used in different scenarios.
> > 
> > But for the second approache, "next_to_use" should be updated and written
> > to HW register. If it not done, HW do not know the position SW steps, then,
> > the communication between SW and HW will turn to be failed.
> > 
> > Fixes: dbbbad23e380 ("net/hns3: fix VF handling LSC event in secondary process")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
> > ---
> >   drivers/net/hns3/hns3_mbx.c | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/net/hns3/hns3_mbx.c b/drivers/net/hns3/hns3_mbx.c
> > index a47622b8a6..245652e2ed 100644
> > --- a/drivers/net/hns3/hns3_mbx.c
> > +++ b/drivers/net/hns3/hns3_mbx.c
> > @@ -435,6 +435,9 @@ hns3_handle_mbx_msg_out_intr(struct hns3_hw *hw)
> >   scan_next:
> >   		next_to_use = (next_to_use + 1) % hw->cmq.crq.desc_num;
> >   	}
> > +
> > +	crq->next_to_use = next_to_use;
> > +	hns3_write_dev(hw, HNS3_CMDQ_RX_HEAD_REG, crq->next_to_use);
> >   }
> >   
> >   void
> > 
> 






  reply	other threads:[~2021-10-29  9:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-28 11:52 Min Hu (Connor)
2021-10-29  3:25 ` Min Hu (Connor)
2021-10-29  9:34   ` Thomas Monjalon [this message]
2021-10-29 16:29 ` 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=2036285.1fVU3BL5Eb@thomas \
    --to=thomas@monjalon.net \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=humin29@huawei.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).