aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet/af_packet_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/devices/af_packet/af_packet_api.c')
-rw-r--r--src/vnet/devices/af_packet/af_packet_api.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/vnet/devices/af_packet/af_packet_api.c b/src/vnet/devices/af_packet/af_packet_api.c
index 414c838cdf7..c7dfabc2ebd 100644
--- a/src/vnet/devices/af_packet/af_packet_api.c
+++ b/src/vnet/devices/af_packet/af_packet_api.c
@@ -42,9 +42,10 @@
#include <vlibapi/api_helper_macros.h>
-#define foreach_vpe_api_msg \
-_(AF_PACKET_CREATE, af_packet_create) \
-_(AF_PACKET_DELETE, af_packet_delete)
+#define foreach_vpe_api_msg \
+_(AF_PACKET_CREATE, af_packet_create) \
+_(AF_PACKET_DELETE, af_packet_delete) \
+_(AF_PACKET_SET_L4_CKSUM_OFFLOAD, af_packet_set_l4_cksum_offload)
static void
vl_api_af_packet_create_t_handler (vl_api_af_packet_create_t * mp)
@@ -90,6 +91,18 @@ vl_api_af_packet_delete_t_handler (vl_api_af_packet_delete_t * mp)
REPLY_MACRO (VL_API_AF_PACKET_DELETE_REPLY);
}
+static void
+ vl_api_af_packet_set_l4_cksum_offload_t_handler
+ (vl_api_af_packet_set_l4_cksum_offload_t * mp)
+{
+ vlib_main_t *vm = vlib_get_main ();
+ vl_api_af_packet_delete_reply_t *rmp;
+ int rv = 0;
+
+ rv = af_packet_set_l4_cksum_offload (vm, mp->sw_if_index, mp->set);
+ REPLY_MACRO (VL_API_AF_PACKET_SET_L4_CKSUM_OFFLOAD_REPLY);
+}
+
/*
* af_packet_api_hookup
* Add vpe's API message handlers to the table.