From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA21CA04C2; Mon, 25 Nov 2019 12:47:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7AD432952; Mon, 25 Nov 2019 12:47:31 +0100 (CET) Received: from mail-il1-f193.google.com (mail-il1-f193.google.com [209.85.166.193]) by dpdk.org (Postfix) with ESMTP id 896A7A3 for ; Mon, 25 Nov 2019 12:47:29 +0100 (CET) Received: by mail-il1-f193.google.com with SMTP id s5so13895293iln.4 for ; Mon, 25 Nov 2019 03:47:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=KPv6gSupJhAx5j8DNlmY7t+E45U/CzV+/AaRbzlFb/0=; b=no1P4/YU+h7WeXlLPNubhuFs4OEUMeetfxdCt08QI0eieQueBzaefac+eSNQMGmNKG EEk8W39Xxawehj8C5dqjlhms3rEf3OoDRm+pr3JVte3dOr3NwU4jglYa7b52mx93oxN6 rajE9wqKRgoXU0Fsqqm2WvCim3Kbcbf3rZmTFKXqIO0ja7LQO/bnIbpl0aLyOhw4SizU o+T09IkwTxqQpkcVK8ARq5B4oqv7wbP+f4NRfSOiZDtGi4htTE/dePh792fyWvkfHD7B l6xPoe7R5ge5hUeTDC32qpZ/3E+zUGWoiyqxZflkv+grvmbyvieKHH+kXF2QhCtcr1Yy 1rQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=KPv6gSupJhAx5j8DNlmY7t+E45U/CzV+/AaRbzlFb/0=; b=uX30+Q5CG3VM/gpgsZi3Vtm9mMfPLn0XS+C5CsQ5cZpLi8O57T3ha+1lXIAcbw7EYO BjcyO48G4rYXp9SDKvAmcZcjAGIITnWE7dXeKK9ClA54wskx+nHWJov0fQcc0CnhqGoa ZpqxQ0HbhjA6ZWRN3SiZ/PO/1utUBLBuSWYJqT59VwgxHr/cWOR+e/57it4jQq6zQTsr qdZon1vZnEF60NtmnDw8hqHA4vliyZ8npCm+BsWfQ2UhoUppjxEQYXgBHB61Z/F0c3xh 5NX4BHEfoAR9CAOKSem3UIYn4hww9P2xgLlnWBAnV2s4lK7151bzxC9Hd/Nf85dlvTzI sX9w== X-Gm-Message-State: APjAAAXrsdLkbg6aXxj56oZPUgKVKxdrrlXUKU2TVu3XFDlclOaPVRPE ig1QTnLrhxI5HbccwInsp6lTY5Ech8ZeLSxKJxP8Mknm X-Google-Smtp-Source: APXvYqw3tIn0kx79abuP+rRfIYbU94k8xQGWJ99W5GbFB6nRM5fKpjT4381GWLIVJsB7TnfEuL10ZbQvBwn3cMqvReI= X-Received: by 2002:a92:da03:: with SMTP id z3mr19925791ilm.191.1574682448655; Mon, 25 Nov 2019 03:47:28 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: amit shukla Date: Mon, 25 Nov 2019 17:17:17 +0530 Message-ID: To: dev@dpdk.org, beilei.xing@intel.com, qi.z.zhang@intel.com, olivier.matz@6wind.com, jingjing.wu@intel.com Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Intel X710, DPDK with SFP - FTLX8574D3BCV-IT link down X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" 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 wrote: > Adding Beilei Xing and Qi Zhang > > Thanks and Regards, > Amit > > On Mon, Nov 18, 2019 at 2:39 PM amit shukla > 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: 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 >> >