summaryrefslogtreecommitdiffstats
path: root/src/vnet/devices/af_packet/af_packet_api.c
diff options
context:
space:
mode:
authorMohsin Kazmi <sykazmi@cisco.com>2022-04-05 12:43:13 +0000
committerBeno�t Ganne <bganne@cisco.com>2022-04-07 11:22:41 +0000
commit788676b211cf5a3e54bac1f564f069941562437e (patch)
treea210063d85b53f78e8b9aac834182144ab014456 /src/vnet/devices/af_packet/af_packet_api.c
parent43daea8309e9f58468ad562e15b81c5a4d8aa2b2 (diff)
devices: add cli support for checksum and gso disable
Type: improvement Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com> Change-Id: I33a29cf11998736347eca5016eee112619d847c1
Diffstat (limited to 'src/vnet/devices/af_packet/af_packet_api.c')
-rw-r--r--src/vnet/devices/af_packet/af_packet_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vnet/devices/af_packet/af_packet_api.c b/src/vnet/devices/af_packet/af_packet_api.c
index 2a58ba7438a..d991a2e6852 100644
--- a/src/vnet/devices/af_packet/af_packet_api.c
+++ b/src/vnet/devices/af_packet/af_packet_api.c
@@ -48,7 +48,7 @@ vl_api_af_packet_create_t_handler (vl_api_af_packet_create_t * mp)
arg->hw_addr = mp->use_random_hw_addr ? 0 : mp->hw_addr;
arg->mode = AF_PACKET_IF_MODE_ETHERNET;
// Default flags
- arg->flags = AF_PACKET_IF_FLAGS_QDISC_BYPASS;
+ arg->flags = AF_PACKET_IF_FLAGS_QDISC_BYPASS | AF_PACKET_IF_FLAGS_CKSUM_GSO;
rv = af_packet_create_if (arg);
vec_free (arg->host_if_name);
@@ -80,7 +80,7 @@ vl_api_af_packet_create_v2_t_handler (vl_api_af_packet_create_v2_t *mp)
arg->hw_addr = mp->use_random_hw_addr ? 0 : mp->hw_addr;
arg->mode = AF_PACKET_IF_MODE_ETHERNET;
// Default flags
- arg->flags = AF_PACKET_IF_FLAGS_QDISC_BYPASS;
+ arg->flags = AF_PACKET_IF_FLAGS_QDISC_BYPASS | AF_PACKET_IF_FLAGS_CKSUM_GSO;
if (mp->num_rx_queues > 1)
arg->num_rxqs = clib_net_to_host_u16 (mp->num_rx_queues);