From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f169.google.com (mail-pd0-f169.google.com [209.85.192.169]) by dpdk.org (Postfix) with ESMTP id 6A9397FEA for ; Wed, 29 Oct 2014 09:41:33 +0100 (CET) Received: by mail-pd0-f169.google.com with SMTP id y10so2566947pdj.14 for ; Wed, 29 Oct 2014 01:50:23 -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:cc:subject:date:message-id:in-reply-to :references; bh=e86ZKvs0fx+VKC449XT3o50pUlfPmZLO+iwZ5cjH3Uw=; b=FzUoKIrCGTN4iS+ERf0unq6g+Rw9zObe0dmb9Sh96MUDDZfngh+JlqBNf1En7DPwMT j9NW2BpOCf5w279Jn6Df6eLP6nMNkVWhfgoeGwQmvgZDY4th5OP8vcSoqtrJtZt9kuIS CSnBaXr+Q35OL8yiHbSiqty79vvX0l5vGUfH290NOpntVN8U9mKWU0Qt8IOCj6w96g0X wycRDZpKSATCwUNE92AUsLKBdDFJNnU4cven0yynQHP5Wv/DZYkQtxL5NMMpNquI6BYx zn4DY5jy5RxSFDy1GRAa/k6xrsvqMxvGQ761F9K3092lyTtz3vx3v7VdpTwsCt/bkk+c DYFg== X-Gm-Message-State: ALoCoQndOnwVm1Y4JMBgd0l4IrPNoh4zlSQt21i90HGvAE1lk7UswvVGw55RdwUBUiwXsaJoDmJt X-Received: by 10.66.171.135 with SMTP id au7mr9062576pac.80.1414572623621; Wed, 29 Oct 2014 01:50:23 -0700 (PDT) Received: from eris.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id ky4sm3686872pbc.55.2014.10.29.01.50.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 29 Oct 2014 01:50:22 -0700 (PDT) From: Tetsuya Mukawa To: dev@dpdk.org Date: Wed, 29 Oct 2014 17:49:23 +0900 Message-Id: <1414572576-21371-13-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1414572576-21371-1-git-send-email-mukawa@igel.co.jp> References: <1414572576-21371-1-git-send-email-mukawa@igel.co.jp> Cc: nakajima.yoshihiro@lab.ntt.co.jp, masutani.hitoshi@lab.ntt.co.jp Subject: [dpdk-dev] [RFC PATCH 12/25] 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: Wed, 29 Oct 2014 08:41:34 -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 92a846a..9a71e9d 100644 --- a/lib/librte_ether/rte_ethdev.c +++ b/lib/librte_ether/rte_ethdev.c @@ -195,7 +195,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 5cc438c..c3e8ff8 100644 --- a/lib/librte_ether/rte_ethdev.h +++ b/lib/librte_ether/rte_ethdev.h @@ -1688,6 +1688,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