aboutsummaryrefslogtreecommitdiffstats
path: root/stacks
diff options
context:
space:
mode:
authornanger <zhenyinan@huawei.com>2018-08-21 09:54:07 +0800
committernanger <zhenyinan@huawei.com>2018-08-21 10:00:47 +0800
commit941b368b03f2fc26538bba3e7e4c9c36841b3456 (patch)
tree8f25311ca86613efbddf04235834dd24d71153df /stacks
parent866a942c3581440bef9ebda5d84c039490bb3179 (diff)
Refactor: remove rd-table share memory
DMM should not share rd table with protocol stack. Change-Id: I8e1afb708c9b785a382c157102ebbc228e550ea5 Signed-off-by: nanger <zhenyinan@huawei.com>
Diffstat (limited to 'stacks')
-rw-r--r--stacks/lwip_stack/lwip_src/api/spl_tcpip.c1
-rw-r--r--stacks/lwip_stack/lwip_src/ip_module/container_ip.c36
-rw-r--r--stacks/lwip_stack/lwip_src/ip_module/network.c60
3 files changed, 0 insertions, 97 deletions
diff --git a/stacks/lwip_stack/lwip_src/api/spl_tcpip.c b/stacks/lwip_stack/lwip_src/api/spl_tcpip.c
index 688c34b..b627bcf 100644
--- a/stacks/lwip_stack/lwip_src/api/spl_tcpip.c
+++ b/stacks/lwip_stack/lwip_src/api/spl_tcpip.c
@@ -134,7 +134,6 @@ u8_t ip_tos2prio[(IPTOS_TOS_MASK >> 1) + 1] = {
/********************/
extern err_t ethernetif_init (struct netif *pnetif);
extern int nstack_stackx_init (int flag);
-extern int nstack_rd_mng_int (int flag);
extern void tcp_sys_rmem_init ();
extern void ethernetif_packets_input (struct netif *pstnetif);
diff --git a/stacks/lwip_stack/lwip_src/ip_module/container_ip.c b/stacks/lwip_stack/lwip_src/ip_module/container_ip.c
index 3cbe9b9..decc52c 100644
--- a/stacks/lwip_stack/lwip_src/ip_module/container_ip.c
+++ b/stacks/lwip_stack/lwip_src/ip_module/container_ip.c
@@ -28,7 +28,6 @@
#include "netif.h"
#include "nstack_log.h"
#include "nstack_securec.h"
-#include "nstack_rd_mng.h"
#include "config_common.h"
#include "igmp.h"
#include "spl_def.h"
@@ -164,38 +163,6 @@ free_container_port_ip_cidr (struct container_port_ip_cidr *ip_cidr,
}
}
-/*note:::the ip must be local order*/
-void
-container_multicast_rd (unsigned int ip, int op)
-{
- rd_ip_data rd_ip = { 0 };
- int ret = 0;
-
- rd_ip.addr = ip;
- rd_ip.masklen = 32;
- if (0 == op)
- {
- ret = nstack_rd_ip_node_insert ("nstack-dpdk", &rd_ip);
- }
- else
- {
- ret = nstack_rd_ip_node_delete (&rd_ip);
- }
-
- if (0 != ret)
- {
- NSOPR_LOGERR ("nstack rd multicast ip:0x%x %s fail", ip,
- (0 == op ? "insert" : "delete"));
- }
- else
- {
- NSOPR_LOGDBG ("nstack rd multicast ip:0x%x %s success", ip,
- (0 == op ? "insert" : "delete"));
- }
-
- return;
-}
-
static void
free_container_multicast (struct container_multicast_id *multicast,
bool_t only_free)
@@ -208,9 +175,6 @@ free_container_multicast (struct container_multicast_id *multicast,
multicast = multicast->next;
if (!only_free)
{
- /*note:::multicast ip is network, need to change to local order, delete multicast ip from rd. */
- container_multicast_rd (spl_ntohl (tmp->ip), 1);
-
trp_rb_erase ((void *) (u64_t) tmp->ip, &g_container_multicast_root,
ip_compare);
}
diff --git a/stacks/lwip_stack/lwip_src/ip_module/network.c b/stacks/lwip_stack/lwip_src/ip_module/network.c
index 83fbb7c..ef0d9a7 100644
--- a/stacks/lwip_stack/lwip_src/ip_module/network.c
+++ b/stacks/lwip_stack/lwip_src/ip_module/network.c
@@ -26,7 +26,6 @@
#include "stackx/spl_api.h"
#include "sharedmemory.h"
#include "nstack_securec.h"
-#include "nstack_rd_mng.h"
#include "spl_hal.h"
#include "inet.h"
@@ -441,59 +440,6 @@ nic_already_bond (struct network_configuration *pnetwork,
return 0;
}
-/*add network to rd*/
-void
-network_rd_proc (struct network_configuration *network, int op)
-{
- struct ip_subnet *ptsubnet = NULL;
- struct network_configuration *pn = NULL;
- rd_ip_data rd_ip = { 0 };
- int ret = 0;
-
- pn = network;
-
- while (pn)
- {
- if (0 == strcmp ("nstack-dpdk", pn->type_name))
- {
- ptsubnet = network->ip_subnet;
- while (ptsubnet)
- {
- rd_ip.addr = ptsubnet->subnet;
- rd_ip.masklen = ptsubnet->mask_len;
- if (0 == op)
- {
- ret = nstack_rd_ip_node_insert (network->type_name, &rd_ip);
- }
- else
- {
- ret = nstack_rd_ip_node_delete (&rd_ip);
- }
-
- if (0 != ret)
- {
- NSOPR_LOGERR ("nstack rd subnet:0x%x, masklen:0x%x %s fail",
- rd_ip.addr, rd_ip.masklen,
- (0 == op ? "insert" : "delete"));
- }
- else
- {
- NSOPR_LOGDBG
- ("nstack rd subnet:0x%x, masklen:0x%x %s success",
- rd_ip.addr, rd_ip.masklen,
- (0 == op ? "insert" : "delete"));
- }
-
- ptsubnet = ptsubnet->next;
- }
- }
-
- pn = pn->next;
- }
-
- return;
-}
-
/* add network to list in descending sort */
void
add_network_to_list (struct network_configuration *network)
@@ -503,9 +449,6 @@ add_network_to_list (struct network_configuration *network)
network->next = NULL;
- /*add network to rd */
- network_rd_proc (network, 0);
-
while (curr)
{
if (network->ip_subnet->mask_len >= curr->ip_subnet->mask_len)
@@ -1089,9 +1032,6 @@ del_network_by_name (char *name)
*ref = network->next;
network->next = NULL;
- /*delete netework from rd */
- network_rd_proc (network, 1);
-
free_network_configuration (network, IP_MODULE_FALSE);
return 0;
}