no_huge = 1;
}
+ else if (unformat (input, "enable-tcp-udp-checksum"))
+ {
+ dm->buffer_flags_template &=
+ ~(IP_BUFFER_L4_CHECKSUM_CORRECT | IP_BUFFER_L4_CHECKSUM_COMPUTED);
+ }
+
else if (unformat (input, "decimal-interface-names"))
dm->interface_name_format_decimal = 1;
dm->vhost_coalesce_frames = 32;
dm->vhost_coalesce_time = 1e-3;
+ /* Default vlib_buffer_t flags, DISABLES tcp/udp checksumming... */
+ dm->buffer_flags_template =
+ (VLIB_BUFFER_TOTAL_LENGTH_VALID
+ | IP_BUFFER_L4_CHECKSUM_COMPUTED
+ | IP_BUFFER_L4_CHECKSUM_CORRECT);
+
/* init CLI */
if ((error = vlib_call_init_function (vm, dpdk_cli_init)))
return error;
vlib_buffer_free_list_t * fl;
u8 efd_discard_burst = 0;
u16 ip_align_offset = 0;
-
+ u32 buffer_flags_template;
+
if (xd->admin_up == 0)
return 0;
if (xd->pmd == VNET_DPDK_PMD_THUNDERX)
ip_align_offset = 6;
+ buffer_flags_template = dm->buffer_flags_template;
+
vec_reset_length (xd->d_trace_buffers);
trace_cnt = n_trace = vlib_get_trace_count (vm, node);
b0->current_data += ip_align_offset;
}
- b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID;
+ b0->flags = buffer_flags_template;
if (VMWARE_LENGTH_BUG_WORKAROUND)
b0->current_length -= 4;
u16 queue_id = 0;
vlib_node_runtime_t * node_trace;
u32 first_worker_index = 0;
+ u32 buffer_flags_template;
/* Wait until the dpdk init sequence is complete */
while (dm->io_thread_release == 0)
/* packet tracing is triggered on the dpdk-input node for ease-of-use */
node_trace = vlib_node_get_runtime (vm, dpdk_input_node.index);
+ buffer_flags_template = dm->buffer_flags_template;
+
/* And handle them... */
while (1)
{
b0->current_data = l3_offset0;
b0->current_length = mb->data_len - l3_offset0;
- b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID;
+ b0->flags = buffer_flags_template;
if (VMWARE_LENGTH_BUG_WORKAROUND)
b0->current_length -= 4;
u16 queue_id = 0;
vlib_node_runtime_t * node_trace;
static u32 first_worker_index;
+ u32 buffer_flags_template;
if (PREDICT_FALSE(num_workers_set == 0))
{
/* packet tracing is triggered on the dpdk-input node for ease-of-use */
node_trace = vlib_node_get_runtime (vm, dpdk_input_node.index);
+ buffer_flags_template = dm->buffer_flags_template;
+
vec_foreach (xd, dm->devices)
{
u32 n_buffers;
b0->current_data = l3_offset0;
b0->current_length = mb->data_len - l3_offset0;
- b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID;
+ b0->flags = buffer_flags_template;
if (VMWARE_LENGTH_BUG_WORKAROUND)
b0->current_length -= 4;