From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f182.google.com (mail-pd0-f182.google.com [209.85.192.182]) by dpdk.org (Postfix) with ESMTP id A5E3C7F50 for ; Tue, 9 Dec 2014 04:43:40 +0100 (CET) Received: by mail-pd0-f182.google.com with SMTP id p10so2045534pdj.41 for ; Mon, 08 Dec 2014 19:43:40 -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:in-reply-to :references; bh=dE3YKrwnj6KJY0kKh87+hgQwaMjzg8ttmXRhSRNLoFE=; b=E6v04nj6CCKhDRGwWw9dzNHKnUwFkDOHPiDpc1f1htmBPIndnOaHS+z8ezXyio9J2Y 09BUOYZi8NeboP729YWlCTln7/fFLi8YZCuE14kyYNVowugCNIjimDSgtHkBOkylGKm/ UG048dNVRcJEJcQUB++I6RKTGDWNuBF3pekhn4tP7uhBrh4NQaUIsek8jvuF9v7/x2ri ghK/AisxKsVaIjrUlUX3nVqmHsa6nfE/ME4+j0Y7Dd7ypLShOCxPMb7Dn4PDymRFeaig TsyyHnaS90ye1ZY1WLdJZgc8+uck0f7RSweFdgHG2qkqK6WAVTO95I4Xm7SIjdFZC+99 4ZeA== X-Gm-Message-State: ALoCoQkazviuSGVYbTIfmb17sPOf9pJmL6ZIyK/VWlAp+K+rbsCG7nM8VkLBfNYCQVzkMb6OeiRx X-Received: by 10.68.229.193 with SMTP id ss1mr1578939pbc.16.1418096620045; Mon, 08 Dec 2014 19:43:40 -0800 (PST) Received: from eris.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id xx2sm2185pab.17.2014.12.08.19.43.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Dec 2014 19:43:39 -0800 (PST) From: Tetsuya Mukawa To: dev@dpdk.org Date: Tue, 9 Dec 2014 12:42:35 +0900 Message-Id: <1418096571-27531-13-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418096571-27531-1-git-send-email-mukawa@igel.co.jp> References: <1416474399-16851-1-git-send-email-mukawa@igel.co.jp> <1418096571-27531-1-git-send-email-mukawa@igel.co.jp> Cc: nakajima.yoshihiro@lab.ntt.co.jp, menrigh@brocade.com, masutani.hitoshi@lab.ntt.co.jp Subject: [dpdk-dev] [PATCH v2 12/28] ethdev: Change scope of rte_eth_dev_allocated to global 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: Tue, 09 Dec 2014 03:43:41 -0000 This function is used by virtual PMDs to support port hotplug framework. So change scope of the function to global. Signed-off-by: Tetsuya Mukawa --- lib/librte_ether/rte_ethdev.c | 2 +- lib/librte_ether/rte_ethdev.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c index ed53e66..86200e0 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -206,7 +206,7 @@ rte_eth_dev_data_alloc(void) RTE_MAX_ETHPORTS * sizeof(*rte_eth_dev_data)); } -static struct rte_eth_dev * +struct rte_eth_dev * rte_eth_dev_allocated(const char *name) { unsigned i; diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h index 404c41f..47622a2 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1712,6 +1712,16 @@ extern int rte_eth_dev_get_name_by_port(uint8_t port_id, char *name); extern int rte_eth_dev_check_detachable(uint8_t port_id); /** + * Function for internal use by port hotplug functions. + * Returns a ethdev slot specified by the unique identifier name. + * @param name + * The pointer to the Unique identifier name for each Ethernet device + * @return + * - The pointer to the ethdev slot, on success. NULL on error + */ +extern struct rte_eth_dev *rte_eth_dev_allocated(const char *name); + +/** * Function for internal use by dummy drivers primarily, e.g. ring-based * driver. * Allocates a new ethdev slot for an ethernet device and returns the pointer -- 1.9.1