X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fload_balancer%2Fmain.h;h=bef2ba0415a5ef618e70079279aea49c875692b6;hb=cbc12b0a96f5751ab2ed10001f44d39211e3bd45;hp=17c0f7702f4c7e4da082c4d5b72f8dd172672379;hpb=ea0c20ea95fd5d71a10757e6598ac66233ea1495;p=dpdk.git diff --git a/examples/load_balancer/main.h b/examples/load_balancer/main.h index 17c0f7702f..bef2ba0415 100644 --- a/examples/load_balancer/main.h +++ b/examples/load_balancer/main.h @@ -56,7 +56,11 @@ #endif #ifndef APP_MAX_IO_LCORES +#if (APP_MAX_LCORES > 16) #define APP_MAX_IO_LCORES 16 +#else +#define APP_MAX_IO_LCORES APP_MAX_LCORES +#endif #endif #if (APP_MAX_IO_LCORES > APP_MAX_LCORES) #error "APP_MAX_IO_LCORES is too big" @@ -74,7 +78,11 @@ #endif #ifndef APP_MAX_WORKER_LCORES +#if (APP_MAX_LCORES > 16) #define APP_MAX_WORKER_LCORES 16 +#else +#define APP_MAX_WORKER_LCORES APP_MAX_LCORES +#endif #endif #if (APP_MAX_WORKER_LCORES > APP_MAX_LCORES) #error "APP_MAX_WORKER_LCORES is too big" @@ -83,7 +91,7 @@ /* Mempools */ #ifndef APP_DEFAULT_MBUF_DATA_SIZE -#define APP_DEFAULT_MBUF_DATA_SIZE (2048 + RTE_PKTMBUF_HEADROOM) +#define APP_DEFAULT_MBUF_DATA_SIZE RTE_MBUF_DEFAULT_BUF_SIZE #endif #ifndef APP_DEFAULT_MEMPOOL_BUFFERS @@ -240,7 +248,7 @@ struct app_lcore_params_io { struct { /* NIC */ struct { - uint8_t port; + uint16_t port; uint8_t queue; } nic_queues[APP_MAX_NIC_RX_QUEUES_PER_IO_LCORE]; uint32_t n_nic_queues; @@ -267,7 +275,7 @@ struct app_lcore_params_io { struct rte_ring *rings[APP_MAX_NIC_PORTS][APP_MAX_WORKER_LCORES]; /* NIC */ - uint8_t nic_ports[APP_MAX_NIC_TX_PORTS_PER_IO_LCORE]; + uint16_t nic_ports[APP_MAX_NIC_TX_PORTS_PER_IO_LCORE]; uint32_t n_nic_ports; /* Internal buffers */ @@ -360,9 +368,10 @@ void app_print_usage(void); void app_init(void); int app_lcore_main_loop(void *arg); -int app_get_nic_rx_queues_per_port(uint8_t port); -int app_get_lcore_for_nic_rx(uint8_t port, uint8_t queue, uint32_t *lcore_out); -int app_get_lcore_for_nic_tx(uint8_t port, uint32_t *lcore_out); +int app_get_nic_rx_queues_per_port(uint16_t port); +int app_get_lcore_for_nic_rx(uint16_t port, uint8_t queue, + uint32_t *lcore_out); +int app_get_lcore_for_nic_tx(uint16_t port, uint32_t *lcore_out); int app_is_socket_used(uint32_t socket); uint32_t app_get_lcores_io_rx(void); uint32_t app_get_lcores_worker(void);