API: Change ip4_address and ip6_address to use type alias.
[vpp.git] / src / plugins / avf / avf.h
index d8c6473..4fa19b1 100644 (file)
@@ -26,7 +26,7 @@
   _(0, INITIALIZED, "initialized") \
   _(1, ERROR, "error") \
   _(2, ADMIN_UP, "admin-up") \
-  _(3, IOVA, "iova") \
+  _(3, VA_DMA, "vaddr-dma") \
   _(4, LINK_UP, "link-up") \
   _(5, SHARED_TXQ_LOCK, "shared-txq-lock") \
   _(6, ELOG, "elog")
@@ -115,6 +115,8 @@ typedef struct
   /* queues */
   avf_rxq_t *rxqs;
   avf_txq_t *txqs;
+  u16 n_tx_queues;
+  u16 n_rx_queues;
 
   /* Admin queues */
   avf_aq_desc_t *atq;
@@ -186,8 +188,6 @@ typedef struct
 
   avf_device_t *devices;
   avf_per_thread_data_t *per_thread_data;
-  vlib_physmem_region_index_t physmem_region;
-  int physmem_region_alloc;
 
   vlib_log_class_t log_class;
 
@@ -201,6 +201,7 @@ typedef struct
 {
   vlib_pci_addr_t addr;
   int enable_elog;
+  u16 rxq_num;
   u16 rxq_size;
   u16 txq_size;
   /* return */
@@ -214,8 +215,6 @@ void avf_delete_if (vlib_main_t * vm, avf_device_t * ad);
 
 extern vlib_node_registration_t avf_input_node;
 extern vnet_device_class_t avf_device_class;
-uword avf_interface_tx (vlib_main_t * vm, vlib_node_runtime_t * node,
-                       vlib_frame_t * frame);
 
 /* format.c */
 format_function_t format_avf_device;
@@ -288,6 +287,17 @@ typedef struct
   avf_rx_vector_entry_t rxve;
 } avf_input_trace_t;
 
+#define foreach_avf_tx_func_error             \
+_(NO_FREE_SLOTS, "no free tx slots")
+
+typedef enum
+{
+#define _(f,s) AVF_TX_ERROR_##f,
+  foreach_avf_tx_func_error
+#undef _
+    AVF_TX_N_ERROR,
+} avf_tx_func_error_t;
+
 #endif /* AVF_H */
 
 /*