DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] rte_eth_rx_burst() coredump with c++
@ 2017-07-07  9:05 Aland Tsang
  0 siblings, 0 replies; only message in thread
From: Aland Tsang @ 2017-07-07  9:05 UTC (permalink / raw)
  To: users

Hello all,

I'm using dpdk with c++.

I used rte_eth_rx_burst() in dpdk-17.02 is ok, but recently I upgraded to
dpdk-17.05 and coredump occurred.

It's due to the cb->param is NULL.

static inline uint16_t
rte_eth_rx_burst(uint8_t port_id, uint16_t queue_id,
struct rte_mbuf **rx_pkts, const uint16_t nb_pkts)
{
struct rte_eth_dev *dev = &rte_eth_devices[port_id];

#ifdef RTE_LIBRTE_ETHDEV_DEBUG
RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, 0);
RTE_FUNC_PTR_OR_ERR_RET(*dev->rx_pkt_burst, 0);

if (queue_id >= dev->data->nb_rx_queues) {
RTE_PMD_DEBUG_TRACE("Invalid RX queue_id=%d\n", queue_id);
return 0;
}
#endif
int16_t nb_rx = (*dev->rx_pkt_burst)(dev->data->rx_queues[queue_id],
rx_pkts, nb_pkts);

#ifdef RTE_ETHDEV_RXTX_CALLBACKS
struct rte_eth_rxtx_callback *cb = dev->post_rx_burst_cbs[queue_id];

if (unlikely(cb != NULL)) {
do {
nb_rx = cb->fn.rx(port_id, queue_id, rx_pkts, nb_rx,
nb_pkts, cb->param);
cb = cb->next;
} while (cb != NULL);
}
#endif

return nb_rx;
}

In dpdk-17.02 cb is NULL and skip the subsequent processing, but in
dpdk-17.05, cb is not NULL, and cb->param is 0x0.

Is there any good advice?



Best Regards,
Aland

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-07-07  9:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-07  9:05 [dpdk-users] rte_eth_rx_burst() coredump with c++ Aland Tsang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).