DPDK usage discussions
 help / color / mirror / Atom feed
From: Cody Doucette <doucette@bu.edu>
To: users@dpdk.org
Subject: Re: [dpdk-users] Flow Director for IPv6, flex bytes
Date: Mon, 9 Jan 2017 00:47:24 -0500	[thread overview]
Message-ID: <CAJjX64bBPEBEW_khJGOyBS2x-XJtnZfjwNo4=-KKJuzhMfDmnQ@mail.gmail.com> (raw)
In-Reply-To: <CAJjX64Z+EQpWYZOaiSc8jzLw+djPdrLNjY6LJi1u1xsYxGN7og@mail.gmail.com>

Does anyone have any examples of Flow Director being used with IPv6,
especially for an ixgbe NIC?

Or does anyone have any experience/knowledge that the driver may be buggy?

Cody

On Tue, Jan 3, 2017 at 3:21 PM, Cody Doucette <doucette@bu.edu> wrote:

> I'm trying to use Flow Director on an 82599 NIC to match the IPv6 proto
> and hop limit fields. I've been able to get something analogous working for
> IPv4, but changing the flow type to IPv6 breaks it.
>
> Does anyone have any pointers to working examples of Flow Director for
> IPv6 flows?
>
> My Flow Director configuration is:
>
> (It seems to be a driver requirement that we use RTE_ETH_RAW_PAYLOAD and
> RTE_ETH_FLOW_UNKNOWN below):
>
> .fdir_conf = {
>                 .mode = RTE_FDIR_MODE_PERFECT,
>                 .pballoc = RTE_FDIR_PBALLOC_64K,
>                 .status = RTE_FDIR_REPORT_STATUS_ALWAYS,
>                 .drop_queue = DROP_QUEUE,
>                 .mask = {
>                         .vlan_tci_mask = 0x0,
>                         .ipv4_mask = {
>                                 .src_ip = 0,
>                                 .dst_ip = 0,
>                         },
>                         .ipv6_mask = {
>                                 .src_ip = { 0, 0, 0, 0},
>                                 .dst_ip = { 0, 0, 0, 0},
>                         },
>                         .src_port_mask = 0,
>                         .dst_port_mask = 0,
>                         .mac_addr_byte_mask = 0,
>                         .tunnel_type_mask = 0,
>                         .tunnel_id_mask = 0,
>                 },
>                 .flex_conf = {
>                         .nb_payloads = 1,
>                         .nb_flexmasks = 1,
>                         .flex_set = {
>                                 [0] = {
>                                         .type = RTE_ETH_RAW_PAYLOAD,
>                                         .src_offset = {
>                                                 FDIR_FLEX_OFFSET,
>                                                 FDIR_FLEX_OFFSET + 1,
>                                         },
>                                 },
>                         },
>                         .flex_mask = {
>                                 [0] = {
>                                         .flow_type = RTE_ETH_FLOW_UNKNOWN,
>                                         .mask = {
>                                                 [0] = 0xFF,
>                                                 [1] = 0xFF,
>                                         },
>                                 },
>                         },
>                 },
> },
>
> And then this filter works for IPv4 packets:
>
>         struct rte_eth_fdir_filter filter = {
>                 .soft_id = soft_id,
>                 .input = {
>                         .flow_type = RTE_ETH_FLOW_IPV4,
>                         .flow_ext = {
>                                 .vlan_tci = 0,
>                                 .flexbytes = {
>                                         0x40,
>                                         0x01,
>                                 },
>                                 .is_vf = 0,
>                                 .dst_id = 0,
>                         },
>                 },
>                 .action = {
>                         .rx_queue = queue_id,
>                 },
>         };
>
> But this filter does not work for IPv6 packets (and neither does changing
> the flow type to anything else):
>
>         struct rte_eth_fdir_filter filter = {
>                 .soft_id = soft_id,
>                 .input = {
>                         .flow_type = RTE_ETH_FLOW_IPV6,
>                         .flow_ext = {
>                                 .vlan_tci = 0,
>                                 .flexbytes = {
>                                         0x3A,
>                                         0x55,
>                                 },
>                                 .is_vf = 0,
>                                 .dst_id = 0,
>                         },
>                 },
>                 .action = {
>                         .rx_queue = queue_id,
>                 },
>         };
>

      reply	other threads:[~2017-01-09  5:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-03 20:21 Cody Doucette
2017-01-09  5:47 ` Cody Doucette [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='CAJjX64bBPEBEW_khJGOyBS2x-XJtnZfjwNo4=-KKJuzhMfDmnQ@mail.gmail.com' \
    --to=doucette@bu.edu \
    --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).