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); 61 vmxnet3_queues *q = &vd->
dma->queues;
66 s =
format (s,
"\n%Urx queues %u, rx desc %u, tx queues %u, tx desc %u",
76 s =
format (s,
"\n%U TSO packets %llu",
78 q->tx.stats.tso_pkts - vd->
tx_stats.tso_pkts);
79 s =
format (s,
"\n%U TSO bytes %llu",
81 q->tx.stats.tso_bytes - vd->
tx_stats.tso_bytes);
82 s =
format (s,
"\n%U ucast packets %llu",
84 q->tx.stats.ucast_pkts - vd->
tx_stats.ucast_pkts);
85 s =
format (s,
"\n%U ucast bytes %llu",
87 q->tx.stats.ucast_bytes - vd->
tx_stats.ucast_bytes);
88 s =
format (s,
"\n%U mcast packets %llu",
90 q->tx.stats.mcast_pkts - vd->
tx_stats.mcast_pkts);
91 s =
format (s,
"\n%U mcast bytes %llu",
93 q->tx.stats.mcast_bytes - vd->
tx_stats.mcast_bytes);
94 s =
format (s,
"\n%U bcast packets %llu",
96 q->tx.stats.bcast_pkts - vd->
tx_stats.bcast_pkts);
97 s =
format (s,
"\n%U bcast bytes %llu",
99 q->tx.stats.bcast_bytes - vd->
tx_stats.bcast_bytes);
100 s =
format (s,
"\n%U Errors packets %llu",
102 q->tx.stats.error_pkts - vd->
tx_stats.error_pkts);
103 s =
format (s,
"\n%U Discard packets %llu",
105 q->tx.stats.discard_pkts - vd->
tx_stats.discard_pkts);
108 s =
format (s,
"\n%U LRO packets %llu",
110 q->rx.stats.lro_pkts - vd->
rx_stats.lro_pkts);
111 s =
format (s,
"\n%U LRO bytes %llu",
113 q->rx.stats.lro_bytes - vd->
rx_stats.lro_bytes);
114 s =
format (s,
"\n%U ucast packets %llu",
116 q->rx.stats.ucast_pkts - vd->
rx_stats.ucast_pkts);
117 s =
format (s,
"\n%U ucast bytes %llu",
119 q->rx.stats.ucast_bytes - vd->
rx_stats.ucast_bytes);
120 s =
format (s,
"\n%U mcast packets %llu",
122 q->rx.stats.mcast_pkts - vd->
rx_stats.mcast_pkts);
123 s =
format (s,
"\n%U mcast bytes %llu",
125 q->rx.stats.mcast_bytes - vd->
rx_stats.mcast_bytes);
126 s =
format (s,
"\n%U bcast packets %llu",
128 q->rx.stats.bcast_pkts - vd->
rx_stats.bcast_pkts);
129 s =
format (s,
"\n%U bcast bytes %llu",
131 q->rx.stats.bcast_bytes - vd->
rx_stats.bcast_bytes);
132 s =
format (s,
"\n%U No Bufs %llu",
134 q->rx.stats.nobuf_pkts - vd->
rx_stats.nobuf_pkts);
135 s =
format (s,
"\n%U Error packets %llu",
137 q->rx.stats.error_pkts - vd->
rx_stats.error_pkts);
150 s =
format (s,
"vmxnet3: %v (%d) next-node %U",
u8 * format_clib_error(u8 *s, va_list *va)
vnet_main_t * vnet_get_main(void)
format_function_t format_vlib_buffer
vlib_pci_dev_handle_t pci_dev_handle
vmxnet3_tx_stats tx_stats
static vnet_hw_interface_t * vnet_get_hw_interface(vnet_main_t *vnm, u32 hw_if_index)
vmxnet3_main_t vmxnet3_main
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
#define vec_free(V)
Free vector's memory (no header).
vlib_pci_addr_t * vlib_pci_get_addr(vlib_main_t *vm, vlib_pci_dev_handle_t h)
static vlib_main_t * vlib_get_main(void)
vmxnet3_rx_stats rx_stats
vmxnet3_device_t * devices