DPDK usage discussions
 help / color / mirror / Atom feed
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Cliff Burdick <shaklee3@gmail.com>
Cc: users <users@dpdk.org>
Subject: Re: [dpdk-users] Hairpin with rte_flow?
Date: Wed, 7 Nov 2018 11:53:29 +0100	[thread overview]
Message-ID: <20181107105329.GJ4638@6wind.com> (raw)
In-Reply-To: <CA+Gp1nbEv42PTVi=WajPzjfwQu8AHP6tjarRs8M9X+mDjxUdTQ@mail.gmail.com>

On Fri, Oct 19, 2018 at 11:25:42AM -1000, Cliff Burdick wrote:
> Does anyone know if it's possible to do a hairpin mode using rte_flow? For
> example, if I send a packet to 10.1.1.1, in tx queue 0, but I also have a
> flow rule to send 10.1.1.1 to rx queue 1, is there a way to get the nic to
> do that without sending the actual packet out? Mellanox appears to support
> a hairpin mode, but it doesn't look like it's through dpdk.

Hairpin on the *same* port cannot be expressed through rte_flow yet. On the
other hand something similar can be achieved using a port representor.

Assuming port 3 is VF and port 4 its representor, with testpmd you could do:

 flow create 3 transfer egress pattern eth / ipv4 dst is 10.1.1.1 / end
     actions port_id id 4 / end
 flow create 3 ingress pattern eth / ipv4 dst is 10.1.1.1 / end
     actions queue index 1 / end

The first rule requests the device to actively route matching egress traffic
from port 3 through the representor (port 4). Since traffic received by a
representor should be fed back to its associated VF, that traffic should be
received on port 3.

The second rule is not mandatory, however without it RSS might otherwise
dispatch it to a different queue.

Question is which drivers implement this use case. While I'm aware mlx5
supports PF/VF/representor redirections, I don't know if a VF can feed its
own representor like that. A true hairpin action is missing anyway.

-- 
Adrien Mazarguil
6WIND

      reply	other threads:[~2018-11-07 10:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19 21:25 Cliff Burdick
2018-11-07 10:53 ` Adrien Mazarguil [this message]

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=20181107105329.GJ4638@6wind.com \
    --to=adrien.mazarguil@6wind.com \
    --cc=shaklee3@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).