DPDK usage discussions
 help / color / mirror / Atom feed
From: Aland Tsang <zengxianglong0@gmail.com>
To: users@dpdk.org
Subject: [dpdk-users] rte_eth_rx_burst() coredump with c++
Date: Fri, 7 Jul 2017 17:05:23 +0800	[thread overview]
Message-ID: <CAPnoRiqsrp+W-nhy2rspxBu8OyNpe485xE-PG32ZX1SnqduWng@mail.gmail.com> (raw)

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

                 reply	other threads:[~2017-07-07  9:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAPnoRiqsrp+W-nhy2rspxBu8OyNpe485xE-PG32ZX1SnqduWng@mail.gmail.com \
    --to=zengxianglong0@gmail.com \
    --cc=users@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).