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 50B90A0547; Fri, 29 Oct 2021 05:25:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE42940688; Fri, 29 Oct 2021 05:25:23 +0200 (CEST) Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by mails.dpdk.org (Postfix) with ESMTP id A7B4040395 for ; Fri, 29 Oct 2021 05:25:22 +0200 (CEST) Received: from dggeme756-chm.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4HgSSB1ZjVzZcXm; Fri, 29 Oct 2021 11:23:22 +0800 (CST) Received: from [10.67.103.128] (10.67.103.128) by dggeme756-chm.china.huawei.com (10.3.19.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.15; Fri, 29 Oct 2021 11:25:20 +0800 To: References: <20211028115230.27047-1-humin29@huawei.com> CC: Ferruh Yigit , Thomas Monjalon From: "Min Hu (Connor)" Message-ID: Date: Fri, 29 Oct 2021 11:25:19 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20211028115230.27047-1-humin29@huawei.com> Content-Type: text/plain; charset="gbk"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.67.103.128] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggeme756-chm.china.huawei.com (10.3.19.102) X-CFilter-Loop: Reflected 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" 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. Please check it out. Thanks. ÔÚ 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) > --- > 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 >