34 s =
format (s,
"vmxnet3-%x/%x/%x/%x",
35 addr->domain, addr->bus, addr->slot, addr->function);
45 #define _(a, b, c) if (vd->flags & (1 << a)) \ 46 t = format (t, "%s%s", t ? " ":"", c); 68 s =
format (s,
"\n%Urx queues %u, rx desc %u, tx queues %u, tx desc %u",
82 s =
format (s,
"\n%U TSO packets %llu",
84 tx->stats.tso_pkts - txs->tso_pkts);
85 s =
format (s,
"\n%U TSO bytes %llu",
87 tx->stats.tso_bytes - txs->tso_bytes);
88 s =
format (s,
"\n%U ucast packets %llu",
90 tx->stats.ucast_pkts - txs->ucast_pkts);
91 s =
format (s,
"\n%U ucast bytes %llu",
93 tx->stats.ucast_bytes - txs->ucast_bytes);
94 s =
format (s,
"\n%U mcast packets %llu",
96 tx->stats.mcast_pkts - txs->mcast_pkts);
97 s =
format (s,
"\n%U mcast bytes %llu",
99 tx->stats.mcast_bytes - txs->mcast_bytes);
100 s =
format (s,
"\n%U bcast packets %llu",
102 tx->stats.bcast_pkts - txs->bcast_pkts);
103 s =
format (s,
"\n%U bcast bytes %llu",
105 tx->stats.bcast_bytes - txs->bcast_bytes);
106 s =
format (s,
"\n%U Errors packets %llu",
108 tx->stats.error_pkts - txs->error_pkts);
109 s =
format (s,
"\n%U Discard packets %llu",
111 tx->stats.discard_pkts - txs->discard_pkts);
120 s =
format (s,
"\n%U LRO packets %llu",
122 rx->stats.lro_pkts - rxs->lro_pkts);
123 s =
format (s,
"\n%U LRO bytes %llu",
125 rx->stats.lro_bytes - rxs->lro_bytes);
126 s =
format (s,
"\n%U ucast packets %llu",
128 rx->stats.ucast_pkts - rxs->ucast_pkts);
129 s =
format (s,
"\n%U ucast bytes %llu",
131 rx->stats.ucast_bytes - rxs->ucast_bytes);
132 s =
format (s,
"\n%U mcast packets %llu",
134 rx->stats.mcast_pkts - rxs->mcast_pkts);
135 s =
format (s,
"\n%U mcast bytes %llu",
137 rx->stats.mcast_bytes - rxs->mcast_bytes);
138 s =
format (s,
"\n%U bcast packets %llu",
140 rx->stats.bcast_pkts - rxs->bcast_pkts);
141 s =
format (s,
"\n%U bcast bytes %llu",
143 rx->stats.bcast_bytes - rxs->bcast_bytes);
144 s =
format (s,
"\n%U No Bufs %llu",
146 rx->stats.nobuf_pkts - rxs->nobuf_pkts);
147 s =
format (s,
"\n%U Error packets %llu",
149 rx->stats.error_pkts - rxs->error_pkts);
164 s =
format (s,
"vmxnet3: %v (%d) next-node %U",
#define vec_foreach_index(var, v)
Iterate over vector indices.
u8 * format_clib_error(u8 *s, va_list *va)
vnet_main_t * vnet_get_main(void)
vlib_pci_dev_handle_t pci_dev_handle
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
#define VMXNET3_RX_START(vd)
vmxnet3_main_t vmxnet3_main
vmxnet3_tx_stats * tx_stats
static_always_inline void vmxnet3_reg_write(vmxnet3_device_t *vd, u8 bar, u32 addr, u32 val)
#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
format_function_t format_vnet_buffer
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
vlib_pci_addr_t * vlib_pci_get_addr(vlib_main_t *vm, vlib_pci_dev_handle_t h)
vmxnet3_rx_stats * rx_stats
static vlib_main_t * vlib_get_main(void)
#define VMXNET3_TX_START(vd)
vmxnet3_device_t * devices