From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by dpdk.org (Postfix) with ESMTP id DCBC65A4B for ; Fri, 22 May 2015 18:46:35 +0200 (CEST) Received: by pabru16 with SMTP id ru16so23925999pab.1 for ; Fri, 22 May 2015 09:46:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=5v2MXWtfsVZ4Y+MRbbbgg6ol4eRr6AJolrPpK95PHZU=; b=HCS+FbxHO7euJkCw1VWXJcpXV5i3WFcTs4HKKfaKBSkeMNibTfZW5m2dw1cWSaO6Xy k34A83Xvwq4Dcb9TlXU8gwgP713r2j+xkPrJSaNTlf5+40yNJfNvqOKWpi0CIFw8lVve 4pT3q7N3fSDq9REFCUakekGqhbR1XDNq6CiAN+InOHeGViZhD6uVQsNFhJ4A69i4oUyD bre0MRyZSUKh4FmTq9qs45WRiSt4s/fHlnnLvcG9WNtrBb2fH35XLWWvEdAyuuswGnck ToDQ5Z7b48zCFm1WlGofZ9dPcksi5HS9acIQqXoh3tC0MA1UdIOfyodUfo7IEKezxYFA HJ7Q== X-Gm-Message-State: ALoCoQl8UsujtP8hystRQqkxVCUu4Uk6GJXWK+gjxBb2Gmn9LB9mu+dvikWwlZIS0f94sOAbWdEQ X-Received: by 10.66.145.133 with SMTP id su5mr16947444pab.114.1432313195243; Fri, 22 May 2015 09:46:35 -0700 (PDT) Received: from urahara (static-50-53-82-155.bvtn.or.frontiernet.net. [50.53.82.155]) by mx.google.com with ESMTPSA id gy3sm2615613pbb.42.2015.05.22.09.46.34 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 May 2015 09:46:35 -0700 (PDT) Date: Fri, 22 May 2015 09:46:38 -0700 From: Stephen Hemminger To: Rahul Lakkireddy Message-ID: <20150522094638.24d4c498@urahara> In-Reply-To: <25f06823ef87d05bf57d996df387478e7fbc966f.1432300701.git.rahul.lakkireddy@chelsio.com> References: <25f06823ef87d05bf57d996df387478e7fbc966f.1432300701.git.rahul.lakkireddy@chelsio.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Fri, 22 May 2015 16:46:36 -0000 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.