DPDK usage discussions
 help / color / mirror / Atom feed
From: Take Ceara <dumitru.ceara@gmail.com>
To: users@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>
Subject: [dpdk-users] Ring PMD - Should mbufs be copied instead of just being added to the ring?
Date: Mon, 18 Jul 2016 17:25:58 +0200	[thread overview]
Message-ID: <CAKKV4w_wjqWV0wRRM9BCUOP+HLxnTo0M0F=hGpNSNkWMW_SPaQ@mail.gmail.com> (raw)

Hi,

I noticed that the Ring PMD directly enqueues the mbufs transmitted
with rte_eth_tx_burst (eth_ring_tx).

I understand that this is the fastest way however, in some cases, the
receive side might rewrite part of the packet payload (e.g., change
some of the L2-3 headers). If the sender is still using the original
packet (e.g., having it cloned) the packet will be essentially
corrupted.

I really like the fact that the Ring based interfaces are mostly
transparent to the applications as they can just use the general
rte_eth_tx_burst/rx_burst but in the rewriting case we need to handle
sending (or receiving) in a special way and manually create an mbuf
chain copy of the original.

Would it be an option to add a flag argument to rte_eth_from_rings to
specify whether the Ring PMD driver should enqueue the original or
actually send a copy of the original packet?

Thanks,
Dumitru Ceara

             reply	other threads:[~2016-07-18 15:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 15:25 Take Ceara [this message]
2016-07-18 16:41 ` Richardson, Bruce

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='CAKKV4w_wjqWV0wRRM9BCUOP+HLxnTo0M0F=hGpNSNkWMW_SPaQ@mail.gmail.com' \
    --to=dumitru.ceara@gmail.com \
    --cc=bruce.richardson@intel.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).