From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3B655A0032; Fri, 29 Oct 2021 11:34:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23F1041143; Fri, 29 Oct 2021 11:34:51 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id A5F534111F for ; Fri, 29 Oct 2021 11:34:49 +0200 (CEST) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 8D5FE3201D1C; Fri, 29 Oct 2021 05:34:46 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 29 Oct 2021 05:34:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= 7N9aUrk6dPbodo235xav2Ky62x2LO4gw8YIWlpD5HW8=; b=XRZa+ND9Lu5pJsAw f7eqLCxZjWwwfjz2Janvk40vZzsjNicLWQFDQ7L3/riMiwOH8QlLWMav5UHYDJSS pVivOEZ0w7Sk9XnZL3HCJownnMga/BND+IVErW45tKyQj7BDsJ/X0Y3/Gpt6nMzQ 1xgKZAcHHeuHTIuu58OLqOs81mQc3bnR4GOQvPFygPL8qZfbFbEAvTPDk9azQb6C izqhWtKuC5FgT63pRiP7PNaRQo2D9O0560e041PbxuBHx/83VmOk1kWIWI5skoHo qzJje1xjjZupnp5CF3PcnWvfGGHZPiQirsO/Xu5obyKhCIBB3qJKNy15Sik7EShc m4O0+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=7N9aUrk6dPbodo235xav2Ky62x2LO4gw8YIWlpD5H W8=; b=DNzEruPuskKqsFmbeVzg9Lh+yZK0rDdw+eQEB9GuHMFIvCGFARXV2TyZO TOPZX1jL7Fqs0I9OaV3aXetfKTeCr0Jyfr3OIfEAYaD6zu1mEWwCoXf45fAH8hv6 Ho8Nk8ttvIQTfajLsW6duWo8kK9+5w8/AXoSMu1CEAfAkSmUH+gsDOm0it9rBqfi wUI6BEmkAz2MB4PUtU2CJB1xWMkWd5J6IUq7By4XUdF63N8n44TWJ9Uv5H5v71qY ave7YS56D89LtjVo87ZVbAnQUcrTC2WEQBeny43tAtm8ooj4GLt6YS9kxJbjOnlO hVPmeyQr81sllX8Ec4jkvk9RunsPw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdeghedgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkfgjfhgggfgtsehtqhertddttdejnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnhepkeethedtieevhfeigeejleegudefjeehkeekteeuveeiuedvveeu tdejveehveetnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 29 Oct 2021 05:34:44 -0400 (EDT) From: Thomas Monjalon To: "Min Hu (Connor)" Cc: dev@dpdk.org, Ferruh Yigit Date: Fri, 29 Oct 2021 11:34:43 +0200 Message-ID: <2036285.1fVU3BL5Eb@thomas> In-Reply-To: References: <20211028115230.27047-1-humin29@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/hns3: fix mailbox communication with HW X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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= =20 > 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. > =E5=9C=A8 2021/10/28 19:52, Min Hu (Connor) =E5=86=99=E9=81=93: > > Mailbox is the communication mechanism between SW and HW. There exist t= wo > > approaches for SW to recongnize mailbox message from HW. One way is usi= ng > > match_id, the other is to compare the message code. The two approaches = are > > independent and used in different scenarios. > >=20 > > But for the second approache, "next_to_use" should be updated and writt= en > > to HW register. If it not done, HW do not know the position SW steps, t= hen, > > the communication between SW and HW will turn to be failed. > >=20 > > Fixes: dbbbad23e380 ("net/hns3: fix VF handling LSC event in secondary = process") > > Cc: stable@dpdk.org > >=20 > > Signed-off-by: Min Hu (Connor) > > --- > > drivers/net/hns3/hns3_mbx.c | 3 +++ > > 1 file changed, 3 insertions(+) > >=20 > > 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 =3D (next_to_use + 1) % hw->cmq.crq.desc_num; > > } > > + > > + crq->next_to_use =3D next_to_use; > > + hns3_write_dev(hw, HNS3_CMDQ_RX_HEAD_REG, crq->next_to_use); > > } > > =20 > > void > >=20 >=20