From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 5B23D234 for ; Fri, 30 Jan 2015 11:29:03 +0100 (CET) Received: by mail-wi0-f172.google.com with SMTP id h11so1969990wiw.5 for ; Fri, 30 Jan 2015 02:29:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=SjfarLnMKgb6So89pCMvHgCqrPlnWssosjiiFUFr6eA=; b=D2l5fu2GRd1go4RJC4sYFk/CYeOVZKyTHH5jCyw+2HApkgkSY0XHat9ROCN7EmPayK Gcn6P0R+BtawA8dHo0O2UDyvbspXnVj66oFfUmMPJnYtaoDyGCoz0TZJi+gU/s2ooFTX 7TwcGpb2ZC74rdGcs+J4h7qxlN7z1D7vCmLmIxIduvTA9XotB8FkGi6rwi4a4571aVSq pY1UN6fcoywJU8D1CjMCleMaw+kAM3a7H5RYgpVxW+qZvRG2TYwTkLwW+8qLf7PvDPra H6ynG+dkGgbT3XDsBZdRSjz1gbvFHMGwyVXgOzYrYsVnLgFpONc2b8Ox0SLYbTRQCtrB 9bHA== X-Gm-Message-State: ALoCoQmdg858944E1DbrbJ/aopZJEyLN5xaHuV604yXzgEi0J0D4ZHSpKkUTLUIsQY4kXI1jSEEL X-Received: by 10.180.207.10 with SMTP id ls10mr3359312wic.7.1422613742473; Fri, 30 Jan 2015 02:29:02 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id ku8sm14278944wjb.23.2015.01.30.02.29.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Jan 2015 02:29:01 -0800 (PST) From: Thomas Monjalon To: Jia Yu Date: Fri, 30 Jan 2015 11:28:35 +0100 Message-ID: <3121142.D7ktn8xfBZ@xps13> Organization: 6WIND User-Agent: KMail/4.14.4 (Linux/3.18.4-1-ARCH; KDE/4.14.4; x86_64; ; ) In-Reply-To: References: <1415381511-43364-1-git-send-email-jyu@vmware.com> <1415381511-43364-2-git-send-email-jyu@vmware.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH 1/2] rte_ethdev: update link status (speed, duplex, link_up) after rte_eth_dev_start 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, 30 Jan 2015 10:29:03 -0000 Jia, any news on this patchset? 2014-11-12 03:57, Zhang, Helin: > Hi Jia > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jia Yu > > Sent: Saturday, November 8, 2014 1:32 AM > > To: dev@dpdk.org > > Subject: [dpdk-dev] [PATCH 1/2] rte_ethdev: update link status (speed, duplex, > > link_up) after rte_eth_dev_start > > > > Since LSR interrupt is disabled by pmd drivers, link status in rte_eth_device is > > always down. > If LSC interrupt is disabled by default, it will poll the link status during the initialization > or in dev_start, and then the link status should he correct. If I am not wrong. > > > Bond slave_configure() enables LSR interrupt on devices to get notification if link > > status changes. However, the LSC interrupt at device start time is still lost. > Before enabling interrupt for LSC, the link status should be polled. So after the port > startup, the link status should be there. > > > > > In this fix, call link_update to read link status from hardware register at device > > start time. > Could you help to explain this code changes a bit more? Why we need it? > > > > > Issue: > > Change-Id: Ib57a1c9114f922485c7b0f4338bfe7b3d3f87d65 > > Signed-off-by: Jia Yu > > --- > > lib/librte_ether/rte_ethdev.c | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index > > ff1c769..6c01b02 100644 > > --- a/lib/librte_ether/rte_ethdev.c > > +++ b/lib/librte_ether/rte_ethdev.c > > @@ -869,6 +869,10 @@ rte_eth_dev_start(uint8_t port_id) > > > > rte_eth_dev_config_restore(port_id); > > > > + if (dev->data->dev_conf.intr_conf.lsc != 0) { > > + FUNC_PTR_OR_ERR_RET(*dev->dev_ops->link_update, -ENOTSUP); > > + (*dev->dev_ops->link_update)(dev, 0); > > + } > > return 0; > > } > > > > -- > > 1.9.1 > > Regards, > Helin