[qca-nss-drv] Remove the deprecated files and APIs

Remove the deprecated APIs and xxx_tx_rx.c files

Change-Id: I6e1d3570f877e17c1c2907161f3248ed05308ee8
Signed-off-by: Sundarajan Srinivasan <sundaraj@codeaurora.org>
diff --git a/Makefile b/Makefile
index 4c10ba5..4715392 100644
--- a/Makefile
+++ b/Makefile
@@ -42,19 +42,15 @@
 			nss_virt_if.o \
 			nss_shaper.o \
 			nss_pppoe.o \
-			nss_capwap.o
+			nss_capwap.o \
+			nss_eth_rx.o \
+			nss_n2h.o
 
 #
 # TODO: Deprecated files should be removed before merge
 #
 qca-nss-drv-objs += \
-			nss_tx_rx_eth_rx.o \
 			nss_tx_rx_freq.o \
-			nss_tx_rx_generic.o \
-			nss_tx_rx_ipv4.o \
-			nss_tx_rx_ipv6.o \
-			nss_tx_rx_n2h.o \
-			nss_tx_rx_pppoe.o \
 			nss_tx_rx_phys_if.o \
 			nss_tx_rx_virt_if.o
 
diff --git a/capwapmgr/nss_capwapmgr.c b/capwapmgr/nss_capwapmgr.c
index 45a06f9..b7b195d 100644
--- a/capwapmgr/nss_capwapmgr.c
+++ b/capwapmgr/nss_capwapmgr.c
@@ -546,7 +546,7 @@
 {
 	void *ctx;
 
-	ctx = nss_get_ipv4_mgr_ctx();
+	ctx = nss_ipv4_get_mgr();
 	if (!ctx) {
 		nss_capwapmgr_warn("%s: couldn't get IPv4 ctx\n", "CAPWAP");
 		return NSS_TX_FAILURE_NOT_READY;
@@ -667,7 +667,7 @@
 	nss_tx_status_t status;
 	void *ctx;
 
-	ctx = nss_get_ipv4_mgr_ctx();
+	ctx = nss_ipv4_get_mgr();
 	if (!ctx) {
 		nss_capwapmgr_warn("%s couldn't get IPv4 ctx\n", "CAPWAP");
 		return -1;
diff --git a/exports/nss_api_if.h b/exports/nss_api_if.h
index bb44b2e..9723c1d 100644
--- a/exports/nss_api_if.h
+++ b/exports/nss_api_if.h
@@ -677,104 +677,12 @@
 typedef void (*nss_ipv4_callback_t)(struct nss_ipv4_cb_params *nicb);
 
 /**
- * @brief API to get NSS context for IPv4 Connection manager
- *
- */
-extern void *nss_get_ipv4_mgr_ctx(void);
-
-/**
  * @brief Get handle to sending/receiving Frequency messages
  *
  * @return void* NSS context to be provided with every message
  */
 extern void *nss_get_frequency_mgr(void);
 
-
-/**
- * @brief Send IPv4 connection setup rule
- *
- * @param nss_ctx NSS context
- * @param unic Rule parameters
- *
- * @return nss_tx_status_t Tx status
- */
-extern nss_tx_status_t nss_tx_create_ipv4_rule(void *nss_ctx, struct nss_ipv4_create *unic);
-
-/**
- * @brief Send extended IPv4 connection setup rule
- *
- * @param nss_ctx NSS context
- * @param unic Rule parameters
- *
- * @return nss_tx_status_t Tx status
- */
-extern nss_tx_status_t nss_tx_create_ipv4_rule1(void *nss_ctx, struct nss_ipv4_create *unic);
-
-
-/**
- * @brief Send IPv4 connection destroy rule
- *
- * @param nss_ctx NSS context
- * @param unid Rule parameters
- *
- * @return nss_tx_status_t Tx status
- */
-extern nss_tx_status_t nss_tx_destroy_ipv4_rule(void *nss_ctx, struct nss_ipv4_destroy *unid);
-
-/**
- * Methods provided by NSS device driver for use by connection tracking logic for IPv6.
- */
-
-/**
- * Callback for IPv6 sync messages
- */
-typedef void (*nss_ipv6_callback_t)(struct nss_ipv6_cb_params *nicb);
-
-/**
- * @brief Register for sending/receiving IPv6 messages
- *
- * @param event_callback Callback
- *
- * @return void* NSS context to be provided with every message
- */
-extern void *nss_register_ipv6_mgr(nss_ipv6_callback_t event_callback);
-
-/**
- * @brief Unregister for sending/receiving IPv4 messages
- */
-extern void nss_unregister_ipv6_mgr(void);
-
-/**
- * @brief Send IPv6 connection setup rule
- *
- * @param nss_ctx NSS context
- * @param unic Rule parameters
- *
- * @return nss_tx_status_t Tx status
- */
-extern nss_tx_status_t nss_tx_create_ipv6_rule(void *nss_ctx, struct nss_ipv6_create *unic);
-
-/**
- * @brief Send extended IPv6 connection setup rule
- *
- * @param nss_ctx NSS context
- * @param unic Rule parameters
- *
- * @return nss_tx_status_t Tx status
- */
-extern nss_tx_status_t nss_tx_create_ipv6_rule1(void *nss_ctx, struct nss_ipv6_create *unic);
-
-
-/**
- * @brief Send IPv6 connection destroy rule
- *
- * @param nss_ctx NSS context
- * @param unid Rule parameters
- *
- * @return nss_tx_status_t Tx status
- */
-extern nss_tx_status_t nss_tx_destroy_ipv6_rule(void *nss_ctx, struct nss_ipv6_destroy *unid);
-
 /**
  * Methods provided by NSS device driver for use by GMAC driver
  */
@@ -962,25 +870,6 @@
  */
 extern nss_tx_status_t nss_tx_virt_if_rxbuf(void *nss_ctx, struct sk_buff *os_buf);
 
-/**
- * @brief Send generic interface based command to NSS
- *
- * @param nss_ctx NSS context
- * @param if_num NSS interface to deliver this message
- * @param buf Buffer to send to NSS
- * @param len Length of buffer
- *
- * @return nss_tx_status_t Tx status
- *
- * @note Valid context must be provided (for the right core).
- *	This context was returned during registration.
- */
-extern nss_tx_status_t nss_tx_generic_if_buf(void *nss_ctx, uint32_t if_num, uint8_t *buf, uint32_t len);
-
-/**
- * Methods provided by NSS driver for use by 6rd tunnel
- */
-
 /*
  * @brief NSS Frequency Change
  * @ param ctx NSS context
@@ -1019,20 +908,6 @@
 extern nss_pm_interface_status_t nss_pm_set_perf_level(void *handle, nss_pm_perf_level_t lvl);
 
 /**
- * @brief Register for sending/receiving IPv4 messages
- *
- * @param event_callback Event callback
- *
- * @return void* NSS context to be provided with every message
- */
-extern void *nss_register_ipv4_mgr(nss_ipv4_callback_t event_callback);
-
-/**
- * @brief Unregister for sending/receiving IPv4 messages
- */
-extern void nss_unregister_ipv4_mgr(void);
-
-/**
  * @brief Get NSS state
  *
  * @param nss_ctx NSS context
diff --git a/exports/nss_phys_if.h b/exports/nss_phys_if.h
index 69ce6c4..e198b14 100644
--- a/exports/nss_phys_if.h
+++ b/exports/nss_phys_if.h
@@ -216,4 +216,59 @@
  */
 extern nss_tx_status_t nss_phys_if_tx_eth_rxbuf(int32_t if_num, struct sk_buff *skb);
 
+/**
+ * @brief Open GMAC interface on NSS
+ *
+ * @param nss_ctx NSS context
+ * @param tx_desc_ring Tx descriptor ring address
+ * @param rx_desc_ring Rx descriptor ring address
+ * @param if_num GMAC i/f number
+ *
+ * @return nss_tx_status_t Tx status
+ */
+extern nss_tx_status_t nss_phys_if_tx_open(struct nss_ctx_instance *nss_ctx, uint32_t tx_desc_ring, uint32_t rx_desc_ring, uint32_t if_num);
+
+/**
+ * @brief Close GMAC interface on NSS
+ *
+ * @param nss_ctx NSS context
+ * @param if_num GMAC i/f number
+ *
+ * @return nss_tx_status_t Tx status
+ */
+extern nss_tx_status_t nss_phys_if_tx_close(struct nss_ctx_instance *nss_ctx, uint32_t if_num);
+
+/**
+ * @brief Send link state message to NSS
+ *
+ * @param nss_ctx NSS context
+ * @param link_state Link state
+ * @param if_num GMAC i/f number
+ *
+ * @return nss_tx_status_t Tx status
+ */
+extern nss_tx_status_t nss_phys_if_tx_link_state(struct nss_ctx_instance *nss_ctx, uint32_t link_state, uint32_t if_num);
+
+/**
+ * @brief Send MAC address to NSS
+ *
+ * @param nss_ctx NSS context
+ * @param addr MAC address pointer
+ * @param if_num GMAC i/f number
+ *
+ * @return nss_tx_status_t Tx status
+ */
+extern nss_tx_status_t nss_phys_if_tx_mac_addr(struct nss_ctx_instance *nss_ctx, uint8_t *addr, uint32_t if_num);
+
+/**
+ * @brief Send MTU change notification to NSS
+ *
+ * @param nss_ctx NSS context
+ * @param mtu MTU
+ * @param if_num GMAC i/f number
+ *
+ * @return nss_tx_status_t Tx status
+ */
+extern nss_tx_status_t nss_phys_if_tx_change_mtu(struct nss_ctx_instance *nss_ctx, uint32_t mtu, uint32_t if_num);
+
 #endif /* __NSS_PHYS_IF_H */
diff --git a/nss_tx_rx_eth_rx.c b/nss_eth_rx.c
similarity index 82%
rename from nss_tx_rx_eth_rx.c
rename to nss_eth_rx.c
index 129060f..bc434f5 100644
--- a/nss_tx_rx_eth_rx.c
+++ b/nss_eth_rx.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -15,7 +15,7 @@
  */
 
 /*
- * nss_tx_rx_eth_rx.c
+ * nss_eth_rx.c
  *	NSS ETH_RX APIs
  */
 
@@ -28,10 +28,10 @@
  */
 
 /*
- * nss_rx_metadata_eth_rx_node_stats_sync()
+ * nss_eth_rx_metadata_stats_sync()
  *	Handle the syncing of PPPoE node statistics.
  */
-static void nss_rx_metadata_eth_rx_stats_sync(struct nss_ctx_instance *nss_ctx, struct nss_eth_rx_node_sync *nens)
+static void nss_eth_rx_metadata_stats_sync(struct nss_ctx_instance *nss_ctx, struct nss_eth_rx_node_sync *nens)
 {
 	int32_t i;
 	struct nss_top_instance *nss_top = nss_ctx->nss_top;
@@ -56,10 +56,10 @@
 }
 
 /*
- * nss_rx_eth_rx_interface_handler()
+ * nss_eth_rx_interface_handler()
  *	Handle NSS -> HLOS messages for ETH_RX node
  */
-static void nss_rx_eth_rx_interface_handler(struct nss_ctx_instance *nss_ctx, struct nss_cmn_msg *ncm, __attribute__((unused))void *app_data)
+static void nss_eth_rx_interface_handler(struct nss_ctx_instance *nss_ctx, struct nss_cmn_msg *ncm, __attribute__((unused))void *app_data)
 {
 	struct nss_eth_rx_msg *nem = (struct nss_eth_rx_msg *)ncm;
 
@@ -73,7 +73,7 @@
 
 	switch (nem->cm.type) {
 	case NSS_RX_METADATA_TYPE_ETH_RX_STATS_SYNC:
-		nss_rx_metadata_eth_rx_stats_sync(nss_ctx, &nem->msg.node_sync);
+		nss_eth_rx_metadata_stats_sync(nss_ctx, &nem->msg.node_sync);
 		break;
 
 	default:
@@ -92,5 +92,5 @@
  */
 void nss_eth_rx_register_handler()
 {
-	nss_core_register_handler(NSS_ETH_RX_INTERFACE, nss_rx_eth_rx_interface_handler, NULL);
+	nss_core_register_handler(NSS_ETH_RX_INTERFACE, nss_eth_rx_interface_handler, NULL);
 }
diff --git a/nss_init.c b/nss_init.c
index 70a4235..3c8c991 100755
--- a/nss_init.c
+++ b/nss_init.c
@@ -756,7 +756,7 @@
 	if (!ret) {
 		if ((write) && (nss_rps_cfg == 1)) {
 			printk("Enabling NSS RPS\n");
-			nss_n2h_rps_configure(nss_ctx, 1);
+			nss_n2h_tx(nss_ctx, 1);
 			return ret;
 		}
 
diff --git a/nss_ipv4.c b/nss_ipv4.c
index d7699d8..f59caeb 100644
--- a/nss_ipv4.c
+++ b/nss_ipv4.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -22,11 +22,6 @@
 #include <linux/ppp_channel.h>
 #include "nss_tx_rx_common.h"
 
-
-extern void nss_rx_metadata_ipv4_rule_establish(struct nss_ctx_instance *nss_ctx, struct nss_ipv4_rule_establish *nire);
-extern void nss_rx_metadata_ipv4_create_response(struct nss_ctx_instance *nss_ctx, struct nss_ipv4_msg *nim);
-extern void nss_rx_ipv4_sync(struct nss_ctx_instance *nss_ctx, struct nss_ipv4_conn_sync *nirs);
-
 int nss_ipv4_conn_cfg __read_mostly = NSS_DEFAULT_NUM_CONN;
 static struct  nss_conn_cfg_pvt i4cfgp;
 
@@ -135,14 +130,7 @@
 	 */
 	nss_core_log_msg_failures(nss_ctx, ncm);
 
-	/*
-	 * Handle deprecated messages.  Eventually these messages should be removed.
-	 */
 	switch (nim->cm.type) {
-	case NSS_IPV4_RX_ESTABLISH_RULE_MSG:
-		return nss_rx_metadata_ipv4_rule_establish(nss_ctx, &nim->msg.rule_establish);
-		break;
-
 	case NSS_IPV4_RX_NODE_STATS_SYNC_MSG:
 		/*
 		* Update driver statistics on node sync.
@@ -155,11 +143,6 @@
 		 * Update driver statistics on connection sync.
 		 */
 		nss_ipv4_driver_conn_sync_update(nss_ctx, &nim->msg.conn_stats);
-		nss_rx_ipv4_sync(nss_ctx, &nim->msg.conn_stats);
-		break;
-
-	case NSS_IPV4_TX_CREATE_RULE_MSG:
-		nss_rx_metadata_ipv4_create_response(nss_ctx, nim);
 		break;
 	}
 
diff --git a/nss_ipv6.c b/nss_ipv6.c
index 93ba169..c722b80 100644
--- a/nss_ipv6.c
+++ b/nss_ipv6.c
@@ -21,10 +21,6 @@
 #include <linux/ppp_channel.h>
 #include "nss_tx_rx_common.h"
 
-extern void nss_rx_metadata_ipv6_rule_establish(struct nss_ctx_instance *nss_ctx, struct nss_ipv6_rule_establish *nire);
-extern void nss_rx_metadata_ipv6_create_response(struct nss_ctx_instance *nss_ctx, struct nss_ipv6_msg *nim);
-extern void nss_rx_ipv6_sync(struct nss_ctx_instance *nss_ctx, struct nss_ipv6_conn_sync *nirs);
-
 int nss_ipv6_conn_cfg __read_mostly = NSS_DEFAULT_NUM_CONN;
 static struct  nss_conn_cfg_pvt i6cfgp;
 
@@ -137,10 +133,6 @@
 	 * Handle deprecated messages.  Eventually these messages should be removed.
 	 */
 	switch (nim->cm.type) {
-	case NSS_IPV6_RX_ESTABLISH_RULE_MSG:
-		nss_rx_metadata_ipv6_rule_establish(nss_ctx, &nim->msg.rule_establish);
-		break;
-
 	case NSS_IPV6_RX_NODE_STATS_SYNC_MSG:
 		/*
 		* Update driver statistics on node sync.
@@ -153,11 +145,6 @@
 		 * Update driver statistics on connection sync.
 		 */
 		nss_ipv6_driver_conn_sync_update(nss_ctx, &nim->msg.conn_stats);
-		nss_rx_ipv6_sync(nss_ctx, &nim->msg.conn_stats);
-		break;
-
-	case NSS_IPV6_TX_CREATE_RULE_MSG:
-		nss_rx_metadata_ipv6_create_response(nss_ctx, nim);
 		break;
 	}
 
diff --git a/nss_tx_rx_n2h.c b/nss_n2h.c
similarity index 84%
rename from nss_tx_rx_n2h.c
rename to nss_n2h.c
index 4dcd84c..bb725ee 100755
--- a/nss_tx_rx_n2h.c
+++ b/nss_n2h.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -15,30 +15,27 @@
  */
 
 /*
- * nss_tx_rx_n2h.c
+ * nss_n2h.c
  *	NSS N2H node APIs
  */
 
 #include "nss_tx_rx_common.h"
 
-/*
- **********************************
- Tx APIs
- **********************************
- */
+#define NSS_N2H_TIMEOUT 5*HZ
+
+wait_queue_head_t nss_n2h_wq;
 
 /*
- * nss_n2h_rps_configure()
+ * nss_n2h_tx()
  *	Send Message to NSS to enable RPS.
  *
  * This API could be used for any additional RPS related
  * configuration in future.
  */
-nss_tx_status_t nss_n2h_rps_configure(void *ctx, uint32_t enable_rps) {
-
-	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *) ctx;
+nss_tx_status_t nss_n2h_tx(struct nss_ctx_instance *nss_ctx, uint32_t enable_rps)
+{
 	struct sk_buff *nbuf;
-	int32_t status;
+	nss_tx_status_t status;
 	struct nss_n2h_msg *nnhm;
 	struct nss_n2h_rps *rps_cfg;
 
@@ -81,16 +78,10 @@
 }
 
 /*
- **********************************
- Rx APIs
- **********************************
- */
-
-/*
- * nss_rx_metadata_n2h_stats_sync()
+ * nss_n2h_stats_sync()
  *	Handle the syncing of NSS statistics.
  */
-static void nss_rx_metadata_n2h_stats_sync(struct nss_ctx_instance *nss_ctx, struct nss_n2h_stats_sync *nnss)
+static void nss_n2h_stats_sync(struct nss_ctx_instance *nss_ctx, struct nss_n2h_stats_sync *nnss)
 {
 	struct nss_top_instance *nss_top = nss_ctx->nss_top;
 
@@ -133,13 +124,15 @@
 }
 
 /*
- * nss_rx_n2h_interface_handler()
+ * nss_n2h_interface_handler()
  *	Handle NSS -> HLOS messages for N2H node
  */
-static void nss_rx_n2h_interface_handler(struct nss_ctx_instance *nss_ctx, struct nss_cmn_msg *ncm, __attribute__((unused))void *app_data)
+static void nss_n2h_interface_handler(struct nss_ctx_instance *nss_ctx, struct nss_cmn_msg *ncm, __attribute__((unused))void *app_data)
 {
 	struct nss_n2h_msg *nnm = (struct nss_n2h_msg *)ncm;
 
+	BUG_ON(ncm->interface != NSS_N2H_INTERFACE);
+
 	/*
 	 * Is this a valid request/response packet?
 	 */
@@ -152,10 +145,12 @@
 	case NSS_TX_METADATA_TYPE_N2H_RPS_CFG:
 		nss_ctx->n2h_rps_en = nnm->msg.rps_cfg.enable;
 		nss_info("NSS N2H rps_en %d \n",nnm->msg.rps_cfg.enable);
+		wake_up(&nss_n2h_wq);
 		break;
 
 	case NSS_RX_METADATA_TYPE_N2H_STATS_SYNC:
-		nss_rx_metadata_n2h_stats_sync(nss_ctx, &nnm->msg.stats_sync);
+		nss_n2h_stats_sync(nss_ctx, &nnm->msg.stats_sync);
+		wake_up(&nss_n2h_wq);
 		break;
 
 	default:
@@ -174,5 +169,10 @@
  */
 void nss_n2h_register_handler()
 {
-	nss_core_register_handler(NSS_N2H_INTERFACE, nss_rx_n2h_interface_handler, NULL);
+	nss_core_register_handler(NSS_N2H_INTERFACE, nss_n2h_interface_handler, NULL);
+
+	/*
+	 * Initialize wait queue
+	 */
+	init_waitqueue_head(&nss_n2h_wq);
 }
diff --git a/nss_pppoe.c b/nss_pppoe.c
index 6cbee89..12ff1e7 100644
--- a/nss_pppoe.c
+++ b/nss_pppoe.c
@@ -1,6 +1,6 @@
 /*
  **************************************************************************
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, The Linux Foundation. All rights reserved.
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
  * above copyright notice and this permission notice appear in all copies.
@@ -22,14 +22,6 @@
 #include "nss_tx_rx_common.h"
 #include <linux/ppp_channel.h>
 
-extern void nss_tx_destroy_pppoe_connection_rule(void *ctx, uint16_t pppoe_session_id, uint8_t *pppoe_remote_mac);
-
-/*
- **********************************
- Tx APIs
- **********************************
- */
-
 /*
  * nss_pppoe_tx()
  *	Transmit an PPPoe message to the FW.
@@ -190,6 +182,45 @@
 }
 
 /*
+ * nss_pppoe_destroy_connection_rule()
+ * Destroy PPoE connection rule associated with the session ID and remote server MAC address.
+ */
+
+/*
+ * TODO: This API should be deprecated soon and removed.
+ */
+static void nss_pppoe_destroy_connection_rule(void *ctx, uint16_t pppoe_session_id, uint8_t *pppoe_remote_mac)
+{
+	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *) ctx;
+	struct nss_pppoe_msg npm;
+	struct nss_pppoe_rule_destroy_msg *nprd;
+	uint16_t *pppoe_remote_mac_uint16_t = (uint16_t *)pppoe_remote_mac;
+	int32_t status;
+
+	/*
+	 * TODO Remove this function once linux kernel directly calls nss_pppoe_tx()
+	 */
+	nss_info("%p: Destroy all PPPoE rules of session ID: %x remote MAC: %x:%x:%x:%x:%x:%x", nss_ctx, pppoe_session_id,
+			pppoe_remote_mac[0], pppoe_remote_mac[1], pppoe_remote_mac[2],
+			pppoe_remote_mac[3], pppoe_remote_mac[4], pppoe_remote_mac[5]);
+
+	nss_cmn_msg_init(&npm.cm, NSS_PPPOE_RX_INTERFACE, NSS_PPPOE_TX_CONN_RULE_DESTROY,
+			sizeof(struct nss_pppoe_rule_destroy_msg), NULL, NULL);
+
+	nprd = &npm.msg.pppoe_rule_destroy;
+
+	nprd->pppoe_session_id = pppoe_session_id;
+	nprd->pppoe_remote_mac[0] = pppoe_remote_mac_uint16_t[0];
+	nprd->pppoe_remote_mac[1] = pppoe_remote_mac_uint16_t[1];
+	nprd->pppoe_remote_mac[2] = pppoe_remote_mac_uint16_t[2];
+
+	status = nss_pppoe_tx(nss_ctx, &npm);
+	if (status != NSS_TX_SUCCESS) {
+		nss_warning("%p: Not able to send destroy pppoe rule msg to NSS %x\n", nss_ctx, status);
+	}
+}
+
+/*
  * nss_pppoe_rule_create_success()
  *	Handle the PPPoE rule create success message.
  */
@@ -208,7 +239,7 @@
 	/*
 	 * TODO Remove this registration once kernel directly calls nss_pppoe_tx().
 	 */
-	if (!ppp_register_destroy_method(ppp_dev, nss_tx_destroy_pppoe_connection_rule, (void *)nss_ctx)) {
+	if (!ppp_register_destroy_method(ppp_dev, nss_pppoe_destroy_connection_rule, (void *)nss_ctx)) {
 		nss_warning("%p: Failed to register destroy method", nss_ctx);
 	}
 
@@ -278,4 +309,3 @@
 {
 	nss_core_register_handler(NSS_PPPOE_RX_INTERFACE, nss_pppoe_rx_msg_handler, NULL);
 }
-
diff --git a/nss_tx_rx_common.h b/nss_tx_rx_common.h
index a056d7f..bb3597f 100644
--- a/nss_tx_rx_common.h
+++ b/nss_tx_rx_common.h
@@ -89,9 +89,9 @@
 		__attribute__((unused))void *app_data);
 
 /*
- * nss_n2h_rps_configure()
+ * nss_n2h_tx()
  * 	API to enable/disable Host RPS support in NSS
  */
-extern nss_tx_status_t nss_n2h_rps_configure(void *ctx, uint32_t enable_rps);
+extern nss_tx_status_t nss_n2h_tx(struct nss_ctx_instance *nss_ctx, uint32_t enable_rps);
 
 #endif /* __NSS_TX_RX_COMMON_H */
diff --git a/nss_tx_rx_generic.c b/nss_tx_rx_generic.c
deleted file mode 100644
index 48160ad..0000000
--- a/nss_tx_rx_generic.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- **************************************************************************
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all copies.
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- **************************************************************************
- */
-
-/*
- * nss_tx_rx_generic.c
- *	NSS generic APIs
- */
-
-#include "nss_tx_rx_common.h"
-
-/*
- * nss_tx_generic_if_buf()
- *	NSS Generic rule Tx API
- */
-nss_tx_status_t nss_tx_generic_if_buf(void *ctx, uint32_t if_num, uint8_t *buf, uint32_t len)
-{
-	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *)ctx;
-	struct sk_buff *nbuf;
-	int32_t status;
-	struct nss_generic_msg *ngm;
-	struct nss_generic_if_params *ngip;
-
-	nss_trace("%p: Generic If Tx, interface = %d, buf=%p", nss_ctx, if_num, buf);
-
-	NSS_VERIFY_CTX_MAGIC(nss_ctx);
-	if (unlikely(nss_ctx->state != NSS_CORE_STATE_INITIALIZED)) {
-		nss_warning("%p: 'Generic If Tx' rule dropped as core not ready", nss_ctx);
-		return NSS_TX_FAILURE_NOT_READY;
-	}
-
-	if (NSS_NBUF_PAYLOAD_SIZE < (len + sizeof(uint32_t) + sizeof(struct nss_generic_if_params))) {
-		return NSS_TX_FAILURE_TOO_LARGE;
-	}
-
-	nbuf = dev_alloc_skb(NSS_NBUF_PAYLOAD_SIZE);
-	if (unlikely(!nbuf)) {
-		spin_lock_bh(&nss_ctx->nss_top->stats_lock);
-		nss_ctx->nss_top->stats_drv[NSS_STATS_DRV_NBUF_ALLOC_FAILS]++;
-		spin_unlock_bh(&nss_ctx->nss_top->stats_lock);
-		nss_warning("%p: 'Generic If Tx' rule dropped as command allocation failed", nss_ctx);
-		return NSS_TX_FAILURE;
-	}
-
-	ngm = (struct nss_generic_msg *)skb_put(nbuf, sizeof(struct nss_generic_msg) + len);
-	ngm->cm.interface = if_num;
-	ngm->cm.version = NSS_HLOS_MESSAGE_VERSION;
-	ngm->cm.type = NSS_TX_METADATA_TYPE_GENERIC_IF_PARAMS;
-	ngm->cm.len = sizeof(struct nss_generic_if_params) + (len - 1);
-
-	ngip = &ngm->msg.rule;
-	memcpy(ngip->buf, buf, len);
-
-	status = nss_core_send_buffer(nss_ctx, 0, nbuf, NSS_IF_CMD_QUEUE, H2N_BUFFER_CTRL, 0);
-	if (status != NSS_CORE_STATUS_SUCCESS) {
-		dev_kfree_skb_any(nbuf);
-		nss_warning("%p: Unable to enqueue 'Generic If Tx' rule\n", nss_ctx);
-		return NSS_TX_FAILURE;
-	}
-
-	nss_hal_send_interrupt(nss_ctx->nmap, nss_ctx->h2n_desc_rings[NSS_IF_CMD_QUEUE].desc_ring.int_bit,
-								NSS_REGS_H2N_INTR_STATUS_DATA_COMMAND_QUEUE);
-
-	NSS_PKT_STATS_INCREMENT(nss_ctx, &nss_ctx->nss_top->stats_drv[NSS_STATS_DRV_TX_CMD_REQ]);
-	return NSS_TX_SUCCESS;
-}
-
-EXPORT_SYMBOL(nss_tx_generic_if_buf);
diff --git a/nss_tx_rx_ipv4.c b/nss_tx_rx_ipv4.c
deleted file mode 100644
index 698ac65..0000000
--- a/nss_tx_rx_ipv4.c
+++ /dev/null
@@ -1,483 +0,0 @@
-/*
- **************************************************************************
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all copies.
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- **************************************************************************
- */
-
-/*
- * nss_tx_rx_ipv4.c
- *	NSS IPv4 APIs
- */
-
-#include <linux/ppp_channel.h>
-#include "nss_tx_rx_common.h"
-
-/*
- * Depreceated callback maintained locally.
- */
-nss_ipv4_callback_t nss_tx_rx_ipv4_event_callback = NULL;
-
-/*
- * TOOD: When we remove this backward compat layer, clean up nss_ipv4.c
- */
-extern void nss_ipv4_driver_conn_sync_update(struct nss_ctx_instance *nss_ctx, struct nss_ipv4_conn_sync *nirs);
-
-/*
- * nss_rx_ipv4_sync()
- *	Handle the syncing of an IPv4 node.
- */
-void nss_rx_ipv4_sync(struct nss_ctx_instance *nss_ctx, struct nss_ipv4_conn_sync *nirs)
-{
-	struct nss_ipv4_cb_params nicp;
-
-	nicp.reason = NSS_IPV4_CB_REASON_SYNC;
-	nicp.params.sync.index = nirs->index;
-	nicp.params.sync.protocol = (int32_t)nirs->protocol;
-	nicp.params.sync.src_ip = nirs->flow_ip;
-	nicp.params.sync.src_ip_xlate = nirs->flow_ip_xlate;
-	nicp.params.sync.src_port = nirs->flow_ident;
-	nicp.params.sync.src_port_xlate = nirs->flow_ident_xlate;
-	nicp.params.sync.flow_max_window = nirs->flow_max_window;
-	nicp.params.sync.flow_end = nirs->flow_end;
-	nicp.params.sync.flow_max_end = nirs->flow_max_end;
-	nicp.params.sync.flow_rx_packet_count = nirs->flow_rx_packet_count;
-	nicp.params.sync.flow_rx_byte_count = nirs->flow_rx_byte_count;
-	nicp.params.sync.flow_tx_packet_count = nirs->flow_tx_packet_count;
-	nicp.params.sync.flow_tx_byte_count = nirs->flow_tx_byte_count;
-	nicp.params.sync.dest_ip = nirs->return_ip;
-	nicp.params.sync.dest_ip_xlate = nirs->return_ip_xlate;
-	nicp.params.sync.dest_port = nirs->return_ident;
-	nicp.params.sync.dest_port_xlate = nirs->return_ident_xlate;
-	nicp.params.sync.return_max_window = nirs->return_max_window;
-	nicp.params.sync.return_end = nirs->return_end;
-	nicp.params.sync.return_max_end = nirs->return_max_end;
-	nicp.params.sync.return_rx_packet_count = nirs->return_rx_packet_count;
-	nicp.params.sync.return_rx_byte_count = nirs->return_rx_byte_count;
-	nicp.params.sync.return_tx_packet_count = nirs->return_tx_packet_count;
-	nicp.params.sync.return_tx_byte_count = nirs->return_tx_byte_count;
-
-	nicp.params.sync.qos_tag = nirs->qos_tag;
-
-	nicp.params.sync.flags = 0;
-	if (nirs->flags & NSS_IPV4_RULE_CREATE_FLAG_NO_SEQ_CHECK) {
-		nicp.params.sync.flags |= NSS_IPV4_CREATE_FLAG_NO_SEQ_CHECK;
-	}
-
-	if (nirs->flags & NSS_IPV4_RULE_CREATE_FLAG_BRIDGE_FLOW) {
-		nicp.params.sync.flags |= NSS_IPV4_CREATE_FLAG_BRIDGE_FLOW;
-	}
-
-	if (nirs->flags & NSS_IPV4_RULE_CREATE_FLAG_ROUTED) {
-		nicp.params.sync.flags |= NSS_IPV4_CREATE_FLAG_ROUTED;
-	}
-
-	switch (nirs->reason) {
-	case NSS_IPV4_RULE_SYNC_REASON_STATS:
-		nicp.params.sync.reason = NSS_IPV4_SYNC_REASON_STATS;
-		break;
-
-	case NSS_IPV4_RULE_SYNC_REASON_FLUSH:
-		nicp.params.sync.reason = NSS_IPV4_SYNC_REASON_FLUSH;
-		break;
-
-	case NSS_IPV4_RULE_SYNC_REASON_EVICT:
-		nicp.params.sync.reason = NSS_IPV4_SYNC_REASON_EVICT;
-		break;
-
-	case NSS_IPV4_RULE_SYNC_REASON_DESTROY:
-		nicp.params.sync.reason = NSS_IPV4_SYNC_REASON_DESTROY;
-		break;
-
-	default:
-		nss_warning("Bad ipv4 sync reason: %d\n", nirs->reason);
-		return;
-	}
-
-	/*
-	 * Convert ms ticks from the NSS to jiffies.  We know that inc_ticks is small
-	 * and we expect HZ to be small too so we can multiply without worrying about
-	 * wrap-around problems.  We add a rounding constant to ensure that the different
-	 * time bases don't cause truncation errors.
-	 */
-	nss_assert(HZ <= 100000);
-	nicp.params.sync.delta_jiffies = ((nirs->inc_ticks * HZ) + (MSEC_PER_SEC / 2)) / MSEC_PER_SEC;
-
-	/*
-	 * Call IPv4 manager callback function
-	 */
-	if (!nss_tx_rx_ipv4_event_callback) {
-		nss_info("%p: IPV4 sync message received before connection manager has registered", nss_ctx);
-	} else {
-		nss_ipv4_callback_t cb = nss_tx_rx_ipv4_event_callback;
-		cb(&nicp);
-	}
-}
-
-/*
- * nss_rx_metadata_ipv4_rule_establish()
- *	Handle the establishment of an IPv4 rule.
- */
-void nss_rx_metadata_ipv4_rule_establish(struct nss_ctx_instance *nss_ctx, struct nss_ipv4_rule_establish *nire)
-{
-	struct nss_ipv4_cb_params nicp;
-	nss_ipv4_callback_t cb;
-
-	// GGG FIXME THIS SHOULD NOT BE A MEMCPY
-	nicp.reason = NSS_IPV4_CB_REASON_ESTABLISH;
-	memcpy(&nicp.params, nire, sizeof(struct nss_ipv4_establish));
-
-	/*
-	 * Call IPv4 manager callback function
-	 */
-	if (!nss_tx_rx_ipv4_event_callback) {
-		nss_info("%p: IPV4 establish message received before connection manager has registered", nss_ctx);
-		return;
-	}
-	cb = nss_tx_rx_ipv4_event_callback;
-	cb(&nicp);
-	nss_info("%p: Establish message - Index: %d\n", nss_ctx, nire->index);
-}
-
-/*
- * nss_rx_metadata_ipv4_create_response()
- *	Handle the ACK/NACK for IPv4 create rule.
- */
-void nss_rx_metadata_ipv4_create_response(struct nss_ctx_instance *nss_ctx, struct nss_ipv4_msg *nim)
-{
-	struct nss_ipv4_cb_params nicp;
-	nss_ipv4_callback_t cb;
-	struct nss_ipv4_rule_create_msg *nircm;
-	struct nss_ipv4_establish *nie;
-
-	if (nim->cm.response == NSS_CMN_RESPONSE_ACK) {
-		return;
-	}
-
-	nicp.reason = NSS_IPV4_CB_REASON_ESTABLISH_FAIL;
-
-	nircm = &nim->msg.rule_create;
-	nie = &nicp.params.establish;
-
-	nie->protocol = nircm->tuple.protocol;
-	nie->flow_ip = nircm->tuple.flow_ip;
-	nie->flow_ip_xlate = nircm->conn_rule.flow_ip_xlate;
-	nie->flow_ident = nircm->tuple.flow_ident;
-	nie->flow_ident_xlate = nircm->conn_rule.flow_ident_xlate;
-	nie->return_ip = nircm->tuple.return_ip;
-	nie->return_ip_xlate = nircm->conn_rule.return_ip_xlate;
-	nie->return_ident = nircm->tuple.return_ident;
-	nie->return_ident_xlate = nircm->conn_rule.return_ident_xlate;
-
-	/*
-	 * Call IPv4 manager callback function
-	 */
-	if (!nss_tx_rx_ipv4_event_callback) {
-		nss_info("%p: IPV4 create response message received before connection manager has registered", nss_ctx);
-		return;
-	}
-	cb = nss_tx_rx_ipv4_event_callback;
-	cb(&nicp);
-}
-
-/*
- * nss_tx_create_ipv4_rule()
- *	Create a nss entry to accelerate the given connection
- */
-nss_tx_status_t nss_tx_create_ipv4_rule(void *ctx, struct nss_ipv4_create *unic)
-{
-	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *) ctx;
-	struct nss_ipv4_msg nim;
-	struct nss_ipv4_rule_create_msg *nircm;
-
-	nss_info("%p: Create IPv4: %pI4h:%d (%pI4h:%d), %pI4h:%d (%pI4h:%d), p: %d\n", nss_ctx,
-		&unic->src_ip, ntohs(unic->src_port), &unic->src_ip_xlate, ntohs(unic->src_port_xlate),
-		&unic->dest_ip, ntohs(unic->dest_port), &unic->dest_ip_xlate, ntohs(unic->dest_port_xlate),
-		unic->protocol);
-
-	nss_cmn_msg_init(&nim.cm, NSS_IPV4_RX_INTERFACE, NSS_IPV4_TX_CREATE_RULE_MSG,
-			sizeof(struct nss_ipv4_rule_create_msg), NULL, NULL);
-
-	nircm = &nim.msg.rule_create;
-	nircm->valid_flags = 0;
-	nircm->rule_flags = 0;
-
-	/*
-	 * Copy over the 5 tuple details.
-	 */
-	nircm->tuple.protocol = (uint8_t)unic->protocol;
-	nircm->tuple.flow_ip = unic->src_ip;
-	nircm->tuple.flow_ident = (uint32_t)unic->src_port;
-	nircm->tuple.return_ip = unic->dest_ip;
-	nircm->tuple.return_ident = (uint32_t)unic->dest_port;
-
-	/*
-	 * Copy over the connection rules and set the CONN_VALID flag
-	 */
-	nircm->conn_rule.flow_interface_num = unic->src_interface_num;
-	nircm->conn_rule.flow_mtu = unic->from_mtu;
-	nircm->conn_rule.flow_ip_xlate = unic->src_ip_xlate;
-	nircm->conn_rule.flow_ident_xlate = (uint32_t)unic->src_port_xlate;
-	memcpy(nircm->conn_rule.flow_mac, unic->src_mac, 6);
-	nircm->conn_rule.return_interface_num = unic->dest_interface_num;
-	nircm->conn_rule.return_mtu = unic->to_mtu;
-	nircm->conn_rule.return_ip_xlate = unic->dest_ip_xlate;
-	nircm->conn_rule.return_ident_xlate = (uint32_t)unic->dest_port_xlate;
-	if (nircm->tuple.return_ip != nircm->conn_rule.return_ip_xlate || nircm->tuple.return_ident != nircm->conn_rule.return_ident_xlate) {
-		memcpy(nircm->conn_rule.return_mac, unic->dest_mac_xlate, 6);
-	} else {
-		memcpy(nircm->conn_rule.return_mac, unic->dest_mac, 6);
-	}
-
-	/*
-	 * Copy over the DSCP rule parameters
-	 */
-	nircm->dscp_rule.flow_dscp = unic->flow_dscp;
-	nircm->dscp_rule.return_dscp = unic->return_dscp;
-	if (unic->flags & NSS_IPV4_CREATE_FLAG_DSCP_MARKING) {
-		nircm->rule_flags |= NSS_IPV4_RULE_CREATE_FLAG_DSCP_MARKING;
-		nircm->valid_flags |= NSS_IPV4_RULE_CREATE_DSCP_MARKING_VALID;
-	}
-
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_CONN_VALID;
-
-	/*
-	 * Copy over the pppoe rules and set the PPPOE_VALID flag.
-	 */
-	nircm->pppoe_rule.flow_pppoe_session_id = unic->flow_pppoe_session_id;
-	memcpy(nircm->pppoe_rule.flow_pppoe_remote_mac, unic->flow_pppoe_remote_mac, ETH_ALEN);
-	nircm->pppoe_rule.return_pppoe_session_id = unic->return_pppoe_session_id;
-	memcpy(nircm->pppoe_rule.return_pppoe_remote_mac, unic->return_pppoe_remote_mac, ETH_ALEN);
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_PPPOE_VALID;
-
-	/*
-	 * Copy over the tcp rules and set the TCP_VALID flag.
-	 */
-	nircm->tcp_rule.flow_window_scale = unic->flow_window_scale;
-	nircm->tcp_rule.flow_max_window = unic->flow_max_window;
-	nircm->tcp_rule.flow_end = unic->flow_end;
-	nircm->tcp_rule.flow_max_end = unic->flow_max_end;
-	nircm->tcp_rule.return_window_scale = unic->return_window_scale;
-	nircm->tcp_rule.return_max_window = unic->return_max_window;
-	nircm->tcp_rule.return_end = unic->return_end;
-	nircm->tcp_rule.return_max_end = unic->return_max_end;
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_TCP_VALID;
-
-	/*
-	 * Copy over the vlan rules and set the VLAN_VALID flag
-	 */
-	nircm->vlan_primary_rule.ingress_vlan_tag = unic->in_vlan_tag[0];
-	nircm->vlan_primary_rule.egress_vlan_tag = unic->out_vlan_tag[0];
-	nircm->vlan_secondary_rule.ingress_vlan_tag = unic->in_vlan_tag[1];
-	nircm->vlan_secondary_rule.egress_vlan_tag = unic->out_vlan_tag[1];
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_VLAN_VALID;
-
-	/*
-	 * Copy over the qos rules and set the QOS_VALID flag
-	 */
-	nircm->qos_rule.flow_qos_tag = unic->flow_qos_tag;
-	nircm->qos_rule.return_qos_tag = unic->return_qos_tag;
-
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_QOS_VALID;
-
-	if (unic->flags & NSS_IPV4_CREATE_FLAG_NO_SEQ_CHECK) {
-		nircm->rule_flags |= NSS_IPV4_RULE_CREATE_FLAG_NO_SEQ_CHECK;
-	}
-
-	if (unic->flags & NSS_IPV4_CREATE_FLAG_BRIDGE_FLOW) {
-		nircm->rule_flags |= NSS_IPV4_RULE_CREATE_FLAG_BRIDGE_FLOW;
-	}
-
-	if (unic->flags & NSS_IPV4_CREATE_FLAG_ROUTED) {
-		nircm->rule_flags |= NSS_IPV4_RULE_CREATE_FLAG_ROUTED;
-	}
-
-	return nss_ipv4_tx(nss_ctx, &nim);
-}
-
-/*
- * nss_tx_create_ipv4_rule1()
- *	Create a nss entry to accelerate the given connection
- */
-nss_tx_status_t nss_tx_create_ipv4_rule1(void *ctx, struct nss_ipv4_create *unic)
-{
-	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *) ctx;
-	struct nss_ipv4_msg nim;
-	struct nss_ipv4_rule_create_msg *nircm;
-
-	nss_info("%p: Create IPv4: %pI4h:%d (%pI4h:%d), %pI4h:%d (%pI4h:%d), p: %d\n", nss_ctx,
-		&unic->src_ip, ntohs(unic->src_port), &unic->src_ip_xlate, ntohs(unic->src_port_xlate),
-		&unic->dest_ip, ntohs(unic->dest_port), &unic->dest_ip_xlate, ntohs(unic->dest_port_xlate), unic->protocol);
-
-	nss_cmn_msg_init(&nim.cm, NSS_IPV4_RX_INTERFACE, NSS_IPV4_TX_CREATE_RULE_MSG,
-			sizeof(struct nss_ipv4_rule_create_msg), NULL, NULL);
-
-	nircm = &nim.msg.rule_create;
-
-	nircm->valid_flags = 0;
-	nircm->rule_flags = 0;
-
-	/*
-	 * Copy over the 5 tuple details.
-	 */
-	nircm->tuple.protocol = (uint8_t)unic->protocol;
-	nircm->tuple.flow_ip = unic->src_ip;
-	nircm->tuple.flow_ident = (uint32_t)unic->src_port;
-	nircm->tuple.return_ip = unic->dest_ip;
-	nircm->tuple.return_ident = (uint32_t)unic->dest_port;
-
-	/*
-	 * Copy over the connection rules and set the CONN_VALID flag
-	 */
-	nircm->conn_rule.flow_interface_num = unic->src_interface_num;
-	nircm->conn_rule.flow_mtu = unic->from_mtu;
-	nircm->conn_rule.flow_ip_xlate = unic->src_ip_xlate;
-	nircm->conn_rule.flow_ident_xlate = (uint32_t)unic->src_port_xlate;
-	memcpy(nircm->conn_rule.flow_mac, unic->src_mac, 6);
-	nircm->conn_rule.return_interface_num = unic->dest_interface_num;
-	nircm->conn_rule.return_mtu = unic->to_mtu;
-	nircm->conn_rule.return_ip_xlate = unic->dest_ip_xlate;
-	nircm->conn_rule.return_ident_xlate = (uint32_t)unic->dest_port_xlate;
-	if (nircm->tuple.return_ip != nircm->conn_rule.return_ip_xlate || nircm->tuple.return_ident != nircm->conn_rule.return_ident_xlate) {
-		memcpy(nircm->conn_rule.return_mac, unic->dest_mac_xlate, 6);
-	} else {
-		memcpy(nircm->conn_rule.return_mac, unic->dest_mac, 6);
-	}
-
-	/*
-	 * Copy over the DSCP rule parameters
-	 */
-	nircm->dscp_rule.flow_dscp = unic->flow_dscp;
-	nircm->dscp_rule.return_dscp = unic->return_dscp;
-	if (unic->flags & NSS_IPV4_CREATE_FLAG_DSCP_MARKING) {
-		nircm->rule_flags |= NSS_IPV4_RULE_CREATE_FLAG_DSCP_MARKING;
-		nircm->valid_flags |= NSS_IPV4_RULE_CREATE_DSCP_MARKING_VALID;
-	}
-
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_CONN_VALID;
-
-	/*
-	 * Copy over the pppoe rules and set the PPPOE_VALID flag.
-	 */
-	nircm->pppoe_rule.flow_pppoe_session_id = unic->flow_pppoe_session_id;
-	memcpy(nircm->pppoe_rule.flow_pppoe_remote_mac, unic->flow_pppoe_remote_mac, ETH_ALEN);
-	nircm->pppoe_rule.return_pppoe_session_id = unic->return_pppoe_session_id;
-	memcpy(nircm->pppoe_rule.return_pppoe_remote_mac, unic->return_pppoe_remote_mac, ETH_ALEN);
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_PPPOE_VALID;
-
-	/*
-	 * Copy over the tcp rules and set the TCP_VALID flag.
-	 */
-	nircm->tcp_rule.flow_window_scale = unic->flow_window_scale;
-	nircm->tcp_rule.flow_max_window = unic->flow_max_window;
-	nircm->tcp_rule.flow_end = unic->flow_end;
-	nircm->tcp_rule.flow_max_end = unic->flow_max_end;
-	nircm->tcp_rule.return_window_scale = unic->return_window_scale;
-	nircm->tcp_rule.return_max_window = unic->return_max_window;
-	nircm->tcp_rule.return_end = unic->return_end;
-	nircm->tcp_rule.return_max_end = unic->return_max_end;
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_TCP_VALID;
-
-	/*
-	 * Copy over the vlan rules and set the VLAN_VALID flag
-	 */
-	nircm->vlan_primary_rule.ingress_vlan_tag = unic->in_vlan_tag[0];
-	nircm->vlan_primary_rule.egress_vlan_tag = unic->out_vlan_tag[0];
-	nircm->vlan_secondary_rule.ingress_vlan_tag = unic->in_vlan_tag[1];
-	nircm->vlan_secondary_rule.egress_vlan_tag = unic->out_vlan_tag[1];
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_VLAN_VALID;
-
-	/*
-	 * Copy over the qos rules and set the QOS_VALID flag
-	 */
-	nircm->qos_rule.flow_qos_tag = unic->flow_qos_tag;
-	nircm->qos_rule.return_qos_tag = unic->return_qos_tag;
-	nircm->valid_flags |= NSS_IPV4_RULE_CREATE_QOS_VALID;
-
-	if (unic->flags & NSS_IPV4_CREATE_FLAG_NO_SEQ_CHECK) {
-		nircm->rule_flags |= NSS_IPV4_RULE_CREATE_FLAG_NO_SEQ_CHECK;
-	}
-
-	if (unic->flags & NSS_IPV4_CREATE_FLAG_BRIDGE_FLOW) {
-		nircm->rule_flags |= NSS_IPV4_RULE_CREATE_FLAG_BRIDGE_FLOW;
-	}
-
-	if (unic->flags & NSS_IPV4_CREATE_FLAG_ROUTED) {
-		nircm->rule_flags |= NSS_IPV4_RULE_CREATE_FLAG_ROUTED;
-	}
-
-	return nss_ipv4_tx(nss_ctx, &nim);
-}
-
-/*
- * nss_tx_destroy_ipv4_rule()
- *	Destroy the given connection in the NSS
- */
-nss_tx_status_t nss_tx_destroy_ipv4_rule(void *ctx, struct nss_ipv4_destroy *unid)
-{
-	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *) ctx;
-	struct nss_ipv4_msg nim;
-	struct nss_ipv4_rule_destroy_msg *nirdm;
-
-	nss_info("%p: Destroy IPv4: %pI4h:%d, %pI4h:%d, p: %d\n", nss_ctx,
-		&unid->src_ip, ntohs(unid->src_port), &unid->dest_ip, ntohs(unid->dest_port), unid->protocol);
-
-	nss_cmn_msg_init(&nim.cm, NSS_IPV4_RX_INTERFACE, NSS_IPV4_TX_DESTROY_RULE_MSG,
-			sizeof(struct nss_ipv4_rule_destroy_msg), NULL, NULL);
-
-	nirdm = &nim.msg.rule_destroy;
-
-	nirdm->tuple.protocol = (uint8_t)unid->protocol;
-	nirdm->tuple.flow_ip = unid->src_ip;
-	nirdm->tuple.flow_ident = (uint32_t)unid->src_port;
-	nirdm->tuple.return_ip = unid->dest_ip;
-	nirdm->tuple.return_ident = (uint32_t)unid->dest_port;
-	return nss_ipv4_tx(nss_ctx, &nim);
-}
-
-/*
- **********************************
- Register/Unregister/Miscellaneous APIs
- **********************************
- */
-
-/*
- * nss_register_ipv4_mgr()
- */
-void *nss_register_ipv4_mgr(nss_ipv4_callback_t event_callback)
-{
-	nss_tx_rx_ipv4_event_callback = event_callback;
-	return (void *)&nss_top_main.nss[nss_top_main.ipv4_handler_id];
-}
-
-/*
- * nss_unregister_ipv4_mgr()
- */
-void nss_unregister_ipv4_mgr(void)
-{
-	nss_tx_rx_ipv4_event_callback = NULL;
-}
-
-/*
- * nss_get_ipv4_mgr_ctx()
- */
-void *nss_get_ipv4_mgr_ctx(void)
-{
-	return (void *)nss_ipv4_get_mgr();
-}
-
-EXPORT_SYMBOL(nss_register_ipv4_mgr);
-EXPORT_SYMBOL(nss_unregister_ipv4_mgr);
-EXPORT_SYMBOL(nss_get_ipv4_mgr_ctx);
-EXPORT_SYMBOL(nss_tx_create_ipv4_rule);
-EXPORT_SYMBOL(nss_tx_create_ipv4_rule1);
-EXPORT_SYMBOL(nss_tx_destroy_ipv4_rule);
diff --git a/nss_tx_rx_ipv6.c b/nss_tx_rx_ipv6.c
deleted file mode 100644
index 7c864bb..0000000
--- a/nss_tx_rx_ipv6.c
+++ /dev/null
@@ -1,485 +0,0 @@
-/*
- **************************************************************************
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all copies.
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- **************************************************************************
- */
-
-/*
- * nss_tx_rx_ipv6.c
- *	NSS IPv6 APIs
- */
-
-#include <linux/ppp_channel.h>
-#include "nss_tx_rx_common.h"
-
-/*
- * Depreceated callback maintained locally.
- */
-nss_ipv6_callback_t nss_tx_rx_ipv6_event_callback = NULL;
-
-/*
- * nss_rx_ipv6_sync()
- *	Handle the syncing of an IPv6 connection.
-  */
-void nss_rx_ipv6_sync(struct nss_ctx_instance *nss_ctx, struct nss_ipv6_conn_sync *nirs)
-{
-	struct nss_ipv6_cb_params nicp;
-
-	nicp.reason = NSS_IPV6_CB_REASON_SYNC;
-	nicp.params.sync.index = nirs->index;
-	nicp.params.sync.protocol = (int32_t)nirs->protocol;
-	nicp.params.sync.src_ip[0] = nirs->flow_ip[0];
-	nicp.params.sync.src_ip[1] = nirs->flow_ip[1];
-	nicp.params.sync.src_ip[2] = nirs->flow_ip[2];
-	nicp.params.sync.src_ip[3] = nirs->flow_ip[3];
-	nicp.params.sync.src_port = nirs->flow_ident;
-	nicp.params.sync.flow_max_window = nirs->flow_max_window;
-	nicp.params.sync.flow_end = nirs->flow_end;
-	nicp.params.sync.flow_max_end = nirs->flow_max_end;
-	nicp.params.sync.flow_rx_packet_count = nirs->flow_rx_packet_count;
-	nicp.params.sync.flow_rx_byte_count = nirs->flow_rx_byte_count;
-	nicp.params.sync.flow_tx_packet_count = nirs->flow_tx_packet_count;
-	nicp.params.sync.flow_tx_byte_count = nirs->flow_tx_byte_count;
-	nicp.params.sync.dest_ip[0] = nirs->return_ip[0];
-	nicp.params.sync.dest_ip[1] = nirs->return_ip[1];
-	nicp.params.sync.dest_ip[2] = nirs->return_ip[2];
-	nicp.params.sync.dest_ip[3] = nirs->return_ip[3];
-	nicp.params.sync.dest_port = nirs->return_ident;
-	nicp.params.sync.return_max_window = nirs->return_max_window;
-	nicp.params.sync.return_end = nirs->return_end;
-	nicp.params.sync.return_max_end = nirs->return_max_end;
-	nicp.params.sync.return_rx_packet_count = nirs->return_rx_packet_count;
-	nicp.params.sync.return_rx_byte_count = nirs->return_rx_byte_count;
-	nicp.params.sync.return_tx_packet_count = nirs->return_tx_packet_count;
-	nicp.params.sync.return_tx_byte_count = nirs->return_tx_byte_count;
-
-	nicp.params.sync.qos_tag = nirs->qos_tag;
-
-	nicp.params.sync.flags = 0;
-	if (nirs->flags & NSS_IPV6_RULE_CREATE_FLAG_NO_SEQ_CHECK) {
-		nicp.params.sync.flags |= NSS_IPV6_CREATE_FLAG_NO_SEQ_CHECK;
-	}
-
-	if (nirs->flags & NSS_IPV6_RULE_CREATE_FLAG_BRIDGE_FLOW) {
-		nicp.params.sync.flags |= NSS_IPV6_CREATE_FLAG_BRIDGE_FLOW;
-	}
-
-	if (nirs->flags & NSS_IPV6_RULE_CREATE_FLAG_ROUTED) {
-		nicp.params.sync.flags |= NSS_IPV6_CREATE_FLAG_ROUTED;
-	}
-
-	switch(nirs->reason) {
-	case NSS_IPV6_RULE_SYNC_REASON_FLUSH:
-	case NSS_IPV6_RULE_SYNC_REASON_DESTROY:
-	case NSS_IPV6_RULE_SYNC_REASON_EVICT:
-		nicp.params.sync.final_sync = 1;
-		break;
-
-	case NSS_IPV6_RULE_SYNC_REASON_STATS:
-		nicp.params.sync.final_sync = 0;
-		break;
-
-	default:
-		nss_warning("Bad ipv6 sync reason: %d\n", nirs->reason);
-		return;
-	}
-
-	/*
-	 * Convert ms ticks from the NSS to jiffies.  We know that inc_ticks is small
-	 * and we expect HZ to be small too so we can multiply without worrying about
-	 * wrap-around problems.  We add a rounding constant to ensure that the different
-	 * time bases don't cause truncation errors.
-	 */
-	nss_assert(HZ <= 100000);
-	nicp.params.sync.delta_jiffies = ((nirs->inc_ticks * HZ) + (MSEC_PER_SEC / 2)) / MSEC_PER_SEC;
-
-	/*
-	 * Call IPv6 manager callback function
-	 */
-	if (!nss_tx_rx_ipv6_event_callback) {
-		nss_info("%p: IPV6 sync message received before connection manager has registered", nss_ctx);
-	} else {
-		nss_ipv6_callback_t cb = nss_tx_rx_ipv6_event_callback;
-		cb(&nicp);
-	}
-}
-
-/*
- * nss_rx_metadata_ipv6_rule_establish()
- *	Handle the establishment of an IPv6 rule.
- */
-void nss_rx_metadata_ipv6_rule_establish(struct nss_ctx_instance *nss_ctx, struct nss_ipv6_rule_establish *nire)
-{
-	struct nss_ipv6_cb_params nicp;
-	nss_ipv6_callback_t cb;
-
-	// GGG FIXME THIS SHOULD NOT BE A MEMCPY
-	nicp.reason = NSS_IPV6_CB_REASON_ESTABLISH;
-	memcpy(&nicp.params, nire, sizeof(struct nss_ipv6_establish));
-
-	/*
-	 * Call IPv6 manager callback function
-	 */
-	if (!nss_tx_rx_ipv6_event_callback) {
-		nss_info("%p: IPV6 establish message received before connection manager has registered", nss_ctx);
-		return;
-	}
-	cb = nss_tx_rx_ipv6_event_callback;
-	cb(&nicp);
-	nss_info("%p: Establish message - Index: %d\n", nss_ctx, nire->index);
-}
-
-/*
- * nss_rx_metadata_ipv6_create_response()
- *	Handle the ACK/NACK responses for IPv6 create rule.
- */
-void nss_rx_metadata_ipv6_create_response(struct nss_ctx_instance *nss_ctx, struct nss_ipv6_msg *nim)
-{
-	struct nss_ipv6_cb_params nicp;
-	nss_ipv6_callback_t cb;
-	struct nss_ipv6_rule_create_msg *nircm;
-	struct nss_ipv6_establish *nie;
-
-	if (nim->cm.response == NSS_CMN_RESPONSE_ACK) {
-		return;
-	}
-
-	nicp.reason = NSS_IPV6_CB_REASON_ESTABLISH_FAIL;
-
-	nircm = &nim->msg.rule_create;
-	nie = &nicp.params.establish;
-
-	nie->protocol = nircm->tuple.protocol;
-	nie->flow_ip[0] = nircm->tuple.flow_ip[0];
-	nie->flow_ip[1] = nircm->tuple.flow_ip[1];
-	nie->flow_ip[2] = nircm->tuple.flow_ip[2];
-	nie->flow_ip[3] = nircm->tuple.flow_ip[3];
-	nie->flow_ident = nircm->tuple.flow_ident;
-	nie->return_ip[0] = nircm->tuple.return_ip[0];
-	nie->return_ip[1] = nircm->tuple.return_ip[1];
-	nie->return_ip[2] = nircm->tuple.return_ip[2];
-	nie->return_ip[3] = nircm->tuple.return_ip[3];
-	nie->return_ident = nircm->tuple.return_ident;
-
-	/*
-	 * Call IPv4 manager callback function
-	 */
-	if (!nss_tx_rx_ipv6_event_callback) {
-		nss_info("%p: IPV6 create response message received before connection manager has registered", nss_ctx);
-		return;
-	}
-	cb = nss_tx_rx_ipv6_event_callback;
-	cb(&nicp);
-}
-
-/*
- * nss_tx_create_ipv6_rule()
- *	Create a NSS entry to accelerate the given connection
- */
-nss_tx_status_t nss_tx_create_ipv6_rule(void *ctx, struct nss_ipv6_create *unic)
-{
-	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *) ctx;
-	struct nss_ipv6_msg nim;
-	struct nss_ipv6_rule_create_msg *nircm;
-
-	nss_info("%p: Create IPv6: %pI6:%d, %pI6:%d, p: %d\n", nss_ctx,
-		unic->src_ip, unic->src_port, unic->dest_ip, unic->dest_port, unic->protocol);
-
-	nss_cmn_msg_init(&nim.cm, NSS_IPV6_RX_INTERFACE, NSS_IPV6_TX_CREATE_RULE_MSG,
-			sizeof(struct nss_ipv6_rule_create_msg), NULL, NULL);
-
-	nircm = &nim.msg.rule_create;
-
-	nircm->rule_flags = 0;
-	nircm->valid_flags = 0;
-
-	/*
-	 * Copy over the 5 tuple information.
-	 */
-	nircm->tuple.protocol = (uint8_t)unic->protocol;
-	nircm->tuple.flow_ip[0] = unic->src_ip[0];
-	nircm->tuple.flow_ip[1] = unic->src_ip[1];
-	nircm->tuple.flow_ip[2] = unic->src_ip[2];
-	nircm->tuple.flow_ip[3] = unic->src_ip[3];
-	nircm->tuple.flow_ident = (uint32_t)unic->src_port;
-	nircm->tuple.return_ip[0] = unic->dest_ip[0];
-	nircm->tuple.return_ip[1] = unic->dest_ip[1];
-	nircm->tuple.return_ip[2] = unic->dest_ip[2];
-	nircm->tuple.return_ip[3] = unic->dest_ip[3];
-	nircm->tuple.return_ident = (uint32_t)unic->dest_port;
-
-	/*
-	 * Copy over the connection rules and set CONN_VALID flag
-	 */
-	nircm->conn_rule.flow_interface_num = unic->src_interface_num;
-	nircm->conn_rule.flow_mtu = unic->from_mtu;
-	nircm->conn_rule.return_interface_num = unic->dest_interface_num;
-	nircm->conn_rule.return_mtu = unic->to_mtu;
-	memcpy(nircm->conn_rule.flow_mac, unic->src_mac, 6);
-	memcpy(nircm->conn_rule.return_mac, unic->dest_mac, 6);
-
-	/*
-	 * Copy over the DSCP rule parameters
-	 */
-	nircm->dscp_rule.flow_dscp = unic->flow_dscp;
-	nircm->dscp_rule.return_dscp = unic->return_dscp;
-	if (unic->flags & NSS_IPV6_CREATE_FLAG_DSCP_MARKING) {
-		nircm->rule_flags |= NSS_IPV6_RULE_CREATE_FLAG_DSCP_MARKING;
-		nircm->valid_flags |= NSS_IPV6_RULE_CREATE_DSCP_MARKING_VALID;
-	}
-
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_CONN_VALID;
-
-	/*
-	 * Copy over the pppoe rules and set PPPOE_VALID flag
-	 */
-	nircm->pppoe_rule.flow_pppoe_session_id = unic->flow_pppoe_session_id;
-	memcpy(nircm->pppoe_rule.flow_pppoe_remote_mac, unic->flow_pppoe_remote_mac, ETH_ALEN);
-	nircm->pppoe_rule.return_pppoe_session_id = unic->return_pppoe_session_id;
-	memcpy(nircm->pppoe_rule.return_pppoe_remote_mac, unic->return_pppoe_remote_mac, ETH_ALEN);
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_PPPOE_VALID;
-
-	/*
-	 * Copy over the tcp rules and set TCP_VALID flag
-	 */
-	nircm->tcp_rule.flow_window_scale = unic->flow_window_scale;
-	nircm->tcp_rule.flow_max_window = unic->flow_max_window;
-	nircm->tcp_rule.flow_end = unic->flow_end;
-	nircm->tcp_rule.flow_max_end = unic->flow_max_end;
-	nircm->tcp_rule.return_window_scale = unic->return_window_scale;
-	nircm->tcp_rule.return_max_window = unic->return_max_window;
-	nircm->tcp_rule.return_end = unic->return_end;
-	nircm->tcp_rule.return_max_end = unic->return_max_end;
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_TCP_VALID;
-
-	/*
-	 * Copy over the vlan rules and set the VLAN_VALID flag
-	 */
-	nircm->vlan_primary_rule.egress_vlan_tag = unic->out_vlan_tag[0];
-	nircm->vlan_primary_rule.ingress_vlan_tag = unic->in_vlan_tag[0];
-	nircm->vlan_secondary_rule.egress_vlan_tag = unic->out_vlan_tag[1];
-	nircm->vlan_secondary_rule.ingress_vlan_tag = unic->in_vlan_tag[1];
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_VLAN_VALID;
-
-	/*
-	 * Copy over the qos rules and set the QOS_VALID flag
-	 */
-	nircm->qos_rule.flow_qos_tag = unic->flow_qos_tag;
-	nircm->qos_rule.return_qos_tag = unic->return_qos_tag;
-
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_QOS_VALID;
-
-	if (unic->flags & NSS_IPV6_CREATE_FLAG_NO_SEQ_CHECK) {
-		nircm->rule_flags |= NSS_IPV6_RULE_CREATE_FLAG_NO_SEQ_CHECK;
-	}
-
-	if (unic->flags & NSS_IPV6_CREATE_FLAG_BRIDGE_FLOW) {
-		nircm->rule_flags |= NSS_IPV6_RULE_CREATE_FLAG_BRIDGE_FLOW;
-	}
-
-	if (unic->flags & NSS_IPV6_CREATE_FLAG_ROUTED) {
-		nircm->rule_flags |= NSS_IPV6_RULE_CREATE_FLAG_ROUTED;
-	}
-	nss_info("IPV6:%p: valid_flags: %x \n", nss_ctx, nircm->valid_flags);
-
-	return nss_ipv6_tx(nss_ctx, &nim);
-
-}
-
-/*
- * nss_tx_create_ipv6_rule1()
- *	Create a NSS entry to accelerate the given connection
- *  This function has been just added to serve the puropose of backward compatibility
- */
-nss_tx_status_t nss_tx_create_ipv6_rule1(void *ctx, struct nss_ipv6_create *unic)
-{
-	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *) ctx;
-	struct nss_ipv6_msg nim;
-	struct nss_ipv6_rule_create_msg *nircm;
-
-	nss_info("%p: Create IPv6: %pI6:%d, %pI6:%d, p: %d\n", nss_ctx,
-		unic->src_ip, unic->src_port, unic->dest_ip, unic->dest_port, unic->protocol);
-
-
-	nss_cmn_msg_init(&nim.cm, NSS_IPV6_RX_INTERFACE, NSS_IPV6_TX_CREATE_RULE_MSG,
-			sizeof(struct nss_ipv6_rule_create_msg), NULL, NULL);
-
-	nircm = &nim.msg.rule_create;
-
-	/*
-	 * Initialize the flags
-	 */
-	nircm->rule_flags = 0;
-	nircm->valid_flags = 0;
-
-	/*
-	 * Copy over the 5 tuple information.
-	 */
-	nircm->tuple.protocol = (uint8_t)unic->protocol;
-	nircm->tuple.flow_ip[0] = unic->src_ip[0];
-	nircm->tuple.flow_ip[1] = unic->src_ip[1];
-	nircm->tuple.flow_ip[2] = unic->src_ip[2];
-	nircm->tuple.flow_ip[3] = unic->src_ip[3];
-	nircm->tuple.flow_ident = (uint32_t)unic->src_port;
-	nircm->tuple.return_ip[0] = unic->dest_ip[0];
-	nircm->tuple.return_ip[1] = unic->dest_ip[1];
-	nircm->tuple.return_ip[2] = unic->dest_ip[2];
-	nircm->tuple.return_ip[3] = unic->dest_ip[3];
-	nircm->tuple.return_ident = (uint32_t)unic->dest_port;
-
-	/*
-	 * Copy over the connection rules and set CONN_VALID flag
-	 */
-	nircm->conn_rule.flow_interface_num = unic->src_interface_num;
-	nircm->conn_rule.flow_mtu = unic->from_mtu;
-	nircm->conn_rule.return_interface_num = unic->dest_interface_num;
-	nircm->conn_rule.return_mtu = unic->to_mtu;
-	memcpy(nircm->conn_rule.flow_mac, unic->src_mac, 6);
-	memcpy(nircm->conn_rule.return_mac, unic->dest_mac, 6);
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_CONN_VALID;
-
-	/*
-	 * Copy over the DSCP rule parameters
-	 */
-	nircm->dscp_rule.flow_dscp = unic->flow_dscp;
-	nircm->dscp_rule.return_dscp = unic->return_dscp;
-	if (unic->flags & NSS_IPV6_CREATE_FLAG_DSCP_MARKING) {
-		nircm->rule_flags |= NSS_IPV6_RULE_CREATE_FLAG_DSCP_MARKING;
-		nircm->valid_flags |= NSS_IPV6_RULE_CREATE_DSCP_MARKING_VALID;
-	}
-	/*
-	 * Copy over the pppoe rules and set PPPOE_VALID flag
-	 */
-	nircm->pppoe_rule.flow_pppoe_session_id = unic->flow_pppoe_session_id;
-	memcpy(nircm->pppoe_rule.flow_pppoe_remote_mac, unic->flow_pppoe_remote_mac, ETH_ALEN);
-	nircm->pppoe_rule.return_pppoe_session_id = unic->return_pppoe_session_id;
-	memcpy(nircm->pppoe_rule.return_pppoe_remote_mac, unic->return_pppoe_remote_mac, ETH_ALEN);
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_PPPOE_VALID;
-
-	/*
-	 * Copy over the tcp rules and set TCP_VALID flag
-	 */
-	nircm->tcp_rule.flow_window_scale = unic->flow_window_scale;
-	nircm->tcp_rule.flow_max_window = unic->flow_max_window;
-	nircm->tcp_rule.flow_end = unic->flow_end;
-	nircm->tcp_rule.flow_max_end = unic->flow_max_end;
-	nircm->tcp_rule.return_window_scale = unic->return_window_scale;
-	nircm->tcp_rule.return_max_window = unic->return_max_window;
-	nircm->tcp_rule.return_end = unic->return_end;
-	nircm->tcp_rule.return_max_end = unic->return_max_end;
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_TCP_VALID;
-
-	/*
-	 * Copy over the vlan rules and set the VLAN_VALID flag
-	 */
-	nircm->vlan_primary_rule.egress_vlan_tag = unic->out_vlan_tag[0];
-	nircm->vlan_primary_rule.ingress_vlan_tag = unic->in_vlan_tag[0];
-	nircm->vlan_secondary_rule.egress_vlan_tag = unic->out_vlan_tag[1];
-	nircm->vlan_secondary_rule.ingress_vlan_tag = unic->in_vlan_tag[1];
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_VLAN_VALID;
-
-	/*
-	 * Copy over the qos rules and set the QOS_VALID flag
-	 */
-	nircm->qos_rule.flow_qos_tag = unic->flow_qos_tag;
-	nircm->qos_rule.return_qos_tag = unic->return_qos_tag;
-	nircm->valid_flags |= NSS_IPV6_RULE_CREATE_QOS_VALID;
-
-	if (unic->flags & NSS_IPV6_CREATE_FLAG_NO_SEQ_CHECK) {
-		nircm->rule_flags |= NSS_IPV6_RULE_CREATE_FLAG_NO_SEQ_CHECK;
-	}
-
-	if (unic->flags & NSS_IPV6_CREATE_FLAG_BRIDGE_FLOW) {
-		nircm->rule_flags |= NSS_IPV6_RULE_CREATE_FLAG_BRIDGE_FLOW;
-	}
-
-	if (unic->flags & NSS_IPV6_CREATE_FLAG_ROUTED) {
-		nircm->rule_flags |= NSS_IPV6_RULE_CREATE_FLAG_ROUTED;
-	}
-
-	return nss_ipv6_tx(nss_ctx, &nim);
-}
-
-/*
- * nss_tx_destroy_ipv6_rule()
- *	Destroy the given connection in the NSS
- */
-nss_tx_status_t nss_tx_destroy_ipv6_rule(void *ctx, struct nss_ipv6_destroy *unid)
-{
-	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *) ctx;
-	struct nss_ipv6_msg nim;
-	struct nss_ipv6_rule_destroy_msg *nirdm;
-
-	nss_info("%p: Destroy IPv6: %pI6:%d, %pI6:%d, p: %d\n", nss_ctx,
-		unid->src_ip, unid->src_port, unid->dest_ip, unid->dest_port, unid->protocol);
-
-	nss_cmn_msg_init(&nim.cm, NSS_IPV6_RX_INTERFACE, NSS_IPV6_TX_DESTROY_RULE_MSG,
-			sizeof(struct nss_ipv6_rule_destroy_msg), NULL, NULL);
-
-	nirdm = &nim.msg.rule_destroy;
-
-	nirdm->tuple.protocol = (uint8_t)unid->protocol;
-	nirdm->tuple.flow_ip[0] = unid->src_ip[0];
-	nirdm->tuple.flow_ip[1] = unid->src_ip[1];
-	nirdm->tuple.flow_ip[2] = unid->src_ip[2];
-	nirdm->tuple.flow_ip[3] = unid->src_ip[3];
-	nirdm->tuple.flow_ident = (uint32_t)unid->src_port;
-	nirdm->tuple.return_ip[0] = unid->dest_ip[0];
-	nirdm->tuple.return_ip[1] = unid->dest_ip[1];
-	nirdm->tuple.return_ip[2] = unid->dest_ip[2];
-	nirdm->tuple.return_ip[3] = unid->dest_ip[3];
-	nirdm->tuple.return_ident = (uint32_t)unid->dest_port;
-
-	return nss_ipv6_tx(nss_ctx, &nim);
-}
-
-/*
- **********************************
- Register/Unregister/Miscellaneous APIs
- **********************************
- */
-
-/*
- * nss_register_ipv6_mgr()
- */
-void *nss_register_ipv6_mgr(nss_ipv6_callback_t event_callback)
-{
-	nss_tx_rx_ipv6_event_callback = event_callback;
-	return (void *)&nss_top_main.nss[nss_top_main.ipv6_handler_id];
-}
-
-/*
- * nss_unregister_ipv6_mgr()
- */
-void nss_unregister_ipv6_mgr(void)
-{
-	nss_tx_rx_ipv6_event_callback = NULL;
-}
-
-/*
- * nss_get_ipv6_mgr_ctx()
- */
-void *nss_get_ipv6_mgr_ctx(void)
-{
-	return (void *)nss_ipv6_get_mgr();
-}
-
-
-
-
-EXPORT_SYMBOL(nss_register_ipv6_mgr);
-EXPORT_SYMBOL(nss_unregister_ipv6_mgr);
-EXPORT_SYMBOL(nss_get_ipv6_mgr_ctx);
-EXPORT_SYMBOL(nss_tx_create_ipv6_rule);
-EXPORT_SYMBOL(nss_tx_create_ipv6_rule1);
-EXPORT_SYMBOL(nss_tx_destroy_ipv6_rule);
diff --git a/nss_tx_rx_pppoe.c b/nss_tx_rx_pppoe.c
deleted file mode 100644
index cb2aec0..0000000
--- a/nss_tx_rx_pppoe.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- **************************************************************************
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
- * Permission to use, copy, modify, and/or distribute this software for
- * any purpose with or without fee is hereby granted, provided that the
- * above copyright notice and this permission notice appear in all copies.
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
- * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
- **************************************************************************
- */
-
-/*
- * nss_tx_rx_pppoe.c
- *	NSS PPPoE APIs
- */
-
-#include "nss_tx_rx_common.h"
-#include <linux/ppp_channel.h>
-
-/*
- * nss_tx_destroy_pppoe_connection_rule)
- *	Destroy PPoE connection rule associated with the session ID and remote server MAC address.
- */
-void nss_tx_destroy_pppoe_connection_rule(void *ctx, uint16_t pppoe_session_id, uint8_t *pppoe_remote_mac)
-{
-	struct nss_ctx_instance *nss_ctx = (struct nss_ctx_instance *) ctx;
-	struct nss_pppoe_msg npm;
-	struct nss_pppoe_rule_destroy_msg *nprd;
-	uint16_t *pppoe_remote_mac_uint16_t = (uint16_t *)pppoe_remote_mac;
-	int32_t status;
-
-	/*
-	 * TODO Remove this function once linux kernel directly calls nss_pppoe_tx()
-	 */
-	nss_info("%p: Destroy all PPPoE rules of session ID: %x remote MAC: %x:%x:%x:%x:%x:%x", nss_ctx, pppoe_session_id,
-			pppoe_remote_mac[0], pppoe_remote_mac[1], pppoe_remote_mac[2],
-			pppoe_remote_mac[3], pppoe_remote_mac[4], pppoe_remote_mac[5]);
-
-	nss_cmn_msg_init(&npm.cm, NSS_PPPOE_RX_INTERFACE, NSS_PPPOE_TX_CONN_RULE_DESTROY,
-			sizeof(struct nss_pppoe_rule_destroy_msg), NULL, NULL);
-
-	nprd = &npm.msg.pppoe_rule_destroy;
-
-	nprd->pppoe_session_id = pppoe_session_id;
-	nprd->pppoe_remote_mac[0] = pppoe_remote_mac_uint16_t[0];
-	nprd->pppoe_remote_mac[1] = pppoe_remote_mac_uint16_t[1];
-	nprd->pppoe_remote_mac[2] = pppoe_remote_mac_uint16_t[2];
-
-	status = nss_pppoe_tx(nss_ctx, &npm);
-	if (status != NSS_TX_SUCCESS) {
-		nss_warning("%p: Not able to send destroy pppoe rule msg to NSS %x\n", nss_ctx, status);
-	}
-}
-
-EXPORT_SYMBOL(nss_tx_destroy_pppoe_connection_rule);