summaryrefslogtreecommitdiff
path: root/examples/ipv4_multicast
diff options
context:
space:
mode:
authorOlivier Matz <olivier.matz@6wind.com>2015-04-22 11:57:19 +0200
committerThomas Monjalon <thomas.monjalon@6wind.com>2015-04-27 23:06:51 +0200
commit0a0dfd40ed01e3466102170464804b633a4082de (patch)
treeb47b956a0ad5f8d1b650deb6b56c04d203399224 /examples/ipv4_multicast
parent1d493a49490fa90e09689d49280cff0d51d0193e (diff)
downloaddpdk-0a0dfd40ed01e3466102170464804b633a4082de.zip
dpdk-0a0dfd40ed01e3466102170464804b633a4082de.tar.gz
dpdk-0a0dfd40ed01e3466102170464804b633a4082de.tar.xz
examples: always initialize mbuf pool private area
The mbuf pool private area must always be populated in a mbuf pool. The applications or drivers may expect that for a mbuf pool, the mbuf pool private area (mbuf_data_room_size and mbuf_priv_size) are properly filled. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Diffstat (limited to 'examples/ipv4_multicast')
-rw-r--r--examples/ipv4_multicast/main.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c
index eed5611..19832d8 100644
--- a/examples/ipv4_multicast/main.c
+++ b/examples/ipv4_multicast/main.c
@@ -699,14 +699,16 @@ main(int argc, char **argv)
rte_exit(EXIT_FAILURE, "Cannot init packet mbuf pool\n");
header_pool = rte_mempool_create("header_pool", NB_HDR_MBUF,
- HDR_MBUF_SIZE, 32, 0, NULL, NULL, rte_pktmbuf_init, NULL,
+ HDR_MBUF_SIZE, 32, sizeof(struct rte_pktmbuf_pool_private),
+ rte_pktmbuf_pool_init, NULL, rte_pktmbuf_init, NULL,
rte_socket_id(), 0);
if (header_pool == NULL)
rte_exit(EXIT_FAILURE, "Cannot init header mbuf pool\n");
clone_pool = rte_mempool_create("clone_pool", NB_CLONE_MBUF,
- CLONE_MBUF_SIZE, 32, 0, NULL, NULL, rte_pktmbuf_init, NULL,
+ CLONE_MBUF_SIZE, 32, sizeof(struct rte_pktmbuf_pool_private),
+ rte_pktmbuf_pool_init, NULL, rte_pktmbuf_init, NULL,
rte_socket_id(), 0);
if (clone_pool == NULL)