t->skip_n_vectors = skip_n_vectors;
t->entries_per_page = 2;
-#if USE_DLMALLOC == 0
- t->mheap = mheap_alloc (0 /* use VM */ , memory_size);
-#else
t->mheap = create_mspace (memory_size, 1 /* locked */ );
/* classifier requires the memory to be contiguous, so can not expand. */
mspace_disable_expand (t->mheap);
-#endif
vec_validate_aligned (t->buckets, nbuckets - 1, CLIB_CACHE_LINE_BYTES);
oldheap = clib_mem_set_heap (t->mheap);
vec_free (t->mask);
vec_free (t->buckets);
-#if USE_DLMALLOC == 0
- mheap_free (t->mheap);
-#else
destroy_mspace (t->mheap);
-#endif
-
pool_put (cm->tables, t);
}
if (sw_if_index == ~0 && pkt_trace == 0 && pcap == 0)
return clib_error_return (0, "Must specify trace, pcap or interface...");
+ if (pkt_trace && pcap)
+ return clib_error_return
+ (0, "Packet trace and pcap are mutually exclusive...");
+
if (pkt_trace && sw_if_index != ~0)
return clib_error_return (0, "Packet trace filter is per-system");
if (verbose)
{
- u8 *s = 0;
u32 table_index;
for (j = 0; j < vec_len (set->table_indices); j++)
}
else
{
- u8 *s = 0;
- table_index = set->table_indices[0];
+ table_index = set->table_indices ? set->table_indices[0] : ~0;
if (table_index != ~0)
s = format (s, " %u", table_index);