From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf0-f180.google.com (mail-pf0-f180.google.com [209.85.192.180]) by dpdk.org (Postfix) with ESMTP id 1159711D4 for ; Mon, 25 Apr 2016 22:03:17 +0200 (CEST) Received: by mail-pf0-f180.google.com with SMTP id y69so50980245pfb.1 for ; Mon, 25 Apr 2016 13:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=80ACcfKLeBoXcp7GBL8nKEnW3PQcTtFfM5PQQq5EF04=; b=gLI2zaaN9WEJRPsS/n/p1XDqaJx4vyZxZVX2/KZibb6vFz3I2JGtNaqstC4VJGZOZV cWOYbs47n1ZccxxgWIXFgXjLhpN+Pm5qwuXZ9geAtiLTCPWWjPZj6XPc1yqUb1PfzB+v ZusEtN+wFeAsKsjdZkg4gqeW404oS5ISM4IXssxeMAa25K0XwP8ezcuYFzJOKysBQM// A8PlIeqoK4z7TC8Az/1HEbZQnSFgH4+GyFnH1Pyxu+r8Z7DW2Bj/9iuJO5iu+X0jqQJ/ kRjh8qBrdj71AXKMnYrOkLUsDm3kIVTLydFJZKWwp/H1JeaEPL0EwuIxAr+Gw+7fFfSg Fypw== 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-transfer-encoding; bh=80ACcfKLeBoXcp7GBL8nKEnW3PQcTtFfM5PQQq5EF04=; b=HGEKHbuecP5Tuez1hv1qHx8/DIuztff8DdaolzEo/Q5f417N8xv5n6TZAS5F85/nYu kGjBjKSVZqs2QdpkbfYGVNz5Dr+MGzyk6yqN2fNfuM7TB3y7UFdBuyIjJWfN93dWa76r R0jAcIhp/HdZh+w+9hux6B7BFcGxYECq4WrZt0APn12h0YtTiQgxEw2OB0YxDQawoms/ ifYadyTu4chso2XCpD5vsjD5BH/wuihMWytm6J1p2sBlPJGC9q8Q4dnDEqDUm4aMTnBv ask6dN//47XiBwMIHR+0LD3k//OXWQ9AYUxVsCcitqR6AZQkybSx7Rxo8sB7GPnlnOxT 56Dg== X-Gm-Message-State: AOPr4FVvswDQomDsDTuG+OPKbF0p6mvX7gAhrBYR/sBXUGpWUSObhcERWka8cM0xsdtOKA== X-Received: by 10.98.95.4 with SMTP id t4mr51116836pfb.100.1461614596258; Mon, 25 Apr 2016 13:03:16 -0700 (PDT) Received: from xeon-e3 (static-50-53-72-186.bvtn.or.frontiernet.net. [50.53.72.186]) by smtp.gmail.com with ESMTPSA id p189sm30855204pfb.51.2016.04.25.13.03.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 25 Apr 2016 13:03:15 -0700 (PDT) Date: Mon, 25 Apr 2016 13:03:29 -0700 From: Stephen Hemminger To: Cc: Message-ID: <20160425130329.1ed98942@xeon-e3> In-Reply-To: <22C95CA62CBADB498D32A348F0F073BC116CC81F@wcosexch02k.cos.is.keysight.com> References: <22C95CA62CBADB498D32A348F0F073BC116CC81F@wcosexch02k.cos.is.keysight.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-users] Link Status and Interrupts in 2.2.0 X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2016 20:03:17 -0000 On Mon, 25 Apr 2016 11:49:52 +0000 wrote: > Hello All, > > Been adding in support for the interrupt handler for the link status for ports on an X710 card. > > Before I changed the lsc field of the intr_conf to 1, I was able to see the link status information correctly. > > The documentation does say that if interrupts are enabled, the rte_eth_link_get function recovers the information from a structure that the interrupt host thread fills in, rather than going to the card it's self. > > This seems reasonable, however....once you've had an interrupt then all is good, > > But if the link was "active" when dpdk and my app starts up, then no interrupt is generated, which then means that global structure is not filled in, so I see > > get link status > status is 0 speed is 0 duplex is 0 > > if I turn the lasers on and off on my source I get the expected values, since the interrupt event causes the global data to be populated. > > get link status > status is 1 speed is 10000 duplex is 2 > > So the question is, how do I use the LSC interrupts via the "rte_eth_dev_callback_register" function, > but get the correct values in the link status information if no interrupts occur? > > I saw a submission to the patchwork 7160, dated Sep 24 2015 but it was marked as not applicable , archived..... > > Many Thanks > > > Martin > > R&D Engineer > Keysight Technologies UK Ltd Your application needs to make one call to check for current link state after device is started. After that all updates can be done from the LSC interrupt callback.