From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <3chas3@gmail.com> Received: from mail-it0-f66.google.com (mail-it0-f66.google.com [209.85.214.66]) by dpdk.org (Postfix) with ESMTP id 970088E60 for ; Wed, 1 Aug 2018 17:31:33 +0200 (CEST) Received: by mail-it0-f66.google.com with SMTP id h23-v6so9868120ita.5 for ; Wed, 01 Aug 2018 08:31:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OB+obweSft6M+Exmo702IIfksFyy0wgPkUGNyU4Vu+I=; b=bWCwhydO9/tcYnab0eeyl/ktUPij/dII0Zm1MVjJFwRaoGd9rZ4aAhB3x/lb9VIY7T JsnJC55KingPabAJecvgBqm31CoHC8cm9CvQCA79E3KSBFJDR3ZSxNybbdDRFb38vhNf 37qzzJzTLNWwyFN/7aY+pwOXlV5k75d4ba+bAoj5MmPXQ3VbktFSsNkHT5qwuFCH+c/U KDYkuRAEigDu37STHfbvXPgvKNsWNiyKD8YhKtojFA01FjhKMK9PH5Wm7r4jrvxUNJlh 8uVvM19gA0h4EuKQt+NxOHMyh2ma95yJltOtFuVvKPoS6QFO8YAYMNFs0reE2hZG/KUi 0rwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OB+obweSft6M+Exmo702IIfksFyy0wgPkUGNyU4Vu+I=; b=ACoCLrsdutQefKZXwkG+imoKNL4Qeb6t8MOeWYn3pIFOkkdUpsEuz1jpqikTI72XE7 HekxwQAiE3q7yJt6YyPu0htvVajU4RATy43a2wVQqamJxp8puqmYLO3NTaTZI9r0NyTT VwMYeAftptW5zESpDJhrxiqYx9y0OUG8QestK8dClvGEpt2+/K9tQRXR3Yyv4ZcMsS24 Yb6FuQxZMY8d5T2/Cf//NH1vWhsRP4IjUZd9bQvXlcqTJUHIxVIfQRZ1o0WRwmkxMmhw Ndb87bnGcF9RQRnJMNARcYaAs0hI9Z2cBB5OCdD8sYOSdNduFnEzuCFky1SuwnnqMu94 3eOg== X-Gm-Message-State: AOUpUlE+7Z67La3gHZcURx5uabH9wZrD4+R7ls42ih7UfG8HrywG3wqN yFqAw7dXGdlbAH38UfcoGT2dhPBvQTdG0IwMwYE= X-Google-Smtp-Source: AAOMgpfe6E+QtVj3xYKHK0jy82gwskcmdDPBaol6RtgJqw5SpUFyBEbYOQzAQJrZ549O3j9bZLRZBJAr0RIhfk+7ufI= X-Received: by 2002:a02:982:: with SMTP id 2-v6mr23714164jam.79.1533137492966; Wed, 01 Aug 2018 08:31:32 -0700 (PDT) MIME-Version: 1.0 References: <20180801040712.13792-1-3chas3@gmail.com> <039ED4275CED7440929022BC67E706115326261E@SHSMSX103.ccr.corp.intel.com> In-Reply-To: <039ED4275CED7440929022BC67E706115326261E@SHSMSX103.ccr.corp.intel.com> From: Chas Williams <3chas3@gmail.com> Date: Wed, 1 Aug 2018 11:31:21 -0400 Message-ID: To: "Zhang, Qi Z" Cc: dev@dpdk.org, beilei.xing@intel.com, Chas Williams Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH] net/i40e: stop lldp before setting local lldp MIB 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, 01 Aug 2018 15:31:33 -0000 On Wed, Aug 1, 2018 at 10:00 AM Zhang, Qi Z 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 ; Zhang, Qi Z < > qi.z.zhang@intel.com>; > > Charles (Chas) Williams > > Subject: [PATCH] net/i40e: stop lldp before setting local lldp MIB > > > > From: "Charles (Chas) Williams" > > > > 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 > > --- > > 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 > >