DPDK usage discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Arvind Narayanan <webguru2688@gmail.com>
Cc: users <users@dpdk.org>
Subject: Re: [dpdk-users] rte_flow multiple queues in same rule's action set
Date: Mon, 5 Aug 2019 10:11:10 +0200	[thread overview]
Message-ID: <20190805081110.GI4512@6wind.com> (raw)
In-Reply-To: <CAHJJQSVnoYbxQw9_UbVbTG-JfpoApUZav248XAw+niwvU4jw4w@mail.gmail.com>

On Fri, Aug 02, 2019 at 06:01:49PM -0500, Arvind Narayanan wrote:
> Hi,
> 
> In rte_flow docs, there is an example (Table 11.28) where the action
> set consists of 4 actions:
> 
> 1. queue(index=5)
> 2. VOID
> 3. queue(index=3)
> 4. END
> The docs further say such a rule effectively duplicates the traffic to
> both queue 3 and 5. Does this mean "two different mbufs" exist for the
> same incoming packet, or does it mean it only duplicates the mbuf
> references?
> 
> Any clarification is appreciated.

Beware I'm not aware of any driver properly supporting this at the moment,
so specifying QUEUE twice should usually result in an error, but I think
some drivers don't quite expect it and will silently ignore one of them
(that's a bug).

In any case you're right, it's unspecified and we should fix that.
There are 3 options:

1. Separate mbufs are returned. That was the original unwritten assumption
   (see below).

2. Separate mbufs are returned, but one of them is a clone so they actually
   share data and RTE_MBUF_CLONED() returns true for one of them.

3. The same mbuf pointer is returned, in which case at the very least, mbuf
   refcount should be 2 not to break rte_pktmbuf_free().

In practice drivers can normally not return the same mbuf from two distinct
Rx queues at the same time since Rx mbufs are allocated independently for
each Rx queue. Mbufs are preallocated during setup and replaced while doing
Rx, right before returning them to the application to avoid starvation.

I do not think DPDK applications are ready for 2 and 3 yet. Also due to the
above, doing so would require extra work on the PMD side.

-- 
Adrien Mazarguil
6WIND

  reply	other threads:[~2019-08-05  8:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-02 23:01 Arvind Narayanan
2019-08-05  8:11 ` Adrien Mazarguil [this message]
2019-08-05 23:22   ` 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=20190805081110.GI4512@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=users@dpdk.org \
    --cc=webguru2688@gmail.com \
    /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).