DPDK usage discussions
 help / color / mirror / Atom feed
From: Arvind Narayanan <webguru2688@gmail.com>
To: users <users@dpdk.org>
Subject: [dpdk-users] Issue with mlx5_rxtx.c while calling rte_eth_tx_burst() in DPDK 18.11
Date: Sun, 21 Apr 2019 23:59:49 -0500	[thread overview]
Message-ID: <CAHJJQSX2rSoa3M8=V--JWuVz3pBJXspTHO51MyxMMss6s88FgQ@mail.gmail.com> (raw)

I am running into a weird problem when using rte_eth_tx_burst() using mlx5
in dpdk 18.11, running on Ubuntu 18.04 LTS (using Mellanox Connect X5 100G
EN).

Here is a simplified snippet.

==================
#define MAX_BATCHES 64
#define MAX_BURST_SIZE 64

struct batch {
    struct rte_mbuf *mbufs[MAX_BURST_SIZE]; // array of packets
    int num_mbufs; // num of mbufs
    int queue; // outgoing tx_queue
    int port; // outgoing port
}

struct batch * batches[MAX_BATCHES];

/* dequeue a number of batches */
int batch_count = rte_ring_sc_dequeue_bulk(some_rte_ring, (void **)
&(batches), MAX_BATCHES, NULL);

/* transmit out all pkts from every batch */
if (likely(batch_count > 0)) {
    for (i = 0; i < batch_count; i++) {
        ret = rte_eth_tx_burst(batches[i]->port, batches[i]->queue, (struct
rte_mbuf **) batches[i]->mbufs,
                               batches[i]->num_mbufs);
    }
}

==================

At rte_eth_tx_burst(), I keep getting an error saying:
myapp: /home/arvind/dpdk/drivers/net/mlx5/mlx5_rxtx.c:1652: uint16_t
txq_burst_empw(struct mlx5_txq_data *, struct rte_mbuf **, uint16_t):
Assertion `length == DATA_LEN(buf)' failed.
OR
myapp: /home/arvind/dpdk/drivers/net/mlx5/mlx5_rxtx.c:1609: uint16_t
txq_burst_empw(struct mlx5_txq_data *, struct rte_mbuf **, uint16_t):
Assertion `length == DATA_LEN(buf)' failed.

I have debugged and ensured all the mbuf counts (at least in my code) are
good. All the memory references to the mbufs also look good. However, I am
not sure why Mellanox driver would complain.

I have also tried to play with mlx5_rxtx.c by changing above lines to
something like
assert(length == pkts_n); // pkts_n is an argument passed to the func.
Didn't help.

Any thoughts?

Thanks,
Arvind

             reply	other threads:[~2019-04-22  5:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-22  4:59 Arvind Narayanan [this message]
2019-04-23 23:45 ` Yongseok Koh
2019-05-04 23:07   ` Arvind Narayanan
2019-05-08  9:26     ` Andrew Bainbridge
2019-05-08 13:03       ` Arvind Narayanan

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='CAHJJQSX2rSoa3M8=V--JWuVz3pBJXspTHO51MyxMMss6s88FgQ@mail.gmail.com' \
    --to=webguru2688@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).