summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/dpdk/buffer.c1
-rw-r--r--src/plugins/dpdk/device/init.c5
-rw-r--r--src/plugins/flowprobe/node.c4
-rw-r--r--src/plugins/igmp/igmp_pkt.c3
-rw-r--r--src/plugins/nat/nat_ipfix_logging.c36
-rw-r--r--src/plugins/nsim/nsim_input.c3
-rw-r--r--src/vlib/buffer.c1
-rw-r--r--src/vlib/buffer_funcs.h39
-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
17 files changed, 4 insertions, 118 deletions
diff --git a/src/plugins/dpdk/buffer.c b/src/plugins/dpdk/buffer.c
index 37966ba9759..626bea2e345 100644
--- a/src/plugins/dpdk/buffer.c
+++ b/src/plugins/dpdk/buffer.c
@@ -210,7 +210,6 @@ CLIB_MULTIARCH_FN (dpdk_buffer_fill_free_list) (vlib_main_t * vm,
return 0;
clib_memset (&bt, 0, sizeof (vlib_buffer_t));
- vlib_buffer_init_for_free_list (&bt, fl);
bt.buffer_pool_index = privp->buffer_pool_index;
_vec_len (d->mbuf_alloc_list) = n_alloc;
diff --git a/src/plugins/dpdk/device/init.c b/src/plugins/dpdk/device/init.c
index df1a823f6da..93f020595a9 100644
--- a/src/plugins/dpdk/device/init.c
+++ b/src/plugins/dpdk/device/init.c
@@ -273,11 +273,8 @@ dpdk_lib_init (dpdk_main_t * dm)
CLIB_CACHE_LINE_BYTES);
for (i = 0; i < tm->n_vlib_mains; i++)
{
- vlib_buffer_free_list_t *fl;
dpdk_per_thread_data_t *ptd = vec_elt_at_index (dm->per_thread_data, i);
- fl = vlib_buffer_get_free_list (vm,
- VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
- vlib_buffer_init_for_free_list (&ptd->buffer_template, fl);
+ clib_memset (&ptd->buffer_template, 0, sizeof (vlib_buffer_t));
ptd->buffer_template.flags = dm->buffer_flags_template;
vnet_buffer (&ptd->buffer_template)->sw_if_index[VLIB_TX] = (u32) ~ 0;
}
diff --git a/src/plugins/flowprobe/node.c b/src/plugins/flowprobe/node.c
index 2cd754b67bb..8dfc47cace9 100644
--- a/src/plugins/flowprobe/node.c
+++ b/src/plugins/flowprobe/node.c
@@ -631,7 +631,6 @@ flowprobe_get_buffer (vlib_main_t * vm, flowprobe_variant_t which)
flow_report_main_t *frm = &flow_report_main;
vlib_buffer_t *b0;
u32 bi0;
- vlib_buffer_free_list_t *fl;
u32 my_cpu_number = vm->thread_index;
/* Find or allocate a buffer */
@@ -650,9 +649,6 @@ flowprobe_get_buffer (vlib_main_t * vm, flowprobe_variant_t which)
/* Initialize the buffer */
b0 = fm->context[which].buffers_per_worker[my_cpu_number] =
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);
b0->current_data = 0;
diff --git a/src/plugins/igmp/igmp_pkt.c b/src/plugins/igmp/igmp_pkt.c
index 81b8ecb18bc..e93dd9c2667 100644
--- a/src/plugins/igmp/igmp_pkt.c
+++ b/src/plugins/igmp/igmp_pkt.c
@@ -27,7 +27,6 @@ vlib_buffer_append (vlib_buffer_t * b, uword l)
static vlib_buffer_t *
igmp_pkt_get_buffer (igmp_pkt_build_t * bk)
{
- vlib_buffer_free_list_t *fl;
vlib_main_t *vm;
vlib_buffer_t *b;
u32 bi;
@@ -38,8 +37,6 @@ igmp_pkt_get_buffer (igmp_pkt_build_t * bk)
return (NULL);
b = vlib_get_buffer (vm, bi);
- 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);
b->flags |= VNET_BUFFER_F_LOCALLY_ORIGINATED;
diff --git a/src/plugins/nat/nat_ipfix_logging.c b/src/plugins/nat/nat_ipfix_logging.c
index 042239fee85..8bee8e444dc 100644
--- a/src/plugins/nat/nat_ipfix_logging.c
+++ b/src/plugins/nat/nat_ipfix_logging.c
@@ -620,7 +620,6 @@ snat_ipfix_logging_nat44_ses (u8 nat_event, u32 src_ip, u32 nat_src_ip,
u32 offset;
vlib_main_t *vm = frm->vlib_main;
u64 now;
- vlib_buffer_free_list_t *fl;
u8 proto = ~0;
if (!silm->enabled)
@@ -645,9 +644,6 @@ snat_ipfix_logging_nat44_ses (u8 nat_event, u32 src_ip, u32 nat_src_ip,
}
b0 = silm->nat44_session_buffer = 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;
}
@@ -723,7 +719,6 @@ snat_ipfix_logging_addr_exhausted (u32 pool_id, int do_flush)
u32 offset;
vlib_main_t *vm = frm->vlib_main;
u64 now;
- vlib_buffer_free_list_t *fl;
u8 nat_event = NAT_ADDRESSES_EXHAUTED;
if (!silm->enabled)
@@ -746,9 +741,6 @@ snat_ipfix_logging_addr_exhausted (u32 pool_id, int do_flush)
}
b0 = silm->addr_exhausted_buffer = 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;
}
@@ -809,7 +801,6 @@ snat_ipfix_logging_max_entries_per_usr (u32 limit, u32 src_ip, int do_flush)
u32 offset;
vlib_main_t *vm = frm->vlib_main;
u64 now;
- vlib_buffer_free_list_t *fl;
u8 nat_event = QUOTA_EXCEEDED;
u32 quota_event = MAX_ENTRIES_PER_USER;
@@ -833,9 +824,6 @@ snat_ipfix_logging_max_entries_per_usr (u32 limit, u32 src_ip, int do_flush)
}
b0 = silm->max_entries_per_user_buffer = 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;
}
@@ -902,7 +890,6 @@ nat_ipfix_logging_max_ses (u32 limit, int do_flush)
u32 offset;
vlib_main_t *vm = frm->vlib_main;
u64 now;
- vlib_buffer_free_list_t *fl;
u8 nat_event = QUOTA_EXCEEDED;
u32 quota_event = MAX_SESSION_ENTRIES;
@@ -926,9 +913,6 @@ nat_ipfix_logging_max_ses (u32 limit, int do_flush)
}
b0 = silm->max_sessions_buffer = 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;
}
@@ -992,7 +976,6 @@ nat_ipfix_logging_max_bib (u32 limit, int do_flush)
u32 offset;
vlib_main_t *vm = frm->vlib_main;
u64 now;
- vlib_buffer_free_list_t *fl;
u8 nat_event = QUOTA_EXCEEDED;
u32 quota_event = MAX_BIB_ENTRIES;
@@ -1016,9 +999,6 @@ nat_ipfix_logging_max_bib (u32 limit, int do_flush)
}
b0 = silm->max_bibs_buffer = 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;
}
@@ -1082,7 +1062,6 @@ nat_ipfix_logging_max_frag_ip4 (u32 limit, u32 src, int do_flush)
u32 offset;
vlib_main_t *vm = frm->vlib_main;
u64 now;
- vlib_buffer_free_list_t *fl;
u8 nat_event = QUOTA_EXCEEDED;
u32 quota_event = MAX_FRAGMENTS_PENDING_REASSEMBLY;
@@ -1106,9 +1085,6 @@ nat_ipfix_logging_max_frag_ip4 (u32 limit, u32 src, int do_flush)
}
b0 = silm->max_frags_ip4_buffer = 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;
}
@@ -1175,7 +1151,6 @@ nat_ipfix_logging_max_frag_ip6 (u32 limit, ip6_address_t * src, int do_flush)
u32 offset;
vlib_main_t *vm = frm->vlib_main;
u64 now;
- vlib_buffer_free_list_t *fl;
u8 nat_event = QUOTA_EXCEEDED;
u32 quota_event = MAX_FRAGMENTS_PENDING_REASSEMBLY;
@@ -1199,9 +1174,6 @@ nat_ipfix_logging_max_frag_ip6 (u32 limit, ip6_address_t * src, int do_flush)
}
b0 = silm->max_frags_ip6_buffer = 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;
}
@@ -1270,7 +1242,6 @@ nat_ipfix_logging_nat64_bibe (u8 nat_event, ip6_address_t * src_ip,
u32 offset;
vlib_main_t *vm = frm->vlib_main;
u64 now;
- vlib_buffer_free_list_t *fl;
if (!silm->enabled)
return;
@@ -1292,9 +1263,6 @@ nat_ipfix_logging_nat64_bibe (u8 nat_event, ip6_address_t * src_ip,
}
b0 = silm->nat64_bib_buffer = 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;
}
@@ -1374,7 +1342,6 @@ nat_ipfix_logging_nat64_ses (u8 nat_event, ip6_address_t * src_ip,
u32 offset;
vlib_main_t *vm = frm->vlib_main;
u64 now;
- vlib_buffer_free_list_t *fl;
if (!silm->enabled)
return;
@@ -1396,9 +1363,6 @@ nat_ipfix_logging_nat64_ses (u8 nat_event, ip6_address_t * src_ip,
}
b0 = silm->nat64_ses_buffer = 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;
}
diff --git a/src/plugins/nsim/nsim_input.c b/src/plugins/nsim/nsim_input.c
index 2e328a58bf3..44c9f535f92 100644
--- a/src/plugins/nsim/nsim_input.c
+++ b/src/plugins/nsim/nsim_input.c
@@ -81,7 +81,6 @@ nsim_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
uword n_rx_packets = 0;
vlib_buffer_t *b0;
u32 bi0, next0;
- vlib_buffer_free_list_t *fl;
u32 *to_next;
u32 next_index;
u32 n_left_to_next;
@@ -100,7 +99,6 @@ nsim_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
* We use per-thread buffer caches, so we need the freelist to
* initialize them...
*/
- fl = vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
next_index = node->cached_next_index;
while (wp->cursize)
@@ -149,7 +147,6 @@ nsim_input_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
b0 = vlib_get_buffer (vm, bi0);
/* Initialize the buffer */
- vlib_buffer_init_for_free_list (b0, fl);
b0->current_data = 0;
b0->current_length = ep->current_length;
diff --git a/src/vlib/buffer.c b/src/vlib/buffer.c
index 547c26445af..419d7e2e172 100644
--- a/src/vlib/buffer.c
+++ b/src/vlib/buffer.c
@@ -531,7 +531,6 @@ vlib_buffer_fill_free_list_internal (vlib_main_t * vm,
vlib_buffer_set_known_state (vm, bi[0], VLIB_BUFFER_KNOWN_FREE);
clib_memset (b, 0, sizeof (vlib_buffer_t));
- vlib_buffer_init_for_free_list (b, fl);
if (fl->buffer_init_function)
fl->buffer_init_function (vm, fl, bi, 1);
diff --git a/src/vlib/buffer_funcs.h b/src/vlib/buffer_funcs.h
index 9095bd3387f..199dad03176 100644
--- a/src/vlib/buffer_funcs.h
+++ b/src/vlib/buffer_funcs.h
@@ -967,43 +967,6 @@ vlib_packet_template_free (vlib_main_t * vm, vlib_packet_template_t * t)
vec_free (t->packet_data);
}
-/* Set a buffer quickly into "uninitialized" state. We want this to
- be extremely cheap and arrange for all fields that need to be
- initialized to be in the first 128 bits of the buffer. */
-always_inline void
-vlib_buffer_init_for_free_list (vlib_buffer_t * dst,
- vlib_buffer_free_list_t * fl)
-{
- vlib_buffer_t *src = &fl->buffer_init_template;
-
- /* Make sure vlib_buffer_t is cacheline aligned and sized */
- ASSERT (STRUCT_OFFSET_OF (vlib_buffer_t, cacheline0) == 0);
- ASSERT (STRUCT_OFFSET_OF (vlib_buffer_t, cacheline1) ==
- CLIB_CACHE_LINE_BYTES);
- ASSERT (STRUCT_OFFSET_OF (vlib_buffer_t, cacheline2) ==
- CLIB_CACHE_LINE_BYTES * 2);
-
- /* Make sure buffer template is sane. */
- vlib_buffer_copy_template (dst, src);
-
- /* Not in the first 16 octets. */
- dst->n_add_refs = src->n_add_refs;
-
- /* Make sure it really worked. */
-#define _(f) ASSERT (dst->f == src->f);
- _(current_data);
- _(current_length);
- _(flags);
-#undef _
- /* ASSERT (dst->total_length_not_including_first_buffer == 0); */
- /* total_length_not_including_first_buffer is not in the template anymore
- * so it may actually not zeroed for some buffers. One option is to
- * uncomment the line lower (comes at a cost), the other, is to just not
- * care */
- /* dst->total_length_not_including_first_buffer = 0; */
- ASSERT (dst->n_add_refs == 0);
-}
-
static_always_inline vlib_buffer_pool_t *
vlib_buffer_pool_get (vlib_main_t * vm, u8 buffer_pool_index)
{
@@ -1020,7 +983,7 @@ vlib_buffer_add_to_free_list (vlib_main_t * vm,
vlib_buffer_t *b;
b = vlib_get_buffer (vm, buffer_index);
if (PREDICT_TRUE (do_init))
- vlib_buffer_init_for_free_list (b, f);
+ clib_memset (b, 0, STRUCT_OFFSET_OF (vlib_buffer_t, template_end));
vec_add1_aligned (f->buffers, buffer_index, CLIB_CACHE_LINE_BYTES);
if (vec_len (f->buffers) > 4 * VLIB_FRAME_SIZE)
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. */