42 #define _(a, b, c) if (rd->flags & (1 << a)) \ 43 t = format (t, "%s%s", t ? " ":"", c); 55 char **strs = va_arg (*args,
char **);
56 u32 n_strs = va_arg (*args,
u32);
61 if ((flags & (1 << i)))
63 if (i < n_strs && strs[i] != 0)
64 s =
format (s,
" %s", strs[i]);
66 s =
format (s,
" unknown(%u)", i);
105 if (rd->
flags & RDMA_DEVICE_F_MLX5DV)
107 struct mlx5dv_context c = { };
108 const char *str_flags[7] = {
"cqe-v1",
"obsolete",
"mpw-allowed",
109 "enhanced-mpw",
"cqe-128b-comp",
"cqe-128b-pad",
110 "packet-based-credit-mode" 113 if (mlx5dv_query_device (rd->
ctx, &c) != 0)
118 s =
format (s,
"\n%Udevice flags: %U",
135 char *l4_hdr_types[8] =
136 { 0,
"tcp",
"udp",
"tcp-empty-ack",
"tcp-with-acl" };
137 char *l3_hdr_types[4] = { 0,
"ip6",
"ip4" };
141 s =
format (s,
"rdma: %v (%d) next-node %U",
155 s =
format (s,
" ip-frag");
158 s =
format (s,
" %s", l3_hdr_types[l3_hdr_type]);
161 s =
format (s,
" %s", l4_hdr_types[l4_hdr_type]);
166 s =
format (s,
" ip4-ext-hdr");
168 s =
format (s,
" ip4-opt");
177 void *ptr = va_arg (*args,
void *);
179 u32 sb = va_arg (*args,
u32);
180 u32 eb = va_arg (*args,
u32);
182 if (sb == 63 && eb == 0)
185 return format (s,
"0x%lx", x);
191 s =
format (s,
" (0x%x)", x);
198 void *ptr = va_arg (*args,
void *);
200 u32 sb = va_arg (*args,
u32);
201 u32 eb = va_arg (*args,
u32);
202 char *
name = va_arg (*args,
char *);
206 tmp =
format (0,
"0x%02x %s ", offset, name);
208 tmp =
format (tmp,
"[%u]", sb);
210 tmp =
format (tmp,
"[%u:%u]", sb, eb);
220 void *cqe = va_arg (*args,
void *);
224 #define _(a, b, c, d) \ 225 if (mlx5_get_bits (cqe, a, b, c)) \ 226 s = format (s, "%U%U\n", \ 227 format_white_space, line++ ? indent : 0, \ 228 format_mlx5_field, cqe, a, b, c, #d); 238 u32 queue_index = va_arg (*args,
u32);
244 if (rd->
flags & RDMA_DEVICE_F_MLX5DV)
247 s =
format (s,
"\n%Uwq: stride %u wqe-cnt %u",
250 s =
format (s,
"\n%Ucq: cqn %u cqe-cnt %u ci %u",
u8 * format_clib_error(u8 *s, va_list *va)
vl_api_wireguard_peer_flags_t flags
vnet_main_t * vnet_get_main(void)
#define CQE_FLAG_L4_HDR_TYPE(f)
vlib_pci_device_info_t * pci
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
static void vlib_pci_free_device_info(vlib_pci_device_info_t *di)
#define CQE_FLAG_L3_HDR_TYPE_IP6
static u64 mlx5_get_u64(void *start, int offset)
#define foreach_cqe_rx_field
#define CQE_FLAG_L3_HDR_TYPE_IP4
#define vec_elt_at_index(v, i)
Get vector value at index i checking that i is in bounds.
format_function_t format_vlib_next_node_name
vlib_pci_device_info_t * vlib_pci_get_device_info(vlib_main_t *vm, vlib_pci_addr_t *addr, clib_error_t **error)
#define CQE_FLAG_L3_HDR_TYPE(f)
#define CQE_FLAG_IP_EXT_OPTS
format_function_t format_vlib_pci_vpd
sll srl srl sll sra u16x4 i
#define vec_free(V)
Free vector's memory (no header).
vlib_main_t vlib_node_runtime_t * node
static vlib_main_t * vlib_get_main(void)
template key/value backing page structure
static u32 mlx5_get_bits(void *start, int offset, int first, int last)
format_function_t format_vlib_pci_addr