|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
45 u32 *v = va_arg (*va,
u32 *);
46 char *
fmt = va_arg (*va,
char *);
61 char *
fmt = va_arg (*va,
char *);
76 u8 *v = va_arg (*va,
u8 *);
86 u8 *bytes = va_arg (*va,
u8 *);
87 int n_bytes = va_arg (*va,
int);
99 if (!short_form && (
i % 32) == 0)
102 s =
format (s,
"%02x", bytes[
i]);
104 if (!short_form && ((
i + 1) % 32) == 0 && (
i + 1) <
n_bytes)
114 u8 *bytes = va_arg (*va,
u8 *);
115 int n_bytes = va_arg (*va,
int);
122 s =
format (s,
"%02x", bytes[
i]);
131 u32 n = va_arg (*va,
u32);
140 u8 *
fmt = va_arg (*args,
u8 *);
141 f64 t = va_arg (*args,
f64);
144 const f64 seconds_per_minute = 60;
145 const f64 seconds_per_hour = 60 * seconds_per_minute;
146 const f64 seconds_per_day = 24 * seconds_per_hour;
147 uword days, hours, minutes, secs, msecs, usecs;
149 days = t / seconds_per_day;
150 t -= days * seconds_per_day;
152 hours = t / seconds_per_hour;
153 t -= hours * seconds_per_hour;
155 minutes = t / seconds_per_minute;
156 t -= minutes * seconds_per_minute;
167 char *what_fmt =
"%d";
201 s =
format (s, what_fmt, what);
224 u = (
uword) 1 << log_u;
231 s =
format (s,
"%c",
" kmg"[log_u / 10]);
243 if (!
unformat (input,
"%wd%_", &amount))
267 *result = amount << shift;
278 return format (s,
"unknown");
281 return format (s,
"default");
284 return format (s,
"default-hugepage");
286 if (log2_page_sz >= 30)
287 return format (s,
"%uG", 1 << (log2_page_sz - 30));
289 if (log2_page_sz >= 20)
290 return format (s,
"%uM", 1 << (log2_page_sz - 20));
292 if (log2_page_sz >= 10)
293 return format (s,
"%uK", 1 << (log2_page_sz - 10));
295 return format (s,
"%u", 1 << log2_page_sz);
305 if (
unformat (input,
"default-hugepage"))
307 else if (
unformat (input,
"default"))
309 else if (
unformat (input,
"%wdk", &amount))
311 else if (
unformat (input,
"%wdK", &amount))
313 else if (
unformat (input,
"%wdm", &amount))
315 else if (
unformat (input,
"%wdM", &amount))
317 else if (
unformat (input,
"%wdg", &amount))
319 else if (
unformat (input,
"%wdG", &amount))
331 u8 *
id = va_arg (*va,
u8 *);
339 for (
i = 0;
i < l &&
id[
i] != 0;
i++)
357 const int line_len = 16;
369 if (!((
i + 1) % line_len))
371 s =
format (s,
"%U%05x: %v[%v]",
373 index, line_hex, line_str);
382 while (
i++ % line_len)
383 line_hex =
format (line_hex,
" ");
386 s =
format (s,
"%U%05x: %v[%v]",
388 index, line_hex, line_str);
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
#define vec_add(V, E, N)
Add N elements to end of vector V (no header, unspecified alignment)
static uword clib_mem_is_vec(void *v)
Predicate function, says whether the supplied vector is a clib heap object.
@ CLIB_MEM_PAGE_SZ_DEFAULT_HUGE
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
description fragment has unexpected format
@ CLIB_MEM_PAGE_SZ_DEFAULT
static uword min_log2(uword x)
@ CLIB_MEM_PAGE_SZ_UNKNOWN