* [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB
@ 2018-08-01 4:07 Chas Williams
2018-08-01 13:59 ` Zhang, Qi Z
2018-08-06 20:05 ` [dpdk-dev] [PATCH v2] " Chas Williams
0 siblings, 2 replies; 9+ messages in thread
From: Chas Williams @ 2018-08-01 4:07 UTC (permalink / raw)
To: dev; +Cc: beilei.xing, qi.z.zhang, Charles (Chas) Williams
From: "Charles (Chas) Williams" <chas3@att.com>
>From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
Update:
Starting from NVM 5.02, if the Set Local LLDP MIB command is
received while the DCBx specific agent is stopped, the command
returns an EPERM error. If the command is received while the
LLDP agent is stopped, it sets the local MIB without exchanging
LLDP with peer, and returns SUCCESS.
This results in the harmless, but annoying, diagnostic:
default dcb config fails. err = -53, aq_err = 1.
So, always stop the lldp daemon when we are in software mode before
we attempt to call i40e_set_dcb_config.
Signed-off-by: Chas Williams <chas3@att.com>
---
drivers/net/i40e/i40e_ethdev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a340540ef..03bedf5c1 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11237,6 +11237,7 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)
* i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
* adminq status. Otherwise, it should return success.
*/
+ i40e_aq_stop_lldp(hw, TRUE, NULL);
if ((ret == I40E_SUCCESS) || (ret != I40E_SUCCESS &&
hw->aq.asq_last_status == I40E_AQ_RC_EPERM)) {
memset(&hw->local_dcbx_config, 0,
--
2.14.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB
2018-08-01 4:07 [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB Chas Williams
@ 2018-08-01 13:59 ` Zhang, Qi Z
2018-08-01 15:31 ` Chas Williams
2018-08-06 20:05 ` [dpdk-dev] [PATCH v2] " Chas Williams
1 sibling, 1 reply; 9+ messages in thread
From: Zhang, Qi Z @ 2018-08-01 13:59 UTC (permalink / raw)
To: Chas Williams, dev; +Cc: Xing, Beilei, Charles (Chas) Williams
Hi Williams:
> -----Original Message-----
> From: Chas Williams [mailto:3chas3@gmail.com]
> Sent: Wednesday, August 1, 2018 12:07 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> Charles (Chas) Williams <chas3@att.com>
> Subject: [PATCH] net/i40e: stop lldp before setting local lldp MIB
>
> From: "Charles (Chas) Williams" <chas3@att.com>
>
> From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
> Update:
>
> Starting from NVM 5.02, if the Set Local LLDP MIB command is
> received while the DCBx specific agent is stopped, the command
> returns an EPERM error. If the command is received while the
> LLDP agent is stopped, it sets the local MIB without exchanging
> LLDP with peer, and returns SUCCESS.
>
> This results in the harmless, but annoying, diagnostic:
>
> default dcb config fails. err = -53, aq_err = 1.
>
> So, always stop the lldp daemon when we are in software mode before we
> attempt to call i40e_set_dcb_config.
>
> Signed-off-by: Chas Williams <chas3@att.com>
> ---
> drivers/net/i40e/i40e_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index a340540ef..03bedf5c1 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -11237,6 +11237,7 @@ i40e_dcb_init_configure(struct rte_eth_dev
> *dev, bool sw_dcb)
> * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
> * adminq status. Otherwise, it should return success.
> */
> + i40e_aq_stop_lldp(hw, TRUE, NULL);
I40e_aq_stop_lldp is intended to be removed with below two patches.
commit c6431c891d9e9691e3205fe5c5350071cbaeb852
commit fcbd40d4327b36725c4de9f33f57809edc359f4a
Regards.
Qi
> if ((ret == I40E_SUCCESS) || (ret != I40E_SUCCESS &&
> hw->aq.asq_last_status == I40E_AQ_RC_EPERM)) {
> memset(&hw->local_dcbx_config, 0,
> --
> 2.14.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB
2018-08-01 13:59 ` Zhang, Qi Z
@ 2018-08-01 15:31 ` Chas Williams
2018-08-02 2:16 ` Zhang, Qi Z
0 siblings, 1 reply; 9+ messages in thread
From: Chas Williams @ 2018-08-01 15:31 UTC (permalink / raw)
To: Zhang, Qi Z; +Cc: dev, beilei.xing, Chas Williams
On Wed, Aug 1, 2018 at 10:00 AM Zhang, Qi Z <qi.z.zhang@intel.com> wrote:
> Hi Williams:
>
> > -----Original Message-----
> > From: Chas Williams [mailto:3chas3@gmail.com]
> > Sent: Wednesday, August 1, 2018 12:07 PM
> > To: dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <
> qi.z.zhang@intel.com>;
> > Charles (Chas) Williams <chas3@att.com>
> > Subject: [PATCH] net/i40e: stop lldp before setting local lldp MIB
> >
> > From: "Charles (Chas) Williams" <chas3@att.com>
> >
> > From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
> > Update:
> >
> > Starting from NVM 5.02, if the Set Local LLDP MIB command is
> > received while the DCBx specific agent is stopped, the command
> > returns an EPERM error. If the command is received while the
> > LLDP agent is stopped, it sets the local MIB without exchanging
> > LLDP with peer, and returns SUCCESS.
> >
> > This results in the harmless, but annoying, diagnostic:
> >
> > default dcb config fails. err = -53, aq_err = 1.
> >
> > So, always stop the lldp daemon when we are in software mode before we
> > attempt to call i40e_set_dcb_config.
> >
> > Signed-off-by: Chas Williams <chas3@att.com>
> > ---
> > drivers/net/i40e/i40e_ethdev.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> b/drivers/net/i40e/i40e_ethdev.c
> > index a340540ef..03bedf5c1 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -11237,6 +11237,7 @@ i40e_dcb_init_configure(struct rte_eth_dev
> > *dev, bool sw_dcb)
> > * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
> > * adminq status. Otherwise, it should return success.
> > */
> > + i40e_aq_stop_lldp(hw, TRUE, NULL);
>
> I40e_aq_stop_lldp is intended to be removed with below two patches.
>
> commit c6431c891d9e9691e3205fe5c5350071cbaeb852
> commit fcbd40d4327b36725c4de9f33f57809edc359f4a
>
Yeah about that. The i40e driver seems to go out of its way to program the
flow
control outside of LLDP see i40e_update_flow_control()
and i40e_flow_ctrl_set().
So it's not clear to me what is going on here with DPDK and LLDP. Do you
really
want LLDP running in this mode? The other branch
in i40e_dcb_init_configure()
explicitly starts LLDP, so I assume at some point, LLDP wasn't/isn't
running. How did
it get this way? With respect to item #70, shouldn't you therefore always
start
LLDP to workaround the bug?
Item#70 is fixed in later NVM's (6.01 or later). Perhaps a check to see if
the NVM
is new enough to safely allow LLDP stopping?
>
> Regards.
> Qi
>
>
> > if ((ret == I40E_SUCCESS) || (ret != I40E_SUCCESS &&
> > hw->aq.asq_last_status == I40E_AQ_RC_EPERM)) {
> > memset(&hw->local_dcbx_config, 0,
> > --
> > 2.14.4
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB
2018-08-01 15:31 ` Chas Williams
@ 2018-08-02 2:16 ` Zhang, Qi Z
2018-08-02 21:19 ` Chas Williams
0 siblings, 1 reply; 9+ messages in thread
From: Zhang, Qi Z @ 2018-08-02 2:16 UTC (permalink / raw)
To: Chas Williams; +Cc: dev, Xing, Beilei, Chas Williams
From: Chas Williams [mailto:3chas3@gmail.com]
Sent: Wednesday, August 1, 2018 11:31 PM
To: Zhang, Qi Z <qi.z.zhang@intel.com>
Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Chas Williams <chas3@att.com>
Subject: Re: [PATCH] net/i40e: stop lldp before setting local lldp MIB
On Wed, Aug 1, 2018 at 10:00 AM Zhang, Qi Z <qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com>> wrote:
Hi Williams:
> -----Original Message-----
> From: Chas Williams [mailto:3chas3@gmail.com<mailto:3chas3@gmail.com>]
> Sent: Wednesday, August 1, 2018 12:07 PM
> To: dev@dpdk.org<mailto:dev@dpdk.org>
> Cc: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; Zhang, Qi Z <qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com>>;
> Charles (Chas) Williams <chas3@att.com<mailto:chas3@att.com>>
> Subject: [PATCH] net/i40e: stop lldp before setting local lldp MIB
>
> From: "Charles (Chas) Williams" <chas3@att.com<mailto:chas3@att.com>>
>
> From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
> Update:
>
> Starting from NVM 5.02, if the Set Local LLDP MIB command is
> received while the DCBx specific agent is stopped, the command
> returns an EPERM error. If the command is received while the
> LLDP agent is stopped, it sets the local MIB without exchanging
> LLDP with peer, and returns SUCCESS.
>
> This results in the harmless, but annoying, diagnostic:
>
> default dcb config fails. err = -53, aq_err = 1.
>
> So, always stop the lldp daemon when we are in software mode before we
> attempt to call i40e_set_dcb_config.
>
> Signed-off-by: Chas Williams <chas3@att.com<mailto:chas3@att.com>>
> ---
> drivers/net/i40e/i40e_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index a340540ef..03bedf5c1 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -11237,6 +11237,7 @@ i40e_dcb_init_configure(struct rte_eth_dev
> *dev, bool sw_dcb)
> * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
> * adminq status. Otherwise, it should return success.
> */
> + i40e_aq_stop_lldp(hw, TRUE, NULL);
I40e_aq_stop_lldp is intended to be removed with below two patches.
commit c6431c891d9e9691e3205fe5c5350071cbaeb852
commit fcbd40d4327b36725c4de9f33f57809edc359f4a
Yeah about that. The i40e driver seems to go out of its way to program the flow
control outside of LLDP see i40e_update_flow_control() and i40e_flow_ctrl_set().
So it's not clear to me what is going on here with DPDK and LLDP. Do you really
want LLDP running in this mode? The other branch in i40e_dcb_init_configure()
explicitly starts LLDP, so I assume at some point, LLDP wasn't/isn't running. How did
it get this way? With respect to item #70, shouldn't you therefore always start
LLDP to workaround the bug?
LLDP is enabled by firmware as default, from my view it is not necessary to start LLDP, if We never stop it, and maybe we should not allow the case sw_dcb = TRUE since we can’t stop LLDP.
Item#70 is fixed in later NVM's (6.01 or later). Perhaps a check to see if the NVM
is new enough to safely allow LLDP stopping?
Yes, I agree, would you mind to add a firmware check for lldp_start and lldp_stop in v2? So that fix your concern in the case with a new firmware
For old firmware case, let’s just keep exist way , there should be some re-work in future, and more test and review is required.
Thanks
Qi
Regards.
Qi
> if ((ret == I40E_SUCCESS) || (ret != I40E_SUCCESS &&
> hw->aq.asq_last_status == I40E_AQ_RC_EPERM)) {
> memset(&hw->local_dcbx_config, 0,
> --
> 2.14.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB
2018-08-02 2:16 ` Zhang, Qi Z
@ 2018-08-02 21:19 ` Chas Williams
2018-08-03 2:10 ` Zhang, Qi Z
0 siblings, 1 reply; 9+ messages in thread
From: Chas Williams @ 2018-08-02 21:19 UTC (permalink / raw)
To: Zhang, Qi Z; +Cc: dev, beilei.xing, Chas Williams
On Wed, Aug 1, 2018 at 10:16 PM Zhang, Qi Z <qi.z.zhang@intel.com> wrote:
>
>
>
>
> *From:* Chas Williams [mailto:3chas3@gmail.com]
> *Sent:* Wednesday, August 1, 2018 11:31 PM
> *To:* Zhang, Qi Z <qi.z.zhang@intel.com>
> *Cc:* dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Chas Williams <
> chas3@att.com>
> *Subject:* Re: [PATCH] net/i40e: stop lldp before setting local lldp MIB
>
>
>
>
>
> On Wed, Aug 1, 2018 at 10:00 AM Zhang, Qi Z <qi.z.zhang@intel.com> wrote:
>
> Hi Williams:
>
> > -----Original Message-----
> > From: Chas Williams [mailto:3chas3@gmail.com]
> > Sent: Wednesday, August 1, 2018 12:07 PM
> > To: dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <
> qi.z.zhang@intel.com>;
> > Charles (Chas) Williams <chas3@att.com>
> > Subject: [PATCH] net/i40e: stop lldp before setting local lldp MIB
> >
> > From: "Charles (Chas) Williams" <chas3@att.com>
> >
> > From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
> > Update:
> >
> > Starting from NVM 5.02, if the Set Local LLDP MIB command is
> > received while the DCBx specific agent is stopped, the command
> > returns an EPERM error. If the command is received while the
> > LLDP agent is stopped, it sets the local MIB without exchanging
> > LLDP with peer, and returns SUCCESS.
> >
> > This results in the harmless, but annoying, diagnostic:
> >
> > default dcb config fails. err = -53, aq_err = 1.
> >
> > So, always stop the lldp daemon when we are in software mode before we
> > attempt to call i40e_set_dcb_config.
> >
> > Signed-off-by: Chas Williams <chas3@att.com>
> > ---
> > drivers/net/i40e/i40e_ethdev.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> b/drivers/net/i40e/i40e_ethdev.c
> > index a340540ef..03bedf5c1 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -11237,6 +11237,7 @@ i40e_dcb_init_configure(struct rte_eth_dev
> > *dev, bool sw_dcb)
> > * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
> > * adminq status. Otherwise, it should return success.
> > */
> > + i40e_aq_stop_lldp(hw, TRUE, NULL);
>
> I40e_aq_stop_lldp is intended to be removed with below two patches.
>
> commit c6431c891d9e9691e3205fe5c5350071cbaeb852
> commit fcbd40d4327b36725c4de9f33f57809edc359f4a
>
>
>
> Yeah about that. The i40e driver seems to go out of its way to program
> the flow
>
> control outside of LLDP see i40e_update_flow_control()
> and i40e_flow_ctrl_set().
>
> So it's not clear to me what is going on here with DPDK and LLDP. Do you
> really
>
> want LLDP running in this mode? The other branch
> in i40e_dcb_init_configure()
>
> explicitly starts LLDP, so I assume at some point, LLDP wasn't/isn't
> running. How did
>
> it get this way? With respect to item #70, shouldn't you therefore always
> start
>
> LLDP to workaround the bug?
>
>
>
>
>
> LLDP is enabled by firmware as default, from my view it is not necessary
> to start LLDP, if We never stop it, and maybe we should not allow the case
> sw_dcb = TRUE since we can’t stop LLDP.
>
>
>
> Item#70 is fixed in later NVM's (6.01 or later). Perhaps a check to see
> if the NVM
>
> is new enough to safely allow LLDP stopping?
>
>
>
> Yes, I agree, would you mind to add a firmware check for lldp_start and
> lldp_stop in v2? So that fix your concern in the case with a new firmware
>
> For old firmware case, let’s just keep exist way , there should be some
> re-work in future, and more test and review is required.
>
Yes, I can probably manage to add a firmware check. I will need a little
bit to test it.
One other question. What's up with i40e_update_flow_control()? Should
this be called whenever the link state changes? Right now it only seems to
be called when the device is started/initialized.
>
>
> Thanks
>
> Qi
>
>
>
>
>
>
> Regards.
> Qi
>
>
> > if ((ret == I40E_SUCCESS) || (ret != I40E_SUCCESS &&
> > hw->aq.asq_last_status == I40E_AQ_RC_EPERM)) {
> > memset(&hw->local_dcbx_config, 0,
> > --
> > 2.14.4
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB
2018-08-02 21:19 ` Chas Williams
@ 2018-08-03 2:10 ` Zhang, Qi Z
2018-08-06 19:03 ` Chas Williams
0 siblings, 1 reply; 9+ messages in thread
From: Zhang, Qi Z @ 2018-08-03 2:10 UTC (permalink / raw)
To: Chas Williams; +Cc: dev, Xing, Beilei, Chas Williams
From: Chas Williams [mailto:3chas3@gmail.com]
Sent: Friday, August 3, 2018 5:20 AM
To: Zhang, Qi Z <qi.z.zhang@intel.com>
Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Chas Williams <chas3@att.com>
Subject: Re: [PATCH] net/i40e: stop lldp before setting local lldp MIB
On Wed, Aug 1, 2018 at 10:16 PM Zhang, Qi Z <qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com>> wrote:
From: Chas Williams [mailto:3chas3@gmail.com<mailto:3chas3@gmail.com>]
Sent: Wednesday, August 1, 2018 11:31 PM
To: Zhang, Qi Z <qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com>>
Cc: dev@dpdk.org<mailto:dev@dpdk.org>; Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; Chas Williams <chas3@att.com<mailto:chas3@att.com>>
Subject: Re: [PATCH] net/i40e: stop lldp before setting local lldp MIB
On Wed, Aug 1, 2018 at 10:00 AM Zhang, Qi Z <qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com>> wrote:
Hi Williams:
> -----Original Message-----
> From: Chas Williams [mailto:3chas3@gmail.com<mailto:3chas3@gmail.com>]
> Sent: Wednesday, August 1, 2018 12:07 PM
> To: dev@dpdk.org<mailto:dev@dpdk.org>
> Cc: Xing, Beilei <beilei.xing@intel.com<mailto:beilei.xing@intel.com>>; Zhang, Qi Z <qi.z.zhang@intel.com<mailto:qi.z.zhang@intel.com>>;
> Charles (Chas) Williams <chas3@att.com<mailto:chas3@att.com>>
> Subject: [PATCH] net/i40e: stop lldp before setting local lldp MIB
>
> From: "Charles (Chas) Williams" <chas3@att.com<mailto:chas3@att.com>>
>
> From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
> Update:
>
> Starting from NVM 5.02, if the Set Local LLDP MIB command is
> received while the DCBx specific agent is stopped, the command
> returns an EPERM error. If the command is received while the
> LLDP agent is stopped, it sets the local MIB without exchanging
> LLDP with peer, and returns SUCCESS.
>
> This results in the harmless, but annoying, diagnostic:
>
> default dcb config fails. err = -53, aq_err = 1.
>
> So, always stop the lldp daemon when we are in software mode before we
> attempt to call i40e_set_dcb_config.
>
> Signed-off-by: Chas Williams <chas3@att.com<mailto:chas3@att.com>>
> ---
> drivers/net/i40e/i40e_ethdev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
> index a340540ef..03bedf5c1 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -11237,6 +11237,7 @@ i40e_dcb_init_configure(struct rte_eth_dev
> *dev, bool sw_dcb)
> * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
> * adminq status. Otherwise, it should return success.
> */
> + i40e_aq_stop_lldp(hw, TRUE, NULL);
I40e_aq_stop_lldp is intended to be removed with below two patches.
commit c6431c891d9e9691e3205fe5c5350071cbaeb852
commit fcbd40d4327b36725c4de9f33f57809edc359f4a
Yeah about that. The i40e driver seems to go out of its way to program the flow
control outside of LLDP see i40e_update_flow_control() and i40e_flow_ctrl_set().
So it's not clear to me what is going on here with DPDK and LLDP. Do you really
want LLDP running in this mode? The other branch in i40e_dcb_init_configure()
explicitly starts LLDP, so I assume at some point, LLDP wasn't/isn't running. How did
it get this way? With respect to item #70, shouldn't you therefore always start
LLDP to workaround the bug?
LLDP is enabled by firmware as default, from my view it is not necessary to start LLDP, if We never stop it, and maybe we should not allow the case sw_dcb = TRUE since we can’t stop LLDP.
Item#70 is fixed in later NVM's (6.01 or later). Perhaps a check to see if the NVM
is new enough to safely allow LLDP stopping?
Yes, I agree, would you mind to add a firmware check for lldp_start and lldp_stop in v2? So that fix your concern in the case with a new firmware
For old firmware case, let’s just keep exist way , there should be some re-work in future, and more test and review is required.
Yes, I can probably manage to add a firmware check. I will need a little bit to test it.
[Qi] OK, just a reminder, this change will be deferred to v18.11.
One other question. What's up with i40e_update_flow_control()? Should this be called whenever the link state changes? Right now it only seems to be called when the device is started/initialized.
[Qi] I’m not very sure if the flow control mode will be changed during LSC, Did you see some real issue that related with it?
Thanks
Qi
Regards.
Qi
> if ((ret == I40E_SUCCESS) || (ret != I40E_SUCCESS &&
> hw->aq.asq_last_status == I40E_AQ_RC_EPERM)) {
> memset(&hw->local_dcbx_config, 0,
> --
> 2.14.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB
2018-08-03 2:10 ` Zhang, Qi Z
@ 2018-08-06 19:03 ` Chas Williams
0 siblings, 0 replies; 9+ messages in thread
From: Chas Williams @ 2018-08-06 19:03 UTC (permalink / raw)
To: Zhang, Qi Z; +Cc: dev, beilei.xing, Chas Williams
On Thu, Aug 2, 2018 at 10:10 PM Zhang, Qi Z <qi.z.zhang@intel.com> wrote:
>
>
>
>
> *From:* Chas Williams [mailto:3chas3@gmail.com]
> *Sent:* Friday, August 3, 2018 5:20 AM
> *To:* Zhang, Qi Z <qi.z.zhang@intel.com>
> *Cc:* dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Chas Williams <
> chas3@att.com>
> *Subject:* Re: [PATCH] net/i40e: stop lldp before setting local lldp MIB
>
>
>
>
>
> On Wed, Aug 1, 2018 at 10:16 PM Zhang, Qi Z <qi.z.zhang@intel.com> wrote:
>
>
>
>
>
> *From:* Chas Williams [mailto:3chas3@gmail.com]
> *Sent:* Wednesday, August 1, 2018 11:31 PM
> *To:* Zhang, Qi Z <qi.z.zhang@intel.com>
> *Cc:* dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Chas Williams <
> chas3@att.com>
> *Subject:* Re: [PATCH] net/i40e: stop lldp before setting local lldp MIB
>
>
>
>
>
> On Wed, Aug 1, 2018 at 10:00 AM Zhang, Qi Z <qi.z.zhang@intel.com> wrote:
>
> Hi Williams:
>
> > -----Original Message-----
> > From: Chas Williams [mailto:3chas3@gmail.com]
> > Sent: Wednesday, August 1, 2018 12:07 PM
> > To: dev@dpdk.org
> > Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <
> qi.z.zhang@intel.com>;
> > Charles (Chas) Williams <chas3@att.com>
> > Subject: [PATCH] net/i40e: stop lldp before setting local lldp MIB
> >
> > From: "Charles (Chas) Williams" <chas3@att.com>
> >
> > From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
> > Update:
> >
> > Starting from NVM 5.02, if the Set Local LLDP MIB command is
> > received while the DCBx specific agent is stopped, the command
> > returns an EPERM error. If the command is received while the
> > LLDP agent is stopped, it sets the local MIB without exchanging
> > LLDP with peer, and returns SUCCESS.
> >
> > This results in the harmless, but annoying, diagnostic:
> >
> > default dcb config fails. err = -53, aq_err = 1.
> >
> > So, always stop the lldp daemon when we are in software mode before we
> > attempt to call i40e_set_dcb_config.
> >
> > Signed-off-by: Chas Williams <chas3@att.com>
> > ---
> > drivers/net/i40e/i40e_ethdev.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/i40e/i40e_ethdev.c
> b/drivers/net/i40e/i40e_ethdev.c
> > index a340540ef..03bedf5c1 100644
> > --- a/drivers/net/i40e/i40e_ethdev.c
> > +++ b/drivers/net/i40e/i40e_ethdev.c
> > @@ -11237,6 +11237,7 @@ i40e_dcb_init_configure(struct rte_eth_dev
> > *dev, bool sw_dcb)
> > * i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
> > * adminq status. Otherwise, it should return success.
> > */
> > + i40e_aq_stop_lldp(hw, TRUE, NULL);
>
> I40e_aq_stop_lldp is intended to be removed with below two patches.
>
> commit c6431c891d9e9691e3205fe5c5350071cbaeb852
> commit fcbd40d4327b36725c4de9f33f57809edc359f4a
>
>
>
> Yeah about that. The i40e driver seems to go out of its way to program
> the flow
>
> control outside of LLDP see i40e_update_flow_control()
> and i40e_flow_ctrl_set().
>
> So it's not clear to me what is going on here with DPDK and LLDP. Do you
> really
>
> want LLDP running in this mode? The other branch
> in i40e_dcb_init_configure()
>
> explicitly starts LLDP, so I assume at some point, LLDP wasn't/isn't
> running. How did
>
> it get this way? With respect to item #70, shouldn't you therefore always
> start
>
> LLDP to workaround the bug?
>
>
>
>
>
> LLDP is enabled by firmware as default, from my view it is not necessary
> to start LLDP, if We never stop it, and maybe we should not allow the case
> sw_dcb = TRUE since we can’t stop LLDP.
>
>
>
> Item#70 is fixed in later NVM's (6.01 or later). Perhaps a check to see
> if the NVM
>
> is new enough to safely allow LLDP stopping?
>
>
>
> Yes, I agree, would you mind to add a firmware check for lldp_start and
> lldp_stop in v2? So that fix your concern in the case with a new firmware
>
> For old firmware case, let’s just keep exist way , there should be some
> re-work in future, and more test and review is required.
>
>
>
> Yes, I can probably manage to add a firmware check. I will need a little
> bit to test it.
>
>
>
> [Qi] OK, just a reminder, this change will be deferred to v18.11.
>
>
>
> One other question. What's up with i40e_update_flow_control()? Should
> this be called whenever the link state changes? Right now it only seems to
> be called when the device is started/initialized.
>
>
>
> [Qi] I’m not very sure if the flow control mode will be changed during
> LSC, Did you see some real issue that related with it?
>
There's no reason to believe that the other end wouldn't change the
status of flow control. It just seems like this might be something
you would want to do more often than device init/reset?
>
>
>
>
>
>
> Thanks
>
> Qi
>
>
>
>
>
>
> Regards.
> Qi
>
>
> > if ((ret == I40E_SUCCESS) || (ret != I40E_SUCCESS &&
> > hw->aq.asq_last_status == I40E_AQ_RC_EPERM)) {
> > memset(&hw->local_dcbx_config, 0,
> > --
> > 2.14.4
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* [dpdk-dev] [PATCH v2] net/i40e: stop lldp before setting local lldp MIB
2018-08-01 4:07 [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB Chas Williams
2018-08-01 13:59 ` Zhang, Qi Z
@ 2018-08-06 20:05 ` Chas Williams
2018-09-13 12:30 ` Zhang, Qi Z
1 sibling, 1 reply; 9+ messages in thread
From: Chas Williams @ 2018-08-06 20:05 UTC (permalink / raw)
To: dev; +Cc: beilei.xing, qi.z.zhang, Charles (Chas) Williams
From: "Charles (Chas) Williams" <chas3@att.com>
>From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
Update:
Starting from NVM 5.02, if the Set Local LLDP MIB command is
received while the DCBx specific agent is stopped, the command
returns an EPERM error. If the command is received while the
LLDP agent is stopped, it sets the local MIB without exchanging
LLDP with peer, and returns SUCCESS.
This results in the harmless, but annoying, diagnostic:
default dcb config fails. err = -53, aq_err = 1.
So, if possible (older firmwares cannot safely stop LLDP), stop the
lldp daemon when we are in software mod before we attempt to call
i40e_set_dcb_config.
Signed-off-by: Chas Williams <chas3@att.com>
---
drivers/net/i40e/i40e_ethdev.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index a340540ef..de3761933 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -11232,6 +11232,16 @@ i40e_dcb_init_configure(struct rte_eth_dev *dev, bool sw_dcb)
* LLDP MIB change event.
*/
if (sw_dcb == TRUE) {
+ /* When using NVM 6.01 or later, the RX data path does
+ * not hang if the FW LLDP is stopped.
+ */
+ if (((hw->nvm.version >> 12) & 0xf) >= 6 &&
+ ((hw->nvm.version >> 4) & 0xff) >= 1) {
+ ret = i40e_aq_stop_lldp(hw, TRUE, NULL);
+ if (ret != I40E_SUCCESS)
+ PMD_INIT_LOG(DEBUG, "Failed to stop lldp");
+ }
+
ret = i40e_init_dcb(hw);
/* If lldp agent is stopped, the return value from
* i40e_init_dcb we expect is failure with I40E_AQ_RC_EPERM
--
2.14.4
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [dpdk-dev] [PATCH v2] net/i40e: stop lldp before setting local lldp MIB
2018-08-06 20:05 ` [dpdk-dev] [PATCH v2] " Chas Williams
@ 2018-09-13 12:30 ` Zhang, Qi Z
0 siblings, 0 replies; 9+ messages in thread
From: Zhang, Qi Z @ 2018-09-13 12:30 UTC (permalink / raw)
To: Chas Williams, dev; +Cc: Xing, Beilei, Charles (Chas) Williams
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Chas Williams
> Sent: Tuesday, August 7, 2018 4:06 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Zhang, Qi Z <qi.z.zhang@intel.com>;
> Charles (Chas) Williams <chas3@att.com>
> Subject: [dpdk-dev] [PATCH v2] net/i40e: stop lldp before setting local lldp MIB
>
> From: "Charles (Chas) Williams" <chas3@att.com>
>
> From the Intel Ethernet Controller X710/XXV710/XL710 Specifiction
> Update:
>
> Starting from NVM 5.02, if the Set Local LLDP MIB command is
> received while the DCBx specific agent is stopped, the command
> returns an EPERM error. If the command is received while the
> LLDP agent is stopped, it sets the local MIB without exchanging
> LLDP with peer, and returns SUCCESS.
>
> This results in the harmless, but annoying, diagnostic:
>
> default dcb config fails. err = -53, aq_err = 1.
>
> So, if possible (older firmwares cannot safely stop LLDP), stop the lldp daemon
> when we are in software mod before we attempt to call i40e_set_dcb_config.
>
> Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel
Thanks
Qi
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-09-13 12:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-01 4:07 [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB Chas Williams
2018-08-01 13:59 ` Zhang, Qi Z
2018-08-01 15:31 ` Chas Williams
2018-08-02 2:16 ` Zhang, Qi Z
2018-08-02 21:19 ` Chas Williams
2018-08-03 2:10 ` Zhang, Qi Z
2018-08-06 19:03 ` Chas Williams
2018-08-06 20:05 ` [dpdk-dev] [PATCH v2] " Chas Williams
2018-09-13 12:30 ` Zhang, Qi Z
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).