From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ferruh.yigit@intel.com>
Received: from mga06.intel.com (mga06.intel.com [134.134.136.31])
 by dpdk.org (Postfix) with ESMTP id C7611568A
 for <dev@dpdk.org>; Thu, 15 Sep 2016 17:46:57 +0200 (CEST)
Received: from fmsmga006.fm.intel.com ([10.253.24.20])
 by orsmga104.jf.intel.com with ESMTP; 15 Sep 2016 08:46:57 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.30,339,1470726000"; 
   d="scan'208";a="8960089"
Received: from sivswdev02.ir.intel.com (HELO localhost.localdomain)
 ([10.237.217.46])
 by fmsmga006.fm.intel.com with ESMTP; 15 Sep 2016 08:46:56 -0700
From: Ferruh Yigit <ferruh.yigit@intel.com>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
 Ferruh Yigit <ferruh.yigit@itnel.com>
Date: Thu, 15 Sep 2016 16:46:27 +0100
Message-Id: <1473954405-7150-2-git-send-email-ferruh.yigit@intel.com>
X-Mailer: git-send-email 1.7.0.7
In-Reply-To: <1473954405-7150-1-git-send-email-ferruh.yigit@intel.com>
References: <1473954405-7150-1-git-send-email-ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH 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 <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Sep 2016 15:46:59 -0000

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 lib/librte_eal/linuxapp/kni/kni_dev.h   | 13 +++++++++++++
 lib/librte_eal/linuxapp/kni/kni_misc.c  | 13 -------------
 lib/librte_eal/linuxapp/kni/kni_vhost.c | 11 +----------
 3 files changed, 14 insertions(+), 23 deletions(-)

diff --git a/lib/librte_eal/linuxapp/kni/kni_dev.h b/lib/librte_eal/linuxapp/kni/kni_dev.h
index a0e5cb6..48e4562 100644
--- a/lib/librte_eal/linuxapp/kni/kni_dev.h
+++ b/lib/librte_eal/linuxapp/kni/kni_dev.h
@@ -134,6 +134,19 @@ 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);
+extern struct pci_device_id *ixgbe_pci_tbl;
+int igb_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev);
+void igb_kni_remove(struct pci_dev *pdev);
+extern struct pci_device_id *igb_pci_tbl;
+
 #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 3501dc1..a046142 100644
--- a/lib/librte_eal/linuxapp/kni/kni_misc.c
+++ b/lib/librte_eal/linuxapp/kni/kni_misc.c
@@ -47,19 +47,6 @@ 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[];
-
 static int kni_open(struct inode *inode, struct file *file);
 static int kni_release(struct inode *inode, struct file *file);
 static int kni_ioctl(struct inode *inode, unsigned int ioctl_num,
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 <linux/sched.h>
 #include <linux/if_tun.h>
 #include <linux/version.h>
+#include <linux/file.h>
 
 #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;
-- 
2.7.4