From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id E38D64F94; Mon, 5 Nov 2018 19:08:32 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id d10-v6so10569145wrs.5; Mon, 05 Nov 2018 10:08:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:content-transfer-encoding:mime-version; bh=YVAotSYOqM3qQAjBOfJudpaCK7gBmMgM8oTJoPUxuic=; b=T9u1bVkfz5ATu0towcz04q86dJA/W3xErDaIwwlO7jO6mYuPD3jFk6rtHs6/yojL4S jrMrZkMaqI2Y3uUeptQ6iMoxMQqCwJ/IaGnjkE65xbl6T4Y4XnjiEcytfeJg6iCsJb5n FFWr6kO3HQuLIdVvmULPnOq6f1guXwW7emvJj9lIcPgMz0dBRgNByE1u7X0pwOF1XQB0 8Ek0SI10KfhfIW0PKrDvakgwnZjoPKb/73/VpHnrlRQxtCrO67NJPxUTCqos/M3WgPlB Ikk5c8RKdiwpNywWevwVYB2XNPex4RIYdaLVfuEKbr3Ei2ay7ngAiEgMMvr7Aro4b/a/ +XfA== X-Gm-Message-State: AGRZ1gIwbtEWxyJ3saeCYmARjqB9w6d/zB/nMLPbAogGE6PnFOdPm5mm /gP43I5VOsCbEELytQz08/a2f1oR X-Google-Smtp-Source: AJdET5fAqX7+qh+7qYMBpVbvgOlY+lhmWfg+W3UUqLr41A8Ac8AJoFXGNPDQ3gNkef3wvv3CyacEdg== X-Received: by 2002:adf:e206:: with SMTP id j6-v6mr20303547wri.205.1541441312297; Mon, 05 Nov 2018 10:08:32 -0800 (PST) Received: from localhost ([2a01:4b00:f419:6f00:8361:8946:ba2b:d556]) by smtp.gmail.com with ESMTPSA id l140-v6sm65875607wmb.24.2018.11.05.10.08.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 05 Nov 2018 10:08:30 -0800 (PST) Message-ID: <1541441309.9009.13.camel@debian.org> From: Luca Boccassi To: "Zhang, Qi Z" , "dev@dpdk.org" Cc: "Lu, Wenzhuo" , "Ananyev, Konstantin" , "3chas3@gmail.com" <3chas3@gmail.com>, "stable@dpdk.org" Date: Mon, 05 Nov 2018 18:08:29 +0000 In-Reply-To: <039ED4275CED7440929022BC67E70611532DF9A9@SHSMSX103.ccr.corp.intel.com> References: <20180815170932.23536-1-bluca@debian.org> <20181102151848.18024-1-bluca@debian.org> <039ED4275CED7440929022BC67E70611532DF9A9@SHSMSX103.ccr.corp.intel.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Evolution 3.22.6-1+deb9u1 Mime-Version: 1.0 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH v3 1/2] net/ixgbe: fix x550 code to handle unidentified PHY 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: Mon, 05 Nov 2018 18:08:33 -0000 On Mon, 2018-11-05 at 17:41 +0000, Zhang, Qi Z wrote: > > -----Original Message----- > > From: Luca Boccassi [mailto:bluca@debian.org] > > Sent: Friday, November 2, 2018 8:19 AM > > To: dev@dpdk.org > > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > > ; Zhang, Qi Z ; > > 3chas3@gmail.com; Luca Boccassi ; stable@dpdk.org > > Subject: [PATCH v3 1/2] net/ixgbe: fix x550 code to handle > > unidentified PHY > >=20 > > ixgbe_identify_sfp_module_X550em() was missing the code to handle > > unidentified PHY that has been there in 82599 so it was not able to > > complete > > initialization of ixgbe sequence if no sfp plugged in. > > Port it over to return an appropriate type and complete init > > sequence > > properly. > >=20 > > Fixes: d2e72774e58c ("ixgbe/base: support X550") > > Cc: stable@dpdk.org > >=20 > > Signed-off-by: Luca Boccassi > > --- > > v2: refresh to remove merge conflict with master > > v3: coalesce fix into ixgbe_identify_sfp_module_X550em to avoid > > =C2=A0=C2=A0=C2=A0=C2=A0code duplication, improve comment > >=20 > > =C2=A0drivers/net/ixgbe/base/ixgbe_x550.c | 6 ++++++ > > =C2=A01 file changed, 6 insertions(+) > >=20 > > diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c > > b/drivers/net/ixgbe/base/ixgbe_x550.c > > index f7b98af52..a88d5c86a 100644 > > --- a/drivers/net/ixgbe/base/ixgbe_x550.c > > +++ b/drivers/net/ixgbe/base/ixgbe_x550.c > > @@ -1561,6 +1561,12 @@ s32 ixgbe_identify_sfp_module_X550em(struct > > ixgbe_hw *hw) > >=20 > > =C2=A0 status =3D ixgbe_identify_module_generic(hw); > >=20 > > + /* Set PHY type none if no PHY detected to allow init > > without SFP */ > > + if (hw->phy.type =3D=3D ixgbe_phy_unknown) { > > + hw->phy.type =3D ixgbe_phy_none; >=20 > Set PHY type to none for a device that does have PHY looks weird.=C2=A0= =C2=A0 > does ixgeb_phy_generic works here? >=20 > Where is failure you met with ixgbe_phy_unknown? Yes it is a bit weird, but it works :-) The issue is that the PMD fails to initialise when there is no SFP plugged, and then it will always stay in that failed state when an SFP is later plugged in, and it won't work until the machine is rebooted with the SFP plugged in. The logs (with an older DPDK version): PMD: eth_ixgbe_dev_init(): Hardware Initialization Failure: -20 EAL: Requested device 0000:04:00.0 cannot be used The kernel driver didn't like it either: [=C2=A0=C2=A0=C2=A0=C2=A07.579782] ixgbe 0000:04:00.0: Multiqueue Enabled: = Rx Queue count =3D 8, Tx Queue count =3D 8 [=C2=A0=C2=A0=C2=A0=C2=A07.649766] ixgbe 0000:04:00.0: MAC: 5, PHY: 0, PBA = No: 020A00-000 [=C2=A0=C2=A0=C2=A0=C2=A07.649774] ixgbe 0000:04:00.0: 00:25:90:5e:05:20 [=C2=A0=C2=A0=C2=A0=C2=A08.763790] ixgbe 0000:04:00.0 0000:04:00.0 (uniniti= alized): CS4227 reset did not complete [=C2=A0=C2=A0=C2=A0=C2=A08.772051] ixgbe 0000:04:00.0 0000:04:00.0 (uniniti= alized): CS4227 reset failed: -3 [=C2=A0=C2=A0=C2=A0=C2=A09.059374] ixgbe 0000:04:00.0: Intel(R) 10 Gigabit = Network Connection But with the kernel driver, if an SFP is plugged in later then the interface works correctly. With this series, an SFP can be plugged in after booting and initialising the DPDK application. --=20 Kind regards, Luca Boccassi