DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ferruh Yigit <ferruh.yigit@amd.com>
To: "lihuisong (C)" <lihuisong@huawei.com>,
	Jie Hai <haijie1@huawei.com>,
	dev@dpdk.org, Yisen Zhuang <yisen.zhuang@huawei.com>,
	Chunsong Feng <fengchunsong@huawei.com>,
	Ferruh Yigit <ferruh.yigit@intel.com>
Cc: fengchengwen@huawei.com
Subject: Re: [PATCH 1/2] net/hns3: fix sync mailbox failure forever
Date: Sat, 11 Nov 2023 05:20:26 +0000	[thread overview]
Message-ID: <7bec662a-247c-4b48-b748-35628b2a772c@amd.com> (raw)
In-Reply-To: <e54190ed-853c-bb1c-001c-ce4b20f4a2d3@huawei.com>

On 11/11/2023 3:21 AM, lihuisong (C) wrote:

> 在 2023/11/11 9:59, Jie Hai 写道:
>> From: Dengdui Huang <huangdengdui@huawei.com>
>>
>> Currently, hns3 VF driver uses the following points to match
>> the response and request message for the mailbox synchronous
>> message between VF and PF.
>> 1. req_msg_data which is consist of message code and subcode,
>>     is used to match request and response.
>> 2. head means the number of send success for VF.
>> 3. tail means the number of receive success for VF.
>> 4. lost means the number of send timeout for VF.
>> And 'head', 'tail' and 'lost' are dynamically updated during
>> the communication.
>>
>> Now there is a issue that all sync mailbox message will
>> send failure forever at the flollowing case:
>> 1. VF sends the message A
>>      then head=UINT32_MAX-1, tail=UINT32_MAX-3, lost=2.
>> 2. VF sends the message B
>>      then head=UINT32_MAX, tail=UINT32_MAX-2, lost=2.
>> 3. VF sends the message C, the message will be timeout because
>>     it can't get the response within 500ms.
>>     then head=0, tail=0, lost=2
>>     note: tail is assigned to head if tail > head according to
>>     current code logic. From now on, all subsequent sync milbox
>>     messages fail to be sent.
>>
>> It's very complicated to use the fields 'lost','tail','head'.
>> The code and subcode of the request sync mailbox are used as the
>> matching code of the message, which is used to match the response
>> message for receiving the synchronization response.
>>
>> This patch drops these fields and uses the following solution
>> to solve this issue:
>> In the handling response message process, using the req_msg_data
>> of the request and response message to judge whether the sync
>> mailbox message has been received.
>>
>> Fixes: 463e748964f5 ("net/hns3: support mailbox")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Dengdui Huang <huangdengdui@huawei.com>
>> Signed-off-by: Jie Hai <haijie1@huawei.com>
>> 
>
> Acked-by: Huisong Li <lihuisong@huawei.com>
>

Applied to dpdk-next-net/main, thanks.



  reply	other threads:[~2023-11-11  5:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-11  1:59 [PATCH 0/2] net/hns3: fix mailbox bug and replace __atomic_xxx API Jie Hai
2023-11-11  1:59 ` [PATCH 1/2] net/hns3: fix sync mailbox failure forever Jie Hai
2023-11-11  3:21   ` lihuisong (C)
2023-11-11  5:20     ` Ferruh Yigit [this message]
2023-11-11  1:59 ` [PATCH 2/2] net/hns3: use stdatomic API Jie Hai
2023-11-11  3:20   ` lihuisong (C)
2023-11-11  5:22 ` [PATCH 0/2] net/hns3: fix mailbox bug and replace __atomic_xxx API Ferruh Yigit
2023-12-07  1:42 ` [PATCH v2 0/4] net/hns3: bugfix on reset and stdatomic API Jie Hai
2023-12-07  1:42   ` [PATCH v2 1/4] net/hns3: fix VF multiple count on one reset Jie Hai
2023-12-07  1:42   ` [PATCH v2 2/4] net/hns3: fix disable command with firmware Jie Hai
2023-12-07  1:42   ` [PATCH v2 3/4] net/hns3: fix incorrect reset level comparison Jie Hai
2023-12-07  1:42   ` [PATCH v2 4/4] net/hns3: use stdatomic API Jie Hai
2023-12-07 13:57     ` Ferruh Yigit
2023-12-07 17:42       ` Ferruh Yigit
2023-12-08  7:24         ` Jie Hai
2023-12-08  9:54           ` Ferruh Yigit
2023-12-08  7:08       ` Jie Hai
2023-12-07 13:57     ` Ferruh Yigit
2023-12-08  7:44 ` [PATCH v3 0/3] net/hns3: bugfix on reset Jie Hai
2023-12-08  7:44   ` [PATCH v3 1/3] net/hns3: fix VF multiple count on one reset Jie Hai
2023-12-08  7:44   ` [PATCH v3 2/3] net/hns3: fix disable command with firmware Jie Hai
2023-12-08  7:44   ` [PATCH v3 3/3] net/hns3: fix incorrect reset level comparison Jie Hai
2023-12-08 12:31   ` [PATCH v3 0/3] net/hns3: bugfix on reset 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=7bec662a-247c-4b48-b748-35628b2a772c@amd.com \
    --to=ferruh.yigit@amd.com \
    --cc=dev@dpdk.org \
    --cc=fengchengwen@huawei.com \
    --cc=fengchunsong@huawei.com \
    --cc=ferruh.yigit@intel.com \
    --cc=haijie1@huawei.com \
    --cc=lihuisong@huawei.com \
    --cc=yisen.zhuang@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).