]> git.droids-corp.org - dpdk.git/blobdiff - examples/bond/main.c
examples/ip_pipeline: add thread runtime
[dpdk.git] / examples / bond / main.c
index b8efcafca3cdc1eb3ee03f2ccde10eef76c60b05..455f108eebb8827e0bb4593b670cac496b23a8b1 100644 (file)
@@ -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;