Reduce ring size for dpdk NICs and overtal mem footprint
[vpp.git] / vnet / vnet / devices / dpdk / dpdk.h
index eb0a11f..1c3d0bb 100644 (file)
@@ -63,7 +63,7 @@
 
 #include <vlib/pci/pci.h>
 
-#define NB_MBUF   (32<<10)
+#define NB_MBUF   (16<<10)
 
 extern vnet_device_class_t dpdk_device_class;
 extern vlib_node_registration_t dpdk_input_node;
@@ -92,7 +92,8 @@ typedef enum {
   _ ("AF_PACKET PMD", AF_PACKET)  \
   _ ("rte_bond_pmd", BOND)        \
   _ ("rte_pmd_fm10k", FM10K)      \
-  _ ("rte_cxgbe_pmd", CXGBE)
+  _ ("rte_cxgbe_pmd", CXGBE)      \
+  _ ("rte_dpaa2_dpni", DPAA2)
 
 typedef enum {
   VNET_DPDK_PMD_NONE,
@@ -170,6 +171,7 @@ typedef struct {
 #endif
   u64 region_addr[VHOST_MEMORY_MAX_NREGIONS];
   u32 region_fd[VHOST_MEMORY_MAX_NREGIONS];
+  u64 region_offset[VHOST_MEMORY_MAX_NREGIONS];
 } dpdk_vu_intf_t;
 
 typedef void (*dpdk_flowcontrol_callback_t) (vlib_main_t *vm,
@@ -315,7 +317,8 @@ typedef struct dpdk_efd_t {
   _ (num_rx_queues) \
   _ (num_tx_queues) \
   _ (num_rx_desc) \
-  _ (num_tx_desc)
+  _ (num_tx_desc) \
+  _ (rss_fn)
 
 typedef struct {
     vlib_pci_addr_t pci_addr;
@@ -617,6 +620,7 @@ format_function_t format_dpdk_rx_dma_trace;
 format_function_t format_dpdk_rte_mbuf;
 format_function_t format_dpdk_rx_rte_mbuf;
 unformat_function_t unformat_socket_mem;
+clib_error_t * unformat_rss_fn(unformat_input_t * input, uword * rss_fn);
 
 
 static inline void
@@ -681,6 +685,10 @@ dpdk_pmd_constructor_init()
   _(bond_drv)
 #endif
 
+#ifdef RTE_LIBRTE_DPAA2_PMD
+  _(pmd_dpaa2_drv)
+#endif
+
 #undef _
 
 /*