From patchwork Tue Dec 9 06:30:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tetsuya Mukawa X-Patchwork-Id: 1883 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 6F0C68102; Tue, 9 Dec 2014 07:31:57 +0100 (CET) Received: from mail-pd0-f177.google.com (mail-pd0-f177.google.com [209.85.192.177]) by dpdk.org (Postfix) with ESMTP id A710880FA for ; Tue, 9 Dec 2014 07:31:55 +0100 (CET) Received: by mail-pd0-f177.google.com with SMTP id ft15so6607183pdb.8 for ; Mon, 08 Dec 2014 22:31:55 -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=PZUILIH8KqZuvtQsPpk8XreuJL3t4byTzZ/DHjoNYdQ=; b=G5Jt6wvk1XQiAozTO6ireNAF5lu7RT8KOqm3NYhId0S43EkJEEwbDEGHWcyCt8/7HD BdjqcZjy6kqJ8SuMlfiBbiDhjyD3/QRjMAJgIaLLZRkCHcEkagwXxurUPH7jMRb6JVMw ZUA7I3NQf3sJHIkNjHr94rqah22qZaG0e3I/uVa7xASbBHsS3Ua+WoGy11xO/GzvnXPY YUNszoxk8+9h157H4cEgCpAWVG5Vwn6xkZhxscNMbOwptVZ6q/Ew9NpAfzW1F8BY5/3+ ERn44i1pEzFREDTzZfVoPx5TBuwRwsxUzD5y8ETOO4TA4C5GVri8KQy/GOC2ru8bFsmY 7cbQ== X-Gm-Message-State: ALoCoQmVnUBcLMTWHf+wpba+a3X2rYhaS17QebW0YmJqJCQCSSYFT6TIEVjZ0IhxS1B3IZ7vlecX X-Received: by 10.70.54.161 with SMTP id k1mr27428808pdp.110.1418106715008; Mon, 08 Dec 2014 22:31:55 -0800 (PST) Received: from eris.hq.igel.co.jp (napt.igel.co.jp. [219.106.231.132]) by mx.google.com with ESMTPSA id f12sm403088pat.43.2014.12.08.22.31.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 08 Dec 2014 22:31:54 -0800 (PST) From: Tetsuya Mukawa To: dev@dpdk.org Date: Tue, 9 Dec 2014 15:30:28 +0900 Message-Id: <1418106629-22227-28-git-send-email-mukawa@igel.co.jp> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418106629-22227-1-git-send-email-mukawa@igel.co.jp> References: <1416474399-16851-1-git-send-email-mukawa@igel.co.jp> <1418106629-22227-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 v3 27/28] eal/pci: Remove rte_eal_dev_attach/detach_pdev() and rte_eal_dev_attach/detach_vdev() 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" These functions are wrapped by rte_eal_dev_attach/detach(). So delete these. Signed-off-by: Tetsuya Mukawa --- lib/librte_eal/common/eal_common_dev.c | 8 +++--- lib/librte_eal/common/include/rte_dev.h | 50 --------------------------------- 2 files changed, 4 insertions(+), 54 deletions(-) diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index c9d4894..7481fb7 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -174,7 +174,7 @@ rte_eal_dev_find_and_invoke(const char *name, int type) } /* attach the new physical device, then store port_id of the device */ -int +static int rte_eal_dev_attach_pdev(struct rte_pci_addr *addr, uint8_t *port_id) { uint8_t new_port_id; @@ -203,7 +203,7 @@ err: } /* detach the new physical device, then store pci_addr of the device */ -int +static int rte_eal_dev_detach_pdev(uint8_t port_id, struct rte_pci_addr *addr) { struct rte_pci_addr freed_addr; @@ -252,7 +252,7 @@ get_vdev_name(char *vdevargs) } /* attach the new virtual device, then store port_id of the device */ -int +static int rte_eal_dev_attach_vdev(const char *vdevargs, uint8_t *port_id) { char *args; @@ -294,7 +294,7 @@ err0: } /* detach the new virtual device, then store the name of the device */ -int +static int rte_eal_dev_detach_vdev(uint8_t port_id, char *vdevname) { char name[RTE_ETH_NAME_MAX_LEN]; diff --git a/lib/librte_eal/common/include/rte_dev.h b/lib/librte_eal/common/include/rte_dev.h index 1f8f24a..9da518d 100644 --- a/lib/librte_eal/common/include/rte_dev.h +++ b/lib/librte_eal/common/include/rte_dev.h @@ -102,56 +102,6 @@ void rte_eal_driver_unregister(struct rte_driver *driver); #if defined(RTE_LIBRTE_EAL_HOTPLUG) && defined(RTE_LIBRTE_EAL_LINUXAPP) /** - * Attach a new physical device. - * - * @param addr - * A pointer to a pci address structure describing the new - * device to be attached. - * @param port_id - * A pointer to a port identifier actually attached. - * @return - * 0 on success and port_id is filled, negative on error - */ -int rte_eal_dev_attach_pdev(struct rte_pci_addr *addr, uint8_t *port_id); - -/** - * Attach a new virtual device. - * - * @param vdevargs - * A pointer to a strings array describing the new device - * to be attached. - * @param port_id - * A pointer to a port identifier actually attached. - * @return - * 0 on success and port_id is filled, negative on error - */ -int rte_eal_dev_attach_vdev(const char *vdevargs, uint8_t *port_id); - -/** - * Detach a physical device. - * - * @param port_id - * The port identifier of the physical device to detach. - * @param addr - * A pointer to a pci address structure actually detached. - * @return - * 0 on success and addr is filled, negative on error - */ -int rte_eal_dev_detach_pdev(uint8_t port_id, struct rte_pci_addr *addr); - -/** - * Detach a virtual device. - * - * @param port_id - * The port identifier of the virtual device to detach. - * @param addr - * A pointer to a virtual device name actually detached. - * @return - * 0 on success and vdevname is filled, negative on error - */ -int rte_eal_dev_detach_vdev(uint8_t port_id, char *vdevname); - -/** * Attach a new device. * * @param devargs