diff options
author | Klement Sekera <ksekera@cisco.com> | 2018-02-22 11:41:12 +0100 |
---|---|---|
committer | Damjan Marion <dmarion.lists@gmail.com> | 2018-03-21 00:01:44 +0000 |
commit | 4c53313cd7e9b866412ad3e04b2d91ac098c1398 (patch) | |
tree | 185aa1f368ea2eb997c2ed46433b31178efc71c9 /src/vnet/ip/ip_api.c | |
parent | 2303cb181b51f63c909cd506125c1f832432865a (diff) |
reassembly: feature/concurrency
This change makes ip reassembly an interface feature, while adding
concurrency support. Due to this, punt is no longer needed to test
reassembly.
Change-Id: I467669514ec33283ce935be0f1dd08f07684f0c7
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.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/src/vnet/ip/ip_api.c b/src/vnet/ip/ip_api.c index 0a055118732..a8dbb3ae36c 100644 --- a/src/vnet/ip/ip_api.c +++ b/src/vnet/ip/ip_api.c @@ -103,7 +103,8 @@ _(IP_SOURCE_AND_PORT_RANGE_CHECK_ADD_DEL, \ _(IP_SOURCE_AND_PORT_RANGE_CHECK_INTERFACE_ADD_DEL, \ ip_source_and_port_range_check_interface_add_del) \ _(IP_REASSEMBLY_SET, ip_reassembly_set) \ -_(IP_REASSEMBLY_GET, ip_reassembly_get) +_(IP_REASSEMBLY_GET, ip_reassembly_get) \ +_(IP_REASSEMBLY_ENABLE_DISABLE, ip_reassembly_enable_disable) extern void stats_dslock_with_hint (int hint, int tag); extern void stats_dsunlock (void); @@ -2904,6 +2905,23 @@ vl_api_ip_reassembly_get_t_handler (vl_api_ip_reassembly_get_t * mp) vl_msg_api_send_shmem (q, (u8 *) & rmp); } +void + vl_api_ip_reassembly_enable_disable_t_handler + (vl_api_ip_reassembly_enable_disable_t * mp) +{ + 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); + if (0 == rv) + { + rv = ip6_reass_enable_disable (clib_net_to_host_u32 (mp->sw_if_index), + mp->enable_ip6); + } + + REPLY_MACRO (VL_API_IP_REASSEMBLY_SET_REPLY); +} + #define vl_msg_name_crc_list #include <vnet/ip/ip.api.h> #undef vl_msg_name_crc_list |