From: "Wang, Haiyue" <haiyue.wang@intel.com>
To: Qiming Chen <chenqiming_huawei@163.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "stable@dpdk.org" <stable@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v2] net/ixgbe: fix probability of obtaining mailbox lock failure
Date: Wed, 8 Sep 2021 03:33:12 +0000 [thread overview]
Message-ID: <BN8PR11MB3795DD394969D24A86A49795F7D49@BN8PR11MB3795.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20210906022208.9530-1-chenqiming_huawei@163.com>
> -----Original Message-----
> From: Qiming Chen <chenqiming_huawei@163.com>
> Sent: Monday, September 6, 2021 10:22
> To: dev@dpdk.org
> Cc: Wang, Haiyue <haiyue.wang@intel.com>; Qiming Chen <chenqiming_huawei@163.com>; stable@dpdk.org
> Subject: [PATCH v2] net/ixgbe: fix probability of obtaining mailbox lock failure
>
> Ifconfig pf port up/down, after several times, the dpdk vf driver may fail
> to obtain the mailbox lock, resulting in configuration failure and
> functional failure. In order to increase the reliability of mailbox
> communication, the patch uses a trial strategy.
What's your log message like after " --log-level=pmd.net.ixgbe.init:8 --log-level=pmd.net.ixgbe.driver:8" ?
What I got is just a little messages, no more function call. "ifconfig PF down/up".
testpmd> ixgbevf_intr_disable(): >>
ixgbe_read_mbx(): ixgbe_read_mbx
ixgbe_read_mbx_vf(): ixgbe_read_mbx_vf
ixgbe_obtain_mbx_lock_vf(): ixgbe_obtain_mbx_lock_vf
Port 0: reset event
ixgbevf_intr_enable(): >>
>
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
>
> Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
> ---
> v2:
> Modify fixes commit
> ---
> drivers/net/ixgbe/base/ixgbe_mbx.c | 18 +++++++++++++-----
> 1 file changed, 13 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ixgbe/base/ixgbe_mbx.c b/drivers/net/ixgbe/base/ixgbe_mbx.c
> index 4dddff2c58..5a14fcc7b4 100644
> --- a/drivers/net/ixgbe/base/ixgbe_mbx.c
> +++ b/drivers/net/ixgbe/base/ixgbe_mbx.c
> @@ -370,15 +370,23 @@ STATIC s32 ixgbe_check_for_rst_vf(struct ixgbe_hw *hw, u16 mbx_id)
> STATIC s32 ixgbe_obtain_mbx_lock_vf(struct ixgbe_hw *hw)
> {
> s32 ret_val = IXGBE_ERR_MBX;
> + s32 timeout = hw->mbx.timeout;
> + s32 usec = hw->mbx.usec_delay;
>
> DEBUGFUNC("ixgbe_obtain_mbx_lock_vf");
>
> - /* Take ownership of the buffer */
> - IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_VFU);
> + do {
> + /* Take ownership of the buffer */
> + IXGBE_WRITE_REG(hw, IXGBE_VFMAILBOX, IXGBE_VFMAILBOX_VFU);
>
> - /* reserve mailbox for vf use */
> - if (ixgbe_read_v2p_mailbox(hw) & IXGBE_VFMAILBOX_VFU)
> - ret_val = IXGBE_SUCCESS;
> + /* reserve mailbox for vf use */
> + if (ixgbe_read_v2p_mailbox(hw) & IXGBE_VFMAILBOX_VFU) {
> + ret_val = IXGBE_SUCCESS;
> + break;
> + }
> +
> + usec_delay(usec);
> + } while (timeout--);
>
> return ret_val;
> }
> --
> 2.30.1.windows.1
next prev parent reply other threads:[~2021-09-08 3:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-31 8:40 [dpdk-dev] [PATCH] " Qiming Chen
2021-09-06 1:48 ` Wang, Haiyue
2021-09-06 2:22 ` [dpdk-dev] [PATCH v2] " Qiming Chen
2021-09-08 3:33 ` Wang, Haiyue [this message]
2021-09-09 1:56 ` Qiming Chen
2021-09-09 2:13 ` Wang, Haiyue
2021-09-09 2:55 ` Wang, Haiyue
2021-09-09 3:34 ` Qiming Chen
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=BN8PR11MB3795DD394969D24A86A49795F7D49@BN8PR11MB3795.namprd11.prod.outlook.com \
--to=haiyue.wang@intel.com \
--cc=chenqiming_huawei@163.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/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).