summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/bfd/bfd_main.c2
-rw-r--r--src/vnet/bfd/bfd_udp.c1
-rw-r--r--src/vnet/dhcp/dhcp6_proxy_node.c5
-rwxr-xr-xsrc/vnet/ip/ip6_neighbor.c3
-rw-r--r--src/vnet/ip/ip_frag.c3
-rwxr-xr-xsrc/vnet/ip/ping.c3
-rw-r--r--src/vnet/ipfix-export/flow_report.c5
-rw-r--r--src/vnet/ipfix-export/ipfix_doc.md4
-rw-r--r--src/vnet/syslog/syslog.c4
9 files changed, 2 insertions, 28 deletions
diff --git a/src/vnet/bfd/bfd_main.c b/src/vnet/bfd/bfd_main.c
index ea584130d58..0cc7d72c600 100644
--- a/src/vnet/bfd/bfd_main.c
+++ b/src/vnet/bfd/bfd_main.c
@@ -908,7 +908,6 @@ bfd_send_echo (vlib_main_t * vm, vlib_node_runtime_t * rt,
}
vlib_buffer_t *b = vlib_get_buffer (vm, bi);
ASSERT (b->current_data == 0);
- clib_memset (vnet_buffer (b), 0, sizeof (*vnet_buffer (b)));
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b);
bfd_echo_pkt_t *pkt = vlib_buffer_get_current (b);
clib_memset (pkt, 0, sizeof (*pkt));
@@ -982,7 +981,6 @@ bfd_send_periodic (vlib_main_t * vm, vlib_node_runtime_t * rt,
}
vlib_buffer_t *b = vlib_get_buffer (vm, bi);
ASSERT (b->current_data == 0);
- clib_memset (vnet_buffer (b), 0, sizeof (*vnet_buffer (b)));
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b);
bfd_init_control_frame (bm, bs, b);
switch (bs->poll_state)
diff --git a/src/vnet/bfd/bfd_udp.c b/src/vnet/bfd/bfd_udp.c
index d35c6dee5e1..041e5840e0b 100644
--- a/src/vnet/bfd/bfd_udp.c
+++ b/src/vnet/bfd/bfd_udp.c
@@ -1239,7 +1239,6 @@ bfd_udp_input (vlib_main_t * vm, vlib_node_runtime_t * rt,
{
b0->current_data = 0;
b0->current_length = 0;
- clib_memset (vnet_buffer (b0), 0, sizeof (*vnet_buffer (b0)));
bfd_init_final_control_frame (vm, b0, bfd_udp_main.bfd_main, bs,
0);
if (is_ipv6)
diff --git a/src/vnet/dhcp/dhcp6_proxy_node.c b/src/vnet/dhcp/dhcp6_proxy_node.c
index ea06c18cb10..92e011bdbb0 100644
--- a/src/vnet/dhcp/dhcp6_proxy_node.c
+++ b/src/vnet/dhcp/dhcp6_proxy_node.c
@@ -179,7 +179,6 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm,
dhcpv6_client_mac_t *cmac; // client mac
ethernet_header_t *e_h0;
u8 client_src_mac[6];
- vlib_buffer_free_list_t *fl;
dhcp_vss_t *vss;
u8 is_solicit = 0;
@@ -315,11 +314,9 @@ dhcpv6_proxy_to_server_input (vlib_main_t * vm,
copy_ip6_address (&r1->link_addr, ia0);
link_address_set:
- fl = vlib_buffer_get_free_list
- (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
if ((b0->current_length + sizeof (*id1) + sizeof (*vss1) +
- sizeof (*cmac)) > fl->n_data_bytes)
+ sizeof (*cmac)) > VLIB_BUFFER_DATA_SIZE)
{
error0 = DHCPV6_PROXY_ERROR_PKT_TOO_BIG;
next0 = DHCPV6_PROXY_TO_SERVER_INPUT_NEXT_DROP;
diff --git a/src/vnet/ip/ip6_neighbor.c b/src/vnet/ip/ip6_neighbor.c
index d501832bed2..b4b6888a934 100755
--- a/src/vnet/ip/ip6_neighbor.c
+++ b/src/vnet/ip/ip6_neighbor.c
@@ -2307,7 +2307,6 @@ create_buffer_for_rs (vlib_main_t * vm, ip6_radv_t * radv_info)
{
u32 bi0;
vlib_buffer_t *p0;
- vlib_buffer_free_list_t *fl;
icmp6_router_solicitation_header_t *rh;
u16 payload_length;
int bogus_length;
@@ -2322,8 +2321,6 @@ create_buffer_for_rs (vlib_main_t * vm, ip6_radv_t * radv_info)
}
p0 = vlib_get_buffer (vm, bi0);
- fl = vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
- vlib_buffer_init_for_free_list (p0, fl);
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (p0);
p0->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
diff --git a/src/vnet/ip/ip_frag.c b/src/vnet/ip/ip_frag.c
index de0998779a8..de297767a70 100644
--- a/src/vnet/ip/ip_frag.c
+++ b/src/vnet/ip/ip_frag.c
@@ -78,9 +78,6 @@ frag_buffer_alloc (vlib_buffer_t * org_b, u32 * bi)
return 0;
vlib_buffer_t *b = vlib_get_buffer (vm, *bi);
- vlib_buffer_free_list_t *fl =
- vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
- vlib_buffer_init_for_free_list (b, fl);
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b);
vlib_buffer_copy_trace_flag (vm, org_b, *bi);
diff --git a/src/vnet/ip/ping.c b/src/vnet/ip/ping.c
index 92a92e50201..890285f2606 100755
--- a/src/vnet/ip/ping.c
+++ b/src/vnet/ip/ping.c
@@ -745,15 +745,12 @@ send_ip46_ping (vlib_main_t * vm,
u32 bi0 = 0;
int n_buf0 = 0;
vlib_buffer_t *b0;
- vlib_buffer_free_list_t *fl;
n_buf0 = vlib_buffer_alloc (vm, &bi0, 1);
if (n_buf0 < 1)
ERROR_OUT (SEND_PING_ALLOC_FAIL);
b0 = vlib_get_buffer (vm, bi0);
- fl = vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
- vlib_buffer_init_for_free_list (b0, fl);
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
/*
diff --git a/src/vnet/ipfix-export/flow_report.c b/src/vnet/ipfix-export/flow_report.c
index c9370a748cf..da91a7c3dfb 100644
--- a/src/vnet/ipfix-export/flow_report.c
+++ b/src/vnet/ipfix-export/flow_report.c
@@ -86,7 +86,6 @@ send_template_packet (flow_report_main_t * frm,
udp_header_t *udp;
vlib_main_t *vm = frm->vlib_main;
flow_report_stream_t *stream;
- vlib_buffer_free_list_t *fl;
ASSERT (buffer_indexp);
@@ -120,11 +119,9 @@ send_template_packet (flow_report_main_t * frm,
b0 = vlib_get_buffer (vm, bi0);
/* Initialize the buffer */
- fl = vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
- vlib_buffer_init_for_free_list (b0, fl);
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
- ASSERT (vec_len (fr->rewrite) < VLIB_BUFFER_DEFAULT_FREE_LIST_BYTES);
+ ASSERT (vec_len (fr->rewrite) < VLIB_BUFFER_DATA_SIZE);
clib_memcpy_fast (b0->data, fr->rewrite, vec_len (fr->rewrite));
b0->current_data = 0;
diff --git a/src/vnet/ipfix-export/ipfix_doc.md b/src/vnet/ipfix-export/ipfix_doc.md
index 95db15cc341..5feea0e19fa 100644
--- a/src/vnet/ipfix-export/ipfix_doc.md
+++ b/src/vnet/ipfix-export/ipfix_doc.md
@@ -284,7 +284,6 @@ This function creates the packet header for an ipfix data packet
vlib_buffer_t *b0 = 0;
u32 bi0 = ~0;
u32 offset;
- vlib_buffer_free_list_t *fl;
b0 = mlm->buffers_by_thread[thread_index];
@@ -300,9 +299,6 @@ This function creates the packet header for an ipfix data packet
}
b0 = vlib_get_buffer (vm, bi0);
- fl =
- vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
- vlib_buffer_init_for_free_list (b0, fl);
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0);
offset = 0;
mlm->buffers_by_thread[thread_index] = b0;
diff --git a/src/vnet/syslog/syslog.c b/src/vnet/syslog/syslog.c
index 1cffe03d768..462c5deeecd 100644
--- a/src/vnet/syslog/syslog.c
+++ b/src/vnet/syslog/syslog.c
@@ -163,7 +163,6 @@ syslog_msg_send (syslog_msg_t * syslog_msg)
u32 bi, msg_len, *to_next;
u8 *tmp;
vlib_buffer_t *b;
- vlib_buffer_free_list_t *fl;
vlib_frame_t *f;
int i;
@@ -171,9 +170,6 @@ syslog_msg_send (syslog_msg_t * syslog_msg)
return -1;
b = vlib_get_buffer (vm, bi);
- clib_memset (vnet_buffer (b), 0, sizeof (*vnet_buffer (b)));
- fl = vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
- vlib_buffer_init_for_free_list (b, fl);
VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b);
/* one message per UDP datagram RFC5426 3.1. */