X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=examples%2Fbond%2Fmain.c;h=455f108eebb8827e0bb4593b670cac496b23a8b1;hb=ba2f43464ed53fd1358cf7b1f483103c616f341c;hp=2cbf68fe0986407c04a3c49148315868019e0ee6;hpb=867a6c66ecf3d88e76367254e79bb9e7b936a830;p=dpdk.git diff --git a/examples/bond/main.c b/examples/bond/main.c index 2cbf68fe09..455f108eeb 100644 --- a/examples/bond/main.c +++ b/examples/bond/main.c @@ -212,7 +212,7 @@ bond_port_init(struct rte_mempool *mbuf_pool) struct rte_eth_txconf txq_conf; struct rte_eth_conf local_port_conf = port_conf; - retval = rte_eth_bond_create("bond0", BONDING_MODE_ALB, + retval = rte_eth_bond_create("net_bonding0", BONDING_MODE_ALB, 0 /*SOCKET_ID_ANY*/); if (retval < 0) rte_exit(EXIT_FAILURE, @@ -441,6 +441,11 @@ static void cmd_obj_send_parsed(void *parsed_result, (BOND_IP_3 << 16) | (BOND_IP_4 << 24); created_pkt = rte_pktmbuf_alloc(mbuf_pool); + if (created_pkt == NULL) { + cmdline_printf(cl, "Failed to allocate mbuf\n"); + return; + } + pkt_size = sizeof(struct ether_hdr) + sizeof(struct arp_hdr); created_pkt->data_len = pkt_size; created_pkt->pkt_len = pkt_size;