From patchwork Mon Sep 26 15:39:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 16121 X-Patchwork-Delegate: ferruh.yigit@amd.com 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 3DE3C68D9; Mon, 26 Sep 2016 17:39:59 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 8942047CD for ; Mon, 26 Sep 2016 17:39:57 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 26 Sep 2016 08:39:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,400,1470726000"; d="scan'208";a="13326369" Received: from sivswdev02.ir.intel.com ([10.237.217.46]) by fmsmga006.fm.intel.com with ESMTP; 26 Sep 2016 08:39:55 -0700 From: Ferruh Yigit To: dev@dpdk.org Cc: Ferruh Yigit Date: Mon, 26 Sep 2016 16:39:20 +0100 Message-Id: <20160926153938.7575-2-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.8.4 In-Reply-To: <20160926153938.7575-1-ferruh.yigit@intel.com> References: <1474043212-15663-1-git-send-email-ferruh.yigit@intel.com> <20160926153938.7575-1-ferruh.yigit@intel.com> Subject: [dpdk-dev] [PATCH v3 01/19] kni: move externs to the header file 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" Signed-off-by: Ferruh Yigit --- v2: keep variable externs in .c file --- lib/librte_eal/linuxapp/kni/kni_dev.h | 11 +++++++++++ lib/librte_eal/linuxapp/kni/kni_misc.c | 14 ++------------ lib/librte_eal/linuxapp/kni/kni_vhost.c | 11 +---------- 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h b/lib/librte_eal/linuxapp/kni/kni_dev.h index 4a4a8e1..9128523 100644 --- a/lib/librte_eal/linuxapp/kni/kni_dev.h +++ b/lib/librte_eal/linuxapp/kni/kni_dev.h @@ -140,6 +140,17 @@ struct kni_vhost_queue { #endif +void kni_net_rx(struct kni_dev *kni); +void kni_net_init(struct net_device *dev); +void kni_net_config_lo_mode(char *lo_str); +void kni_net_poll_resp(struct kni_dev *kni); +void kni_set_ethtool_ops(struct net_device *netdev); + +int ixgbe_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev); +void ixgbe_kni_remove(struct pci_dev *pdev); +int igb_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev); +void igb_kni_remove(struct pci_dev *pdev); + #ifdef RTE_KNI_VHOST_DEBUG_RX #define KNI_DBG_RX(args...) printk(KERN_DEBUG "KNI RX: " args) #else diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c index 47b730c..113fc20 100644 --- a/lib/librte_eal/linuxapp/kni/kni_misc.c +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -48,18 +48,8 @@ MODULE_DESCRIPTION("Kernel Module for managing kni devices"); #define KNI_MAX_DEVICES 32 -extern void kni_net_rx(struct kni_dev *kni); -extern void kni_net_init(struct net_device *dev); -extern void kni_net_config_lo_mode(char *lo_str); -extern void kni_net_poll_resp(struct kni_dev *kni); -extern void kni_set_ethtool_ops(struct net_device *netdev); - -extern int ixgbe_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev); -extern void ixgbe_kni_remove(struct pci_dev *pdev); -extern struct pci_device_id ixgbe_pci_tbl[]; -extern int igb_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev); -extern void igb_kni_remove(struct pci_dev *pdev); -extern struct pci_device_id igb_pci_tbl[]; +extern const struct pci_device_id ixgbe_pci_tbl[]; +extern const struct pci_device_id igb_pci_tbl[]; static int kni_open(struct inode *inode, struct file *file); static int kni_release(struct inode *inode, struct file *file); diff --git a/lib/librte_eal/linuxapp/kni/kni_vhost.c b/lib/librte_eal/linuxapp/kni/kni_vhost.c index a3ca849..7aed96e 100644 --- a/lib/librte_eal/linuxapp/kni/kni_vhost.c +++ b/lib/librte_eal/linuxapp/kni/kni_vhost.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "compat.h" #include "kni_dev.h" @@ -39,17 +40,7 @@ #define RX_BURST_SZ 4 -extern void put_unused_fd(unsigned int fd); - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0) -extern struct file* -sock_alloc_file(struct socket *sock, - int flags, const char *dname); - -extern int get_unused_fd_flags(unsigned flags); - -extern void fd_install(unsigned int fd, struct file *file); - static int kni_sock_map_fd(struct socket *sock) { struct file *file;