From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f171.google.com (mail-we0-f171.google.com [74.125.82.171]) by dpdk.org (Postfix) with ESMTP id B3E5B58D3 for ; Fri, 20 Jun 2014 15:14:33 +0200 (CEST) Received: by mail-we0-f171.google.com with SMTP id q58so3828189wes.16 for ; Fri, 20 Jun 2014 06:14:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=VsDt2yT0mEmgW7V2Pj8UlRZGUgLTlZIu4sva1fKKmNQ=; b=VjfFPnI/iBCT86bv6mzisVPJ+rGYjDF5bAMfQuFE5syx3zgzsPxF3YSyXiBxAuklye MwCVoGtSbKv5XL6KEZ3QJj3C7RK0Xvw5X8WdbyrxsinERmRDRNfSNfED4XDl9G0u9uFk 0H39z5afvw9Yulhi9EHi1yKRD8w1dQXDF7V/UIAsPFZ+gxovR7BSpoxqjCzk+GreV0Z3 vPZXsfIxu8qUn1JdITWVL3AEGt3kp53C//AUyR9dbceP63QMj0zMDeop7KTnJfulRnfG d1GRj3fKUCkHLQtBt3OHS4Fv2DHRhqb5eGr6uaLWF/ZQ5llhnycJYIn23ZoGry4/TgBS 9KcA== X-Gm-Message-State: ALoCoQmGMCSC9FrMuBvYT60lFke2sHBmQi1QN2lReCuYkyi6DuS//dU5UyzP0K5PdyI70cqqTld1 X-Received: by 10.180.84.168 with SMTP id a8mr4119863wiz.36.1403270091031; Fri, 20 Jun 2014 06:14:51 -0700 (PDT) Received: from localhost.localdomain (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id ft20sm4681255wic.14.2014.06.20.06.14.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 20 Jun 2014 06:14:50 -0700 (PDT) From: Thomas Monjalon To: dev@dpdk.org Date: Fri, 20 Jun 2014 15:13:58 +0200 Message-Id: <1403270038-19286-1-git-send-email-thomas.monjalon@6wind.com> X-Mailer: git-send-email 2.0.0 Subject: [dpdk-dev] [PATCH] ethdev: read link state interrupt without link_update service 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, 20 Jun 2014 13:14:33 -0000 It is now possible to read link status updated by interrupt without having manual link_update() service provided by the PMD. Indeed link_update() is useless in interrupt case. Signed-off-by: Thomas Monjalon --- lib/librte_ether/rte_ethdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index 7256841..a292b6e 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -1100,11 +1100,11 @@ rte_eth_link_get(uint8_t port_id, struct rte_eth_link *eth_link) return; } dev = &rte_eth_devices[port_id]; - FUNC_PTR_OR_RET(*dev->dev_ops->link_update); if (dev->data->dev_conf.intr_conf.lsc != 0) rte_eth_dev_atomic_read_link_status(dev, eth_link); else { + FUNC_PTR_OR_RET(*dev->dev_ops->link_update); (*dev->dev_ops->link_update)(dev, 1); *eth_link = dev->data->dev_link; } @@ -1120,11 +1120,11 @@ rte_eth_link_get_nowait(uint8_t port_id, struct rte_eth_link *eth_link) return; } dev = &rte_eth_devices[port_id]; - FUNC_PTR_OR_RET(*dev->dev_ops->link_update); if (dev->data->dev_conf.intr_conf.lsc != 0) rte_eth_dev_atomic_read_link_status(dev, eth_link); else { + FUNC_PTR_OR_RET(*dev->dev_ops->link_update); (*dev->dev_ops->link_update)(dev, 0); *eth_link = dev->data->dev_link; } -- 2.0.0