From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id DDB341B654 for ; Mon, 5 Feb 2018 18:06:00 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Feb 2018 09:05:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,465,1511856000"; d="scan'208";a="24985503" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.91]) ([10.237.220.91]) by FMSMGA003.fm.intel.com with ESMTP; 05 Feb 2018 09:05:57 -0800 To: Rahul Lakkireddy , dev@dpdk.org Cc: kumaras@chelsio.com, surendra@chelsio.com, nirranjan@chelsio.com, indranil@chelsio.com References: From: Ferruh Yigit Message-ID: <57cd8be1-b01c-bf49-a0e1-676eb028cbed@intel.com> Date: Mon, 5 Feb 2018 17:05:57 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH 2/7] cxgbe: update link state when link speed changes 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 Feb 2018 17:06:02 -0000 On 2/4/2018 6:06 AM, Rahul Lakkireddy wrote: > From: Kumar Sanghvi > > Original work by Surendra Mobiya > > Fixes: cdac6e2eeafc ("cxgbe: add link related functions") > Signed-off-by: Kumar Sanghvi > Signed-off-by: Rahul Lakkireddy > --- > drivers/net/cxgbe/cxgbe_ethdev.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/cxgbe/cxgbe_ethdev.c b/drivers/net/cxgbe/cxgbe_ethdev.c > index 6d56f3c1b..5a25125fe 100644 > --- a/drivers/net/cxgbe/cxgbe_ethdev.c > +++ b/drivers/net/cxgbe/cxgbe_ethdev.c > @@ -227,7 +227,8 @@ static int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev, > unsigned int work_done, budget = 4; > > cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done); > - if (old_link->link_status == pi->link_cfg.link_ok) > + if (old_link->link_status == pi->link_cfg.link_ok && > + old_link->link_speed == pi->link_cfg.speed) As Stephen's patch tried to clean this up, link_update dev_ops return value is not very clear now and this return value not used at all in ethdev layer. And as far as I can see you are also not using this locally in driver, so there is no effect of updating this code, good or bad, I suggest postponing this update until return value cleared more. > return -1; /* link not changed */ > > eth_dev->data->dev_link.link_status = pi->link_cfg.link_ok; >