aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip_api.c
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2019-06-24 11:52:49 +0000
committerOle Trøan <otroan@employees.org>2019-09-25 08:23:04 +0000
commit896c896a3c4ed563a270281ff8b50fd253f4833f (patch)
tree801170d6b2d3c7ae4ff782e7f7088b4d6146d393 /src/vnet/ip/ip_api.c
parent5e2f84d2cf97a6efa89c1c4bbf80de6a8f03d2a8 (diff)
ip: refactor reassembly
this is a preparation step for introducing other reassembly types Type: refactor Change-Id: I197e299dbd729b00eead31667913b8ceff915d63 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vnet/ip/ip_api.c')
-rw-r--r--src/vnet/ip/ip_api.c44
1 files changed, 25 insertions, 19 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c
index 7e87f4b8db0..3e04b9f740c 100644
--- a/src/vnet/ip/ip_api.c
+++ b/src/vnet/ip/ip_api.c
@@ -43,8 +43,8 @@
#include <vnet/fib/ip6_fib.h>
#include <vnet/fib/fib_path_list.h>
#include <vnet/ip/ip6_hop_by_hop.h>
-#include <vnet/ip/ip4_reassembly.h>
-#include <vnet/ip/ip6_reassembly.h>
+#include <vnet/ip/reass/ip4_full_reass.h>
+#include <vnet/ip/reass/ip6_full_reass.h>
#include <vnet/ethernet/arp.h>
#include <vnet/ip/ip_types_api.h>
@@ -2738,17 +2738,21 @@ vl_api_ip_reassembly_set_t_handler (vl_api_ip_reassembly_set_t * mp)
int rv = 0;
if (mp->is_ip6)
{
- rv = ip6_reass_set (clib_net_to_host_u32 (mp->timeout_ms),
- clib_net_to_host_u32 (mp->max_reassemblies),
- clib_net_to_host_u32 (mp->max_reassembly_length),
- clib_net_to_host_u32 (mp->expire_walk_interval_ms));
+ rv = ip6_full_reass_set (clib_net_to_host_u32 (mp->timeout_ms),
+ clib_net_to_host_u32 (mp->max_reassemblies),
+ clib_net_to_host_u32
+ (mp->max_reassembly_length),
+ clib_net_to_host_u32
+ (mp->expire_walk_interval_ms));
}
else
{
- rv = ip4_reass_set (clib_net_to_host_u32 (mp->timeout_ms),
- clib_net_to_host_u32 (mp->max_reassemblies),
- clib_net_to_host_u32 (mp->max_reassembly_length),
- clib_net_to_host_u32 (mp->expire_walk_interval_ms));
+ rv = ip4_full_reass_set (clib_net_to_host_u32 (mp->timeout_ms),
+ clib_net_to_host_u32 (mp->max_reassemblies),
+ clib_net_to_host_u32
+ (mp->max_reassembly_length),
+ clib_net_to_host_u32
+ (mp->expire_walk_interval_ms));
}
REPLY_MACRO (VL_API_IP_REASSEMBLY_SET_REPLY);
@@ -2771,15 +2775,16 @@ vl_api_ip_reassembly_get_t_handler (vl_api_ip_reassembly_get_t * mp)
if (mp->is_ip6)
{
rmp->is_ip6 = 1;
- ip6_reass_get (&rmp->timeout_ms, &rmp->max_reassemblies,
- &rmp->expire_walk_interval_ms);
+ ip6_full_reass_get (&rmp->timeout_ms, &rmp->max_reassemblies,
+ &rmp->max_reassembly_length,
+ &rmp->expire_walk_interval_ms);
}
else
{
rmp->is_ip6 = 0;
- ip4_reass_get (&rmp->timeout_ms, &rmp->max_reassemblies,
- &rmp->max_reassembly_length,
- &rmp->expire_walk_interval_ms);
+ ip4_full_reass_get (&rmp->timeout_ms, &rmp->max_reassemblies,
+ &rmp->max_reassembly_length,
+ &rmp->expire_walk_interval_ms);
}
rmp->timeout_ms = clib_host_to_net_u32 (rmp->timeout_ms);
rmp->max_reassemblies = clib_host_to_net_u32 (rmp->max_reassemblies);
@@ -2794,12 +2799,13 @@ void
{
vl_api_ip_reassembly_enable_disable_reply_t *rmp;
int rv = 0;
- rv = ip4_reass_enable_disable (clib_net_to_host_u32 (mp->sw_if_index),
- mp->enable_ip4);
+ rv = ip4_full_reass_enable_disable (clib_net_to_host_u32 (mp->sw_if_index),
+ mp->enable_ip4);
if (0 == rv)
{
- rv = ip6_reass_enable_disable (clib_net_to_host_u32 (mp->sw_if_index),
- mp->enable_ip6);
+ rv =
+ ip6_full_reass_enable_disable (clib_net_to_host_u32 (mp->sw_if_index),
+ mp->enable_ip6);
}
REPLY_MACRO (VL_API_IP_REASSEMBLY_ENABLE_DISABLE_REPLY);