DPDK patches and discussions
 help / color / mirror / Atom feed
From: amit shukla <amitshukla19@gmail.com>
To: dev@dpdk.org, beilei.xing@intel.com, qi.z.zhang@intel.com,
	 olivier.matz@6wind.com, jingjing.wu@intel.com
Subject: Re: [dpdk-dev] Intel X710, DPDK with SFP - FTLX8574D3BCV-IT link down
Date: Mon, 25 Nov 2019 17:17:17 +0530	[thread overview]
Message-ID: <CAJ4PSvRsBPM=uAAxr_=YLfaLrW70PuNCe+-=GRtxN7vBNFa74A@mail.gmail.com> (raw)
In-Reply-To: <CAJ4PSvRbn0qN9zp1EEjb+L55P5a4HXf+ioUm3b2zjKcfecK7fA@mail.gmail.com>

Hello,

The below patch works for me. With the below patch on 1st retry attempt
i40e_aq_get_phy_capabilities returns success.

diff --git a/dpdk-17.05/drivers/net/i40e/i40e_ethdev.c
b/dpdk-17.05/drivers/net/i40e/i40e_ethdev.c
index e9185c44bc..e79fa80854 100644
--- a/dpdk-17.05/drivers/net/i40e/i40e_ethdev.c
+++ b/dpdk-17.05/drivers/net/i40e/i40e_ethdev.c
@@ -1822,12 +1822,27 @@ i40e_phy_conf_link(struct i40e_hw *hw,
                        I40E_LINK_SPEED_1GB |
                        I40E_LINK_SPEED_100MB;
        int ret = -ENOTSUP;
-
+       int retries = 0;

        status = i40e_aq_get_phy_capabilities(hw, false, false, &phy_ab,
                                              NULL);
-       if (status)
-               return ret;
+
+       while (status) {
+               retries++;
+               rte_delay_us(5000);
+               if (retries < 4) {
+                       status = i40e_aq_get_phy_capabilities(hw, false,
+                                       false, &phy_ab, NULL);
+               }
+               else {
+                       return ret;
+               }
+       }


Please suggest.

If the patch is okay, will start the process of submitting it.

Thanks and Regards,
Amit


On Tue, Nov 19, 2019 at 2:03 PM amit shukla <amitshukla19@gmail.com> wrote:

> Adding Beilei Xing and Qi Zhang
>
> Thanks and Regards,
> Amit
>
> On Mon, Nov 18, 2019 at 2:39 PM amit shukla <amitshukla19@gmail.com>
> wrote:
>
>> Hello,
>>
>> Using a X710 based NIC with Intel SFP - FTLX8574D3BCV-IT on a bare-metal
>> setup, I came across the following issue on the i40e PMD:
>>
>> When Intel SFP - FTLX8574D3BCV-IT is used, link does not come up on
>> executing link down and up commands in quick succession. It shows
>> "NO-CARRIER" in ip link show.
>>
>> #ip link set dev eth0 down; ip link set dev eth0 up
>> #
>> # ip link show dev eth0
>> 304: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
>> state DOWN mode DEFAULT group default qlen 1000
>> link/ether xx:xx:xx:xx:xx:xx brd ff:ff:ff:ff:ff:ff
>>
>> On the 1st command, ip link set dev eth0 down,
>> i40e_aq_get_phy_capabilities returns success but for next command (ip link
>> set dev eth0 up) it returns I40E_ERR_UNKNOWN_PHY (-7).
>>
>> If  link down and up commands are executed with a sleep of 1 second
>> in-between them, then issue is not observed.
>>
>> Intel(R) Xeon(R) CPU E5-2637 v3 @ 3.50GHz
>> DPDK - 17.05
>> NIC firmware-version: 4.53 0x80001e5b 17.0.12
>> 05:00.0 Ethernet controller: Intel Corporation Ethernet Controller X710
>> for 10GbE SFP+ (rev 02)
>>         Subsystem: Intel Corporation Ethernet 10G 2P X710 Adapter
>>
>> Thanks and Regards,
>> Amit Shukla
>>
>

      reply	other threads:[~2019-11-25 11:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-18  9:09 amit shukla
2019-11-19  8:33 ` amit shukla
2019-11-25 11:47   ` amit shukla [this message]

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='CAJ4PSvRsBPM=uAAxr_=YLfaLrW70PuNCe+-=GRtxN7vBNFa74A@mail.gmail.com' \
    --to=amitshukla19@gmail.com \
    --cc=beilei.xing@intel.com \
    --cc=dev@dpdk.org \
    --cc=jingjing.wu@intel.com \
    --cc=olivier.matz@6wind.com \
    --cc=qi.z.zhang@intel.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).