{
uword size = va_arg (*args, uword);
- if (size >= (1>>20)) {
+ if (size >= (1<<20)) {
s = format (s, "(%d mb)", size >> 20);
- } else if (size >= (1>>10)) {
+ } else if (size >= (1<<10)) {
s = format (s, "(%d kb)", size >> 10);
} else {
s = format (s, "(%d bytes)", size);
vlib/unix/plugin.h \
vlib/unix/unix.h
+if !WITH_DPDK
noinst_PROGRAMS = vlib_unix
vlib_unix_SOURCES = \
vlib_unix_LDADD = libvlib_unix.la libvlib.la \
-lvppinfra -lpthread -lm -ldl -lrt
+endif
vlib_buffer_t * b;
int n, i;
u32 bi;
- u32 n_remaining, n_alloc;
+ u32 n_remaining = 0, n_alloc = 0;
unsigned socket_id = rte_socket_id ? rte_socket_id() : 0;
struct rte_mempool *rmp = vm->buffer_main->pktmbuf_pools[socket_id];
struct rte_mbuf *mb;
r->clocks_since_last_overflow = 0;
}
-always_inline void
+always_inline void __attribute__((unused))
vlib_process_sync_stats (vlib_main_t * vm,
vlib_process_t * p,
uword n_calls,
if (!tm->main_lcore)
{
tm->main_lcore = clib_bitmap_first_set(avail_cpu);
- if (tm->main_lcore == ~0)
+ if (tm->main_lcore == (u8) ~0)
return clib_error_return (0, "no available cpus to be used for the"
" main thread");
}
{ /* IP[46] */
ip_lookup_main_t * lm;
ip_config_main_t * ipcm;
- ip4_rx_feature_type_t ftype;
+ u32 ftype;
u32 ci;
if (tid == INPUT_ACL_TABLE_IP4)
ip0 = arp0->ip4_over_ethernet[1].ip4.as_u32;
bd_index0 = vnet_buffer(p0)->l2.bd_index;
if (PREDICT_FALSE (
- (bd_index0 != last_bd_index) || (last_bd_index == ~0)))
+ (bd_index0 != last_bd_index) || (last_bd_index == (u16) ~0)))
{
last_bd_index = bd_index0;
last_bd_config = vec_elt_at_index(l2im->bd_configs, bd_index0);
{
icmp4_main_t * im = &icmp4_main;
- ASSERT (type < ARRAY_LEN (im->ip4_input_next_index_by_type));
+ ASSERT ((int)type < ARRAY_LEN (im->ip4_input_next_index_by_type));
im->ip4_input_next_index_by_type[type]
= vlib_node_add_next (vm, ip4_icmp_input_node.index, node_index);
}
{
icmp6_main_t * im = &icmp6_main;
- ASSERT (type < ARRAY_LEN (im->input_next_index_by_type));
+ ASSERT ((int) type < ARRAY_LEN (im->input_next_index_by_type));
im->input_next_index_by_type[type]
= vlib_node_add_next (vm, ip6_icmp_input_node.index, node_index);
}
[IP_LOOKUP_NEXT_MAP] = "ip4-map",
[IP_LOOKUP_NEXT_MAP_T] = "ip4-map-t",
[IP_LOOKUP_NEXT_SIXRD] = "ip4-sixrd",
- [IP_LOOKUP_NEXT_SIXRD] = "ip4-sixrd",
[IP_LOOKUP_NEXT_HOP_BY_HOP] = "ip4-hop-by-hop", /* probably not */
[IP_LOOKUP_NEXT_ADD_HOP_BY_HOP] = "ip4-add-hop-by-hop",
[IP_LOOKUP_NEXT_POP_HOP_BY_HOP] = "ip4-pop-hop-by-hop",
always_inline void
ip4_multicast_address_set_for_group (ip4_address_t * a, ip_multicast_group_t g)
{
- ASSERT (g < (1 << 28));
+ ASSERT ((u32) g < (1 << 28));
a->as_u32 = clib_host_to_net_u32 ((0xe << 28) + g);
}
return s;
}
-always_inline intf_output_feat_t
+always_inline intf_output_feat_t __attribute__((unused))
get_next_intf_output_feature_and_reset_bit(vlib_buffer_t *b)
{
u32 next_feature;
ip_config_main_t * rx_cm = &lm->rx_config_mains[VNET_UNICAST];
u32 ci;
ip6_l2tpv3_config_t config;
- ip4_rx_feature_type_t type;
+ ip6_rx_feature_type_t type;
if (pool_is_free_index (vnm->interface_main.sw_interfaces, sw_if_index))
return VNET_API_ERROR_INVALID_SW_IF_INDEX;
u8 tc = mm->tc_copy ? ip4->tos : mm->tc;
u32 vtcfl = 0x6 << 28;
vtcfl |= tc << 20;
- vtcfl |= vnet_buffer(p)->ip.flow_hash && 0x000fffff;
+ vtcfl |= vnet_buffer(p)->ip.flow_hash & 0x000fffff;
return (clib_host_to_net_u32(vtcfl));
}
u16 frag_id0, frag_offset0,
frag_id1, frag_offset1;
u8 frag_more0, frag_more1;
- ip6_mapt_fragmented_next_t next0, next1;
+ u32 next0, next1;
pi0 = to_next[0] = from[0];
pi1 = to_next[1] = from[1];
u16 frag_id0;
u8 frag_more0;
u16 frag_offset0;
- ip6_mapt_fragmented_next_t next0;
+ u32 next0;
pi0 = to_next[0] = from[0];
from += 1;
uint32_t max;
uint32_t scale_shift;
uint32_t scale_amount;
- uint32_t orig_current_limit = *current_limit;
+ uint32_t __attribute__((unused)) orig_current_limit = *current_limit;
// Compute period. For 1Ghz-to-8Ghz CPUs, the period will be in
// the range of 16 to 116 usec.
(unsigned long long)effective_BPS,
(double)cir_rate / (double)effective_BPS);
}
-#else
- orig_current_limit = orig_current_limit; // Make compiler happy
#endif
return 0; // ok
[SRP_IPS_REQUEST_signal_fail] = 1,
[SRP_IPS_REQUEST_signal_degrade] = 1,
};
- return r < ARRAY_LEN (t) ? t[r] : 0;
+ return (int) r < ARRAY_LEN (t) ? t[r] : 0;
}
/* Called when an IPS control packet is received on given interface. */
u32 run_length;
u8 in_run;
u64 offset0 = 0, offset1 = 0;
- clib_error_t * error;
+ clib_error_t * error = 0;
int fix_in_place = 0;
if (!strcmp (tm->input_file, tm->output_file))
elog_enable_disable (elog_main_t * em, int is_enabled)
{
em->n_total_events = 0;
- em->n_total_events_disable_limit = is_enabled ? ~0ULL : 0ULL;
+ em->n_total_events_disable_limit = is_enabled ? ~0 : 0;
}
/* Disable logging after specified number of ievents have been logged.
}
/* Convert bin to size. */
-always_inline uword bin_to_size (uword bin)
+always_inline __attribute__((unused)) uword bin_to_size (uword bin)
{
uword size;
c->state[3] = 0x10325476;
}
-always_inline void
+always_inline void __attribute__((unused))
md5_fill_buffer_aligned (md5_context_t * c,
u32 * d32)
{
return (n_bytes - STRUCT_OFFSET_OF (mheap_elt_t, user_data));
}
-always_inline uword
+always_inline uword __attribute__((unused))
mheap_elt_size_to_user_n_words (uword n_bytes)
{
ASSERT (n_bytes % MHEAP_USER_DATA_WORD_BYTES == 0);
{
u8 * bigboy = 0;
u64 one_gig = (1<<30);
- u64 size, index;
+ u64 size;
+ i64 index;
fformat (stdout, "giant vector test...");
size = 5ULL * one_gig;