From: Intel Date: Mon, 3 Jun 2013 00:00:00 +0000 (+0000) Subject: ixgbe: allocate structures on numa_node X-Git-Tag: spdx-start~11227 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=a108ced36401c5ff4d40c7ddf227eb004a0051ff;p=dpdk.git ixgbe: allocate structures on numa_node Signed-off-by: Intel --- diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index a950b500d0..922525ca21 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -1930,8 +1930,8 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, ixgbe_tx_queue_release(dev->data->tx_queues[queue_idx]); /* First allocate the tx queue data structure */ - txq = rte_zmalloc("ethdev TX queue", sizeof(struct igb_tx_queue), - CACHE_LINE_SIZE); + txq = rte_zmalloc_socket("ethdev TX queue", sizeof(struct igb_tx_queue), + CACHE_LINE_SIZE, socket_id); if (txq == NULL) return (-ENOMEM); @@ -1970,9 +1970,9 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, txq->tx_ring = (union ixgbe_adv_tx_desc *) tz->addr; /* Allocate software ring */ - txq->sw_ring = rte_zmalloc("txq->sw_ring", + txq->sw_ring = rte_zmalloc_socket("txq->sw_ring", sizeof(struct igb_tx_entry) * nb_desc, - CACHE_LINE_SIZE); + CACHE_LINE_SIZE, socket_id); if (txq->sw_ring == NULL) { ixgbe_tx_queue_release(txq); return (-ENOMEM); @@ -2171,8 +2171,8 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, ixgbe_rx_queue_release(dev->data->rx_queues[queue_idx]); /* First allocate the rx queue data structure */ - rxq = rte_zmalloc("ethdev RX queue", sizeof(struct igb_rx_queue), - CACHE_LINE_SIZE); + rxq = rte_zmalloc_socket("ethdev RX queue", sizeof(struct igb_rx_queue), + CACHE_LINE_SIZE, socket_id); if (rxq == NULL) return (-ENOMEM); rxq->mb_pool = mp; @@ -2217,9 +2217,9 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, #else len = nb_desc; #endif - rxq->sw_ring = rte_zmalloc("rxq->sw_ring", - sizeof(struct igb_rx_entry) * len, - CACHE_LINE_SIZE); + rxq->sw_ring = rte_zmalloc_socket("rxq->sw_ring", + sizeof(struct igb_rx_entry) * len, + CACHE_LINE_SIZE, socket_id); if (rxq->sw_ring == NULL) { ixgbe_rx_queue_release(rxq); return (-ENOMEM);