iokernel: DPDK only take a subset of hugepages, fix some indentation/spacing issues
@@ -60,8 +60,7 @@ static const struct rte_eth_conf port_conf_default = {
* Initializes a given port using global settings and with the RX buffers
* coming from the mbuf_pool passed as a parameter.
*/
-static inline int
-port_init(uint8_t port, struct rte_mempool *mbuf_pool)
+static inline int port_init(uint8_t port, struct rte_mempool *mbuf_pool)
{
struct rte_eth_conf port_conf = port_conf_default;
const uint16_t rx_rings = 1, tx_rings = 1;
@@ -85,8 +84,7 @@ port_init(uint8_t port, struct rte_mempool *mbuf_pool)
/* Allocate and set up 1 RX queue per Ethernet port. */
for (q = 0; q < rx_rings; q++) {
retval = rte_eth_rx_queue_setup(port, q, nb_rxd,
- rte_eth_dev_socket_id(port), NULL,
- mbuf_pool);
+ rte_eth_dev_socket_id(port), NULL, mbuf_pool);
if (retval < 0)
return retval;
}
@@ -169,8 +167,8 @@ void dpdk_run(uint8_t port)
* Check that the port is on the same NUMA node as the polling thread
* for best performance.
*/
- if (rte_eth_dev_socket_id(port) > 0 &&
- rte_eth_dev_socket_id(port) != (int)rte_socket_id())
+ if (rte_eth_dev_socket_id(port) > 0
+ && rte_eth_dev_socket_id(port) != (int) rte_socket_id())
printf("WARNING, port %u is on remote NUMA node to polling thread.\n\t"
"Performance will not be optimal.\n", port);
@@ -218,7 +216,7 @@ int dpdk_init(uint8_t port)
{
struct rte_mempool *mbuf_pool;
unsigned nb_ports;
- char *argv[] = {"./iokerneld", "-l", "1"};
+ char *argv[] = { "./iokerneld", "-l", "1", "--socket-mem=128" };
/* Initialize the Environment Abstraction Layer (EAL). */
int ret = rte_eal_init(sizeof(argv) / sizeof(argv[0]), argv);
