[dpdk-dev] rte_pktmbuf_alloc fails
Thomas Monjalon
thomas.monjalon at 6wind.com
Thu Apr 17 17:00:54 CEST 2014
Hi Konstantin,
2014-04-07 08:53, Ananyev, Konstantin:
> Yep indeed, there is a bug in eth_pcap_tx() that can cause mbuf corruption.
> I think it should be something like that instead:
>
> --- a/lib/librte_pmd_pcap/rte_eth_pcap.c
> +++ b/lib/librte_pmd_pcap/rte_eth_pcap.c
> @@ -205,8 +205,9 @@ eth_pcap_tx(void *queue,
> mbuf = bufs[i];
> ret = pcap_sendpacket(tx_queue->pcap, (u_char*)
> mbuf->pkt.data, mbuf->pkt.data_len);
> - if(likely(!ret))
> - num_tx++;
> + if(unlikely(ret != 0))
> + break;
> + num_tx++;
> rte_pktmbuf_free(mbuf);
> }
Please could you send a patch with a commit log as described in
http://dpdk.org/dev#send ?
Thanks
--
Thomas
More information about the dev
mailing list