From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by dpdk.org (Postfix) with ESMTP id 8C1492C52; Tue, 20 Nov 2018 12:28:44 +0100 (CET) Received: by mail-wr1-f67.google.com with SMTP id b13so1573576wrx.6; Tue, 20 Nov 2018 03:28:44 -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=I+Iw8y0iDEgNgjLrogWTRb385apfYogn8q4NuOjrsTk=; b=sMneF41ThHYfF+V4yKsqAzSTTNrPxl40j+slHC49Qy925Vc96g2+s37F78fiZvx9f+ MS6TnUkVdnD6PZEAg4UaTrCnvaBku7zLVUxzd+AWCe/bCEV9ONp8XSQZBEX8ggQfyc8S hw1wsze7SGyzmeqqiES7rgvdmaYB34UW3B7ZN1CnrjiB0a1JzXBHSo0fXnppBDb2byR+ 7r1bnMXpxuujTCSVy8YOUdVk+W+y7b0fFK1+Thfru5bdpNWS1GGhKz441kgOQmzLtpCl 0Zq4+Q6inckA0fKVGWKLD4qDZjpfHCXJm8I24BzmcCTYGTrYizDTw8vmU+Ib5kC2n6ev FirA== X-Gm-Message-State: AA+aEWZSdypDAI8J9DVAApephnFWV6JsoJm7CPZsuyn44WmXST3Im4OX KXo6OPwopnRiQ8YNoXoTZLPRVg2m968= X-Google-Smtp-Source: AFSGD/UfezNe9JIaWH8sNHiH/NtBhfD+3W5CN38P+rXvntLBxkP2nPL8ChBnAsEe7AE4Mg2Ietqh+g== X-Received: by 2002:adf:ee89:: with SMTP id b9mr1687725wro.246.1542713324091; Tue, 20 Nov 2018 03:28:44 -0800 (PST) Received: from localhost ([2001:1be0:110d:fcff:f19f:e27c:a323:8ad8]) by smtp.gmail.com with ESMTPSA id a4-v6sm36012676wrr.71.2018.11.20.03.28.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Nov 2018 03:28:43 -0800 (PST) Message-ID: <1542713322.27998.6.camel@debian.org> From: Luca Boccassi To: "Zhang, Qi Z" , Chas Williams <3chas3@gmail.com>, "dev@dpdk.org" Cc: "Lu, Wenzhuo" , "Ananyev, Konstantin" , "stable@dpdk.org" Date: Tue, 20 Nov 2018 11:28:42 +0000 In-Reply-To: <1541769501.31208.39.camel@debian.org> References: <20180815170932.23536-1-bluca@debian.org> <20181102151848.18024-1-bluca@debian.org> <039ED4275CED7440929022BC67E70611532DF9A9@SHSMSX103.ccr.corp.intel.com> <494f9ba9-cadc-aa36-2b17-42890dbe5c74@gmail.com> <039ED4275CED7440929022BC67E70611532E07D1@SHSMSX103.ccr.corp.intel.com> <1541595308.31208.0.camel@debian.org> <039ED4275CED7440929022BC67E70611532E0FC0@SHSMSX103.ccr.corp.intel.com> <1541769501.31208.39.camel@debian.org> 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: Tue, 20 Nov 2018 11:28:44 -0000 On Fri, 2018-11-09 at 13:18 +0000, Luca Boccassi wrote: > On Wed, 2018-11-07 at 18:27 +0000, Zhang, Qi Z wrote: > > > -----Original Message----- > > > From: Luca Boccassi [mailto:bluca@debian.org] > > > Sent: Wednesday, November 7, 2018 5:55 AM > > > To: Zhang, Qi Z ; Chas Williams <3chas3@gma > > > il > > > .com>; > > > dev@dpdk.org > > > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > > > ; stable@dpdk.org > > > Subject: Re: [PATCH v3 1/2] net/ixgbe: fix x550 code to handle > > > unidentified > > > PHY > > >=20 > > > On Tue, 2018-11-06 at 23:31 +0000, Zhang, Qi Z wrote: > > > > > -----Original Message----- > > > > > From: Chas Williams [mailto:3chas3@gmail.com] > > > > > Sent: Monday, November 5, 2018 11:19 AM > > > > > To: Zhang, Qi Z ; Luca Boccassi > > > > de > > > > > bian > > > > > .org>; dev@dpdk.org > > > > > Cc: Lu, Wenzhuo ; Ananyev, Konstantin > > > > > ; stable@dpdk.org > > > > > Subject: Re: [PATCH v3 1/2] net/ixgbe: fix x550 code to > > > > > handle > > > > > unidentified PHY > > > > >=20 > > > > >=20 > > > > >=20 > > > > > On 11/05/2018 12:41 PM, Zhang, Qi Z wrote: > > > > > >=20 > > > > > >=20 > > > > > > > -----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 > > > > > > nt > > > > > > > el.c > > > > > > > om>; > > > > > > > 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=A0=C2=A0code duplication, improve comme= nt > > > > > > >=20 > > > > > > > =C2=A0 drivers/net/ixgbe/base/ixgbe_x550.c | 6 ++++++ > > > > > > > =C2=A0 1 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 > > > > >=20 > > > > > ixgbe_identify_sfp_module_X550em(struct > > > > > > > ixgbe_hw *hw) > > > > > > >=20 > > > > > > > =C2=A0=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. > > > > > > does ixgeb_phy_generic works here? > > > > >=20 > > > > > Yes, it does seem strange but that's what > > > > > ixgbe_identify_sfp_module_generic > > > > > seems to do: > > > > >=20 > > > > > err_read_i2c_eeprom: > > > > > hw->phy.sfp_type =3D ixgbe_sfp_type_not_present; > > > > > if (hw->phy.type !=3D ixgbe_phy_nl) { > > > > > hw->phy.id =3D 0; > > > > > hw->phy.type =3D ixgbe_phy_unknown; > > > > > } > > > > >=20 > > > > > The QSFP version a little more forceful: > > > > >=20 > > > > > err_read_i2c_eeprom: > > > > > hw->phy.sfp_type =3D ixgbe_sfp_type_not_present; > > > > > hw->phy.id =3D 0; > > > > > hw->phy.type =3D ixgbe_phy_unknown; > > > > >=20 > > > > > If we go forward without setting the phy_type to none, we > > > > > will > > > > > eventually run > > > > > into issues calling other phy routines. > > > > >=20 > > > > > So should a lack of SFP, reset the PHY type? It's hazy > > > > > because > > > > > the > > > > > difference > > > > > between PHY and SFP isn't that clear to me here. > > > >=20 > > > > I'm not sure that's the same case:). > > > > Just feel that it's better to handle ixgbe_phy_unknown directly > > > > for > > > > some device id as a special case than just replace it to > > > > ixgbe_phy_none to cheat the check path, since that rely on we > > > > never > > > > change the way to handle ixgbe_phy_none. > > > >=20 > > > > So still have the question? > > > > What is the failure if you go with ixgbe_phy_unknown? > > > > Is that possible to work around this like > > > > if (phy_type =3D=3D ixgbe_phy_unknown && dev_id =3D=3D xxxx) > > > > ... > > >=20 > > > Hi, > > >=20 > > > Thanks for having a look at this again. If you could please see > > > the > > > other answer, from myself, I've quoted the exact error we see and > > > the > > > issue it causes. > >=20 > > Yes, I see it failed at eth_ixgbe_dev_init, it will be better if > > you > > can provide more detail for the call stack, so we can figure out if > > we can work around this by handle ixgbe_phy_unknown directly with > > some special case. >=20 > Hi, >=20 > The original problem was found and fixed internally a while ago, so > it's taking some time to get hold of the same hardware again. I hope > to > get back with more details next week, sorry for the delay. Hi, I had the chance to rebase the application on 18.11 and test again, and it seems like the first patch is no longer necessary. Which is good! Unfortunately I don't have time to bisect and find exactly when it was fixed. I have sent a v4 dropping the first patch. --=20 Kind regards, Luca Boccassi