- format_pci_addr, &pci_addr,
- ntohs (mp->rx_next),
- ntohs (mp->rx_qid),
- ntohs (mp->rx_qsize), ntohs (mp->rx_fill[0]),
- ntohs (mp->rx_consume[0]),
- ntohs (mp->rx_produce[0]),
- ntohs (mp->rx_qsize), ntohs (mp->rx_fill[1]),
- ntohs (mp->rx_consume[1]),
- ntohs (mp->rx_produce[1]),
- ntohs (mp->tx_next),
- ntohs (mp->tx_qid),
- ntohs (mp->tx_qsize), ntohs (mp->tx_consume),
- ntohs (mp->tx_produce), mp->admin_up_down ? "up" : "down");
-}
-
-/*
- * List of messages that the api test plugin sends,
- * and that the data plane plugin processes
- */
-#define foreach_vpe_api_msg \
-_(vmxnet3_create, "<pci-address> [rx-queue-size <size>] " \
- "[tx-queue-size <size>]") \
-_(vmxnet3_delete, "<sw_if_index>") \
-_(vmxnet3_dump, "")
-
-static void
-vmxnet3_vat_api_hookup (vat_main_t * vam)
-{
- vmxnet3_test_main_t *vxm __attribute__ ((unused)) = &vmxnet3_test_main;
-#define _(N,n) \
- vl_msg_api_set_handlers((VL_API_##N + vxm->msg_id_base), \
- #n, \
- vl_api_##n##_t_handler, \
- vl_noop_handler, \
- vl_api_##n##_t_endian, \
- vl_api_##n##_t_print, \
- sizeof(vl_api_##n##_t), 1);
- foreach_vpe_api_reply_msg;
-#undef _
-
-#define _(n,h) \
- hash_set_mem (vam->function_by_name, #n, api_##n);
- foreach_vpe_api_msg;
-#undef _
-
-#define _(n,h) hash_set_mem (vam->help_by_name, #n, h);
- foreach_vpe_api_msg;
-#undef _
+ format_pci_addr, &pci_addr, mp->admin_up_down ? "up" : "down");
+ for (qid = 0; qid < mp->rx_count; qid++)
+ {
+ vl_api_vmxnet3_rx_list_t *rx_list = &mp->rx_list[qid];
+ fformat (vam->ofp,
+ " RX Queue %u\n"
+ " RX completion next index %u\n"
+ " ring 0 size %u fill %u consume %u produce %u\n"
+ " ring 1 size %u fill %u consume %u produce %u\n",
+ qid,
+ ntohs (rx_list->rx_next),
+ ntohs (rx_list->rx_qsize), ntohs (rx_list->rx_fill[0]),
+ ntohs (rx_list->rx_consume[0]),
+ ntohs (rx_list->rx_produce[0]),
+ ntohs (rx_list->rx_qsize), ntohs (rx_list->rx_fill[1]),
+ ntohs (rx_list->rx_consume[1]),
+ ntohs (rx_list->rx_produce[1]));
+ }
+ for (qid = 0; qid < mp->tx_count; qid++)
+ {
+ vl_api_vmxnet3_tx_list_t *tx_list = &mp->tx_list[qid];
+ fformat (vam->ofp,
+ " TX Queue %u\n"
+ " TX completion next index %u\n"
+ " size %u consume %u produce %u\n",
+ qid,
+ ntohs (tx_list->tx_next),
+ ntohs (tx_list->tx_qsize), ntohs (tx_list->tx_consume),
+ ntohs (tx_list->tx_produce));
+ }