X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_pmd_perf.c;h=49a494de052e6164650efbc3e2207ca7a9cf681d;hb=ea0c20ea95fd5d71a10757e6598ac66233ea1495;hp=bad9503edecb941f55ba749cc0fe7dcbcd2f383d;hpb=ecd9d5193b85f22ff3d5fa76fb26d1363b293d94;p=dpdk.git diff --git a/app/test/test_pmd_perf.c b/app/test/test_pmd_perf.c index bad9503ede..49a494de05 100644 --- a/app/test/test_pmd_perf.c +++ b/app/test/test_pmd_perf.c @@ -47,7 +47,7 @@ #define NB_ETHPORTS_USED (1) #define NB_SOCKETS (2) #define MEMPOOL_CACHE_SIZE 250 -#define MBUF_SIZE (2048 + sizeof(struct rte_mbuf) + RTE_PKTMBUF_HEADROOM) +#define MBUF_DATA_SIZE (2048 + RTE_PKTMBUF_HEADROOM) #define MAX_PKT_BURST (32) #define RTE_TEST_RX_DESC_DEFAULT (128) #define RTE_TEST_TX_DESC_DEFAULT (512) @@ -235,8 +235,7 @@ init_traffic(struct rte_mempool *mp, initialize_eth_header(&pkt_eth_hdr, (struct ether_addr *)src_mac, - (struct ether_addr *)dst_mac, 1, 0, 0); - pkt_eth_hdr.ether_type = rte_cpu_to_be_16(ETHER_TYPE_IPv4); + (struct ether_addr *)dst_mac, ETHER_TYPE_IPv4, 0, 0); pktlen = initialize_ipv4_header(&pkt_ipv4_hdr, IPV4_ADDR(10, 0, 0, 1), @@ -290,12 +289,9 @@ init_mbufpool(unsigned nb_mbuf) if (mbufpool[socketid] == NULL) { snprintf(s, sizeof(s), "mbuf_pool_%d", socketid); mbufpool[socketid] = - rte_mempool_create(s, nb_mbuf, MBUF_SIZE, - MEMPOOL_CACHE_SIZE, - sizeof(struct rte_pktmbuf_pool_private), - rte_pktmbuf_pool_init, NULL, - rte_pktmbuf_init, NULL, - socketid, 0); + rte_pktmbuf_pool_create(s, nb_mbuf, + MEMPOOL_CACHE_SIZE, 0, MBUF_DATA_SIZE, + socketid); if (mbufpool[socketid] == NULL) rte_exit(EXIT_FAILURE, "Cannot init mbuf pool on socket %d\n",