From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f44.google.com (mail-wm0-f44.google.com [74.125.82.44]) by dpdk.org (Postfix) with ESMTP id 26DCC1094 for ; Tue, 10 Jan 2017 16:28:57 +0100 (CET) Received: by mail-wm0-f44.google.com with SMTP id k184so165659850wme.1 for ; Tue, 10 Jan 2017 07:28:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:date:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZoboKOCD/laNJs4QcSsZS6h5roC8W4fXltv3cvR+fe8=; b=Il3JntlRVv8L8Dggq0YOD7aBtMMS4KLm/qf4s6pGOMfqHipumhm3qpkW7buW6S/KQm l6kAeZXXoECaaWioZYFtIL/F00+Lo7KtJYrq6wEdjWxJ7bJAEwX9+WWUhrQHmk9Q3zMf y8HQflYd6EZC15otTqa6WWb/WRi3qJ3eHYCF0JfxGxhFew1RIDajkEPYekdnMMK6bA7h ufCDqFps1CuypYmuAX6hYyoMLEUXaiBw6QR3+pUspTSj/S0vIcCq8lgBznxGO4O9wl9s DAKuXgj4923JrNm5UVfIOXaxQBBaHSUVQilcDO71bmmPHDIm3kHhw0BkFawqcA+ha0Jg uWwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:date:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZoboKOCD/laNJs4QcSsZS6h5roC8W4fXltv3cvR+fe8=; b=CpMwDtamtBkbwZReaCEO9t9H7jtbO29XQDYNHS2Gt43V4nNkNEZTntudiM1BoPy+YN fcBgo7XLshkIq1OVHzOijamEw0y8/Yk8NMk0ynNXh3HSxbiwTc/vt8IeiVGcaHMTzjWo 71VK3dvqMj6GVh0mQRh6fq/ZUA9w9A+9wTvBouRfZke7JLshaFZvTLylPThMCBwL6DNs cv3cpzZuAreFcfux4UxMcjsLI1eCBk/KONeT0GdYZPEgsNMYTPq9hhNAApYQIYYBk/Un vWDo42CgzhiX1GT9oxe4wC2IW5ZyIxAUSMUL2hpfE3zSkervelzAxZ+JqQqZ78wkS91L 4ImA== X-Gm-Message-State: AIkVDXLfMgJ902w0SSy45tPniSX5AroGaSQ3DITs3kL79ijZE95Secc+QrQK0u6JQZXzk2za X-Received: by 10.28.35.142 with SMTP id j136mr278448wmj.11.1484062136822; Tue, 10 Jan 2017 07:28:56 -0800 (PST) Received: from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net. [82.239.227.177]) by smtp.gmail.com with ESMTPSA id bc2sm3782653wjb.38.2017.01.10.07.28.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 10 Jan 2017 07:28:56 -0800 (PST) From: Olivier MATZ X-Google-Original-From: Olivier MATZ Date: Tue, 10 Jan 2017 16:28:49 +0100 To: Christos Ricudis Cc: dev@dpdk.org, helin.zhang@intel.com, jingjing.wu@intel.com Message-ID: <20170110162849.2256dc6e@glumotte.dev.6wind.com> In-Reply-To: <2BF7FCC7-B2DF-43EE-B5F8-2F3271FB3DA1@gmail.com> References: <2BF7FCC7-B2DF-43EE-B5F8-2F3271FB3DA1@gmail.com> X-Mailer: Claws Mail 3.14.1 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: Tue, 10 Jan 2017 15:28:57 -0000 Hi Christos, +CC i40e maintainers On Tue, 10 Jan 2017 20:32:26 +0800, Christos Ricudis wrote: > Hello,=20 >=20 > Using a X710 based 4-port 4x10Gbit NIC, I have came across the > following issue on the i40e PMD:=20 >=20 > When an optical SFP+ (Finisar FTLX8571D3BCL) is used with no active > link partner on the other end of the link (or fiber completely > disconnected from the SFP+), i40e_aq_get_phy_capabilities() (called > by i40e_dev_sync_phy_type() on port initialization), fails with a > 0x05 return value (EIO) on the AQ response structure. The struct > i40e_aq_get_phy_abilities_resp buffer passed to the Get Phy Abilities > command is unmodified upon return.=20 >=20 > This prevents DPDK 16.11 from initializing the port, and ultimately > fails with the following error:=20 >=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 on the meaning of EIO as a response to Get PHY Abilities > command (opcode 0x0600), whereas in most other commands, an explicit > mention of the meaning of the possible error status responses is > given.=20 >=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 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 detection using the device ID in the case > i40e_aq_get_phy_capabilities() fails, but conceptually the > capabilities of the PHY should not be dependent on whether PHY > detects an active link or not.=20 >=20 > I=E2=80=99d be happy to do more testing on this issue per your > recommendations.=20 >=20 > Moreover, while trying to debug this issue, I managed to get both 3 > NIC adapters on my test system on a state where the PHY has > apparently died - no link indication at all on any ports. A reboot > solved this, and I am now trying to replicate this behaviour under > more controlled conditions.=20 >=20 I'm currently running into a similar issue (I think). I can reproduce it with testpmd with the following case: set link_check off port stop 0 # don't wait between these 2 commands port start 0 I added some logs that are displayed after the port start: 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(): >> 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: if (hw->aq.asq_last_status =3D=3D I40E_AQ_RC_EIO) status =3D I40E_ERR_UNKNOWN_PHY; A workaround in my usecase is to wait a bit between the stop and the start. Any help is welcome. Regards, Olivier