X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_pmd_e1000%2Fem_rxtx.c;h=64d067c0a54026b30751d47cdc5b0b73e010e049;hb=afd7f2d86a7e9bfa286224d12e558330b0ef4ed2;hp=70d398f8b307af81feb2f90a884b54e4e53bc3ba;hpb=3f764189a6d1eb67db06c4e1a0d0194104e1c7f3;p=dpdk.git diff --git a/lib/librte_pmd_e1000/em_rxtx.c b/lib/librte_pmd_e1000/em_rxtx.c index 70d398f8b3..64d067c0a5 100644 --- a/lib/librte_pmd_e1000/em_rxtx.c +++ b/lib/librte_pmd_e1000/em_rxtx.c @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -1120,7 +1119,7 @@ ring_dma_zone_reserve(struct rte_eth_dev *dev, const char *ring_name, #ifdef RTE_LIBRTE_XEN_DOM0 return rte_memzone_reserve_bounded(z_name, ring_size, - socket_id, 0, CACHE_LINE_SIZE, RTE_PGSIZE_2M); + socket_id, 0, RTE_CACHE_LINE_SIZE, RTE_PGSIZE_2M); #else return rte_memzone_reserve(z_name, ring_size, socket_id, 0); #endif @@ -1279,13 +1278,13 @@ eth_em_tx_queue_setup(struct rte_eth_dev *dev, /* Allocate the tx queue data structure. */ if ((txq = rte_zmalloc("ethdev TX queue", sizeof(*txq), - CACHE_LINE_SIZE)) == NULL) + RTE_CACHE_LINE_SIZE)) == NULL) return (-ENOMEM); /* Allocate software ring */ if ((txq->sw_ring = rte_zmalloc("txq->sw_ring", sizeof(txq->sw_ring[0]) * nb_desc, - CACHE_LINE_SIZE)) == NULL) { + RTE_CACHE_LINE_SIZE)) == NULL) { em_tx_queue_release(txq); return (-ENOMEM); } @@ -1406,13 +1405,13 @@ eth_em_rx_queue_setup(struct rte_eth_dev *dev, /* Allocate the RX queue data structure. */ if ((rxq = rte_zmalloc("ethdev RX queue", sizeof(*rxq), - CACHE_LINE_SIZE)) == NULL) + RTE_CACHE_LINE_SIZE)) == NULL) return (-ENOMEM); /* Allocate software ring. */ if ((rxq->sw_ring = rte_zmalloc("rxq->sw_ring", sizeof (rxq->sw_ring[0]) * nb_desc, - CACHE_LINE_SIZE)) == NULL) { + RTE_CACHE_LINE_SIZE)) == NULL) { em_rx_queue_release(rxq); return (-ENOMEM); } @@ -1669,12 +1668,11 @@ eth_em_rx_init(struct rte_eth_dev *dev) /* Determine RX bufsize. */ rctl_bsize = EM_MAX_BUF_SIZE; for (i = 0; i < dev->data->nb_rx_queues; i++) { - struct rte_pktmbuf_pool_private *mbp_priv; uint32_t buf_size; rxq = dev->data->rx_queues[i]; - mbp_priv = rte_mempool_get_priv(rxq->mb_pool); - buf_size = mbp_priv->mbuf_data_room_size - RTE_PKTMBUF_HEADROOM; + buf_size = rte_pktmbuf_data_room_size(rxq->mb_pool) - + RTE_PKTMBUF_HEADROOM; rctl_bsize = RTE_MIN(rctl_bsize, buf_size); }