From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f193.google.com (mail-pf0-f193.google.com [209.85.192.193]) by dpdk.org (Postfix) with ESMTP id A41D028F3 for ; Wed, 11 Jan 2017 04:00:49 +0100 (CET) Received: by mail-pf0-f193.google.com with SMTP id b22so15237896pfd.3 for ; Tue, 10 Jan 2017 19:00:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2eBHjaoFC29S6RSrMxER0nuzacHJ8Vyv+cEsbO2QVuI=; b=AdJjv/IhrI6XroXpUFjNmSiixsZdDzLHavEaQmi1P6kyh0yFn0I3X9Ub70gLLv/vjo DCo5369rhqn9wt7RK1bvp3wyvpal7l+WqwzGG1PnrHmMqazf6fwUZcnQmKlmVHPPRD+m 8QxfHhJ6/W9s/FCwPspk7RHj8H2i9136/8Ye89NNfTq9qsl+hBQC5hkYLGO8NQwSfsKx zJ4GtVVtkiIqPm0UHG8F1+4yGpliKBh95EmRmMkkdTFMqVVil6FIniOMCs75vLU1g+Fh rwx/eTCCzI8ujU/zKbMt+tW9GdOuTDt26ZuyTdtx4vycqFETLBSLHsXqF84Kq/6OtueR BUvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2eBHjaoFC29S6RSrMxER0nuzacHJ8Vyv+cEsbO2QVuI=; b=npbFGieC2YkievhxaKCnTxKS+Ko/vScvaenjZTBpqiKCHs3zgb4NL6L0c1S2kxd1M7 U6XsDr1jhFMFNVgROJCbiGOAFj1cce8HHkJUruXWcwmzFva+Oh1c5XHj4jVE2oG+NniE BbhCkqyqrCT1bkBQzWfOoJMhwNX+1DIY8rawqX83WSRY12CZ5ZD6GHsjg4zI5/rsfXt8 5O21Fc4G66mAMWDOAT9T+W7cjzjYN2wWXnpPlHTEf4MYgMZ6Z760bFQfJDyL00vuT81x 40GPoSux0N/q9iTV96GUxuLPMEtRvkiWyoZh20BvC0E9dVwTvs/QXIsvhea5sFUkh92T 1mqA== X-Gm-Message-State: AIkVDXL3CwQkajALO+KaLtVLzY4riKBRxaz0odN/XvtzfQFYAp7uleO05FHgItfgM4rCOA== X-Received: by 10.99.211.21 with SMTP id b21mr8040761pgg.120.1484103648946; Tue, 10 Jan 2017 19:00:48 -0800 (PST) Received: from ricudismac.niometrics.com ([66.96.194.217]) by smtp.gmail.com with ESMTPSA id c2sm8831053pfl.61.2017.01.10.19.00.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2017 19:00:48 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.2 \(3259\)) From: Christos Ricudis In-Reply-To: Date: Wed, 11 Jan 2017 11:00:45 +0800 Cc: Olivier MATZ , "Rowden, Aaron F" , "dev@dpdk.org" , "Wu, Jingjing" Content-Transfer-Encoding: quoted-printable Message-Id: <1A089981-6412-47FD-A46A-95A958D5E206@gmail.com> References: <2BF7FCC7-B2DF-43EE-B5F8-2F3271FB3DA1@gmail.com> <20170110162849.2256dc6e@glumotte.dev.6wind.com> To: "Zhang, Helin" X-Mailer: Apple Mail (2.3259) Subject: Re: [dpdk-dev] i40e_aq_get_phy_capabilities() fails when using SFP+ with no link 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: , X-List-Received-Date: Wed, 11 Jan 2017 03:00:50 -0000 Hi Helin,=20 > On 11 Jan 2017, at 09:08, Zhang, Helin wrote: >=20 > Hi Aaron >=20 > Is the SFP+ (Finisar FTLX8571D3BCL) supported and validated by Intel? > It seems there is some PHY issue in this case. As the original reporter of this issue, I will test with validated SFP+s = and will report on my testing.=20 Shouldn=E2=80=99t unsupported SFP+s be blacklisted in the I40E driver?=20= Best regards,=20 Christos Ricudis >=20 > Regards, > Helin >=20 > -----Original Message----- > From: Olivier MATZ [mailto:olivier.matz@6wind.com]=20 > Sent: Tuesday, January 10, 2017 11:29 PM > To: Christos Ricudis > Cc: dev@dpdk.org; Zhang, Helin ; Wu, Jingjing = > Subject: Re: [dpdk-dev] i40e_aq_get_phy_capabilities() fails when = using SFP+ with no link >=20 > Hi Christos, >=20 > +CC i40e maintainers >=20 > On Tue, 10 Jan 2017 20:32:26 +0800, Christos Ricudis = wrote: >> Hello, >>=20 >> Using a X710 based 4-port 4x10Gbit NIC, I have came across the=20 >> following issue on the i40e PMD: >>=20 >> When an optical SFP+ (Finisar FTLX8571D3BCL) is used with no active=20= >> link partner on the other end of the link (or fiber completely=20 >> disconnected from the SFP+), i40e_aq_get_phy_capabilities() (called = by=20 >> i40e_dev_sync_phy_type() on port initialization), fails with a >> 0x05 return value (EIO) on the AQ response structure. The struct=20 >> i40e_aq_get_phy_abilities_resp buffer passed to the Get Phy Abilities=20= >> command is unmodified upon return. >>=20 >> This prevents DPDK 16.11 from initializing the port, and ultimately=20= >> fails with the following error: >>=20 >> PMD: eth_i40e_dev_init(): Failed to sync phy type: -95 >>=20 >> The change introducing this issue was >> http://dpdk.org/ml/archives/dev/2016-September/047663.html >>=20 >> Reading the X710 datasheet, I notice that no specific mention is = given=20 >> on the meaning of EIO as a response to Get PHY Abilities command=20 >> (opcode 0x0600), whereas in most other commands, an explicit mention=20= >> of the meaning of the possible error status responses is given. >>=20 >> This behaviour is the same across the following NVM releases:=20 >>=20 >> FW 4.33 API 1.2 NVM 04.04.02 eetrack 800018a6 FW 4.40 API 1.4 NVM=20 >> 04.05.03 eetrack 80001cd8 FW 5.0 API 1.5 NVM 05.00.04 eetrack = 800024da >>=20 >> I will try to get around the issue by falling back to PHY = capabilities=20 >> detection using the device ID in the case >> i40e_aq_get_phy_capabilities() fails, but conceptually the=20 >> capabilities of the PHY should not be dependent on whether PHY = detects=20 >> an active link or not. >>=20 >> I=E2=80=99d be happy to do more testing on this issue per your=20 >> recommendations. >>=20 >> Moreover, while trying to debug this issue, I managed to get both 3=20= >> NIC adapters on my test system on a state where the PHY has = apparently=20 >> died - no link indication at all on any ports. A reboot solved this,=20= >> and I am now trying to replicate this behaviour under more controlled=20= >> conditions. >>=20 >=20 > I'm currently running into a similar issue (I think). I can reproduce = it with testpmd with the following case: >=20 > set link_check off > port stop 0 > # don't wait between these 2 commands > port start 0 >=20 > I added some logs that are displayed after the port start: >=20 > PMD: i40e_set_tx_function(): Vector tx finally be used. > PMD: i40e_set_rx_function(): Vector rx enabled, please make sure RX > burst size no less than 4 (port=3D0). > PMD: i40e_dev_rx_queue_start(): >> > PMD: i40e_dev_tx_queue_start(): >> > PMD: i40e_dev_start(): applying link settings... > PMD: i40e_apply_link_speed(): abilities =3D 38, speed =3D 0 > PMD: i40e_phy_conf_link(): i40e_aq_get_phy_capabilities failed -7 > PMD: i40e_dev_start(): Fail to apply link setting > PMD: i40e_dev_clear_queues(): >> >=20 > The -7 corresponds to I40E_ERR_UNKNOWN_PHY. This happens in > i40e_aq_get_phy_capabilities() in the following code, which makes me = think it's the same problem than yours: >=20 > if (hw->aq.asq_last_status =3D=3D I40E_AQ_RC_EIO) > status =3D I40E_ERR_UNKNOWN_PHY; >=20 > A workaround in my usecase is to wait a bit between the stop and the = start. >=20 > Any help is welcome. >=20 > Regards, > Olivier >=20 >=20