From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stargate3.asicdesigners.com (stargate.chelsio.com [67.207.112.58]) by dpdk.org (Postfix) with ESMTP id 63C55377C for ; Sat, 23 May 2015 07:54:13 +0200 (CEST) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate3.asicdesigners.com (8.13.8/8.13.8) with ESMTP id t4N5s83N014111; Fri, 22 May 2015 22:54:09 -0700 Date: Sat, 23 May 2015 11:23:46 +0530 From: Rahul Lakkireddy To: Stephen Hemminger Message-ID: <20150523055344.GA4569@scalar.blr.asicdesigners.com> References: <25f06823ef87d05bf57d996df387478e7fbc966f.1432300701.git.rahul.lakkireddy@chelsio.com> <20150522094638.24d4c498@urahara> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150522094638.24d4c498@urahara> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: dev@dpdk.org, Felix Marti , Kumar Sanghvi , Nirranjan Kirubaharan Subject: Re: [dpdk-dev] [PATCH 2/5] cxgbe: add cxgbe poll mode driver. X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 May 2015 05:54:13 -0000 On Fri, May 22, 2015 at 09:46:38 -0700, Stephen Hemminger wrote: > On Fri, 22 May 2015 18:54:20 +0530 > Rahul Lakkireddy wrote: > > > +static int cxgbe_dev_link_update(struct rte_eth_dev *eth_dev, > > + __rte_unused int wait_to_complete) > > +{ > > + struct port_info *pi = (struct port_info *)(eth_dev->data->dev_private); > > + struct adapter *adapter = pi->adapter; > > + struct sge *s = &adapter->sge; > > + unsigned int work_done, budget = 4; > > + int ret; > > + > > + cxgbe_poll(&s->fw_evtq, NULL, budget, &work_done); > > + ret = pi->link_cfg.link_ok; > > + eth_dev->data->dev_link.link_status = pi->link_cfg.link_ok; > > + eth_dev->data->dev_link.link_duplex = ETH_LINK_FULL_DUPLEX; > > + eth_dev->data->dev_link.link_speed = pi->link_cfg.speed; > > + return ret; > > It is well not documented but link update is supposed to return 0 > on link status changed and -1 if not changed. Ok. We will correct the return value in v2 posting. We need to rebase anyway since PMDs now seem to have moved to drivers/net directory. Thanks, Rahul.