DPDK usage discussions
 help / color / mirror / Atom feed
From: Huai-En Tseng <the@csie.io>
To: users@dpdk.org
Subject: [dpdk-users] i40e rte_flow API usage
Date: Sun, 14 Feb 2021 02:41:17 +0800	[thread overview]
Message-ID: <D4C87278-2A29-4FE7-B82C-3ADA31A02425@csie.io> (raw)

Hi all, 

Here are 3 questions I want to ask.


Q1. I try to create a rte_flow to redirect all vlan tagged 2 pkts to another receive queue in my DPDK application.

Despite the flow is created with no error, the flow does not work in my application.

My NIC is Intel X710 and I already tried testpmd with command and it works:

flow create 0 ingress pattern eth / vlan tci is 2 / end actions queue index 2 / end

Here is my code for rte_flow creation:

memset(pattern,0,sizeof(pattern));
memset(action,0,sizeof(action));

memset(&attr,0,sizeof(struct rte_flow_attr));
attr.ingress = 1;

action[0].type = RTE_FLOW_ACTION_TYPE_QUEUE;
action[0].conf = &queue;
action[1].type = RTE_FLOW_ACTION_TYPE_END;

memset(&eth_spec, 0, sizeof(struct rte_flow_item_eth));
memset(&eth_mask, 0, sizeof(struct rte_flow_item_eth));

eth_spec.type = rte_cpu_to_be_16(0x8100);
eth_mask.type = 0xffff;
pattern[0].type = RTE_FLOW_ITEM_TYPE_ETH;
pattern[0].spec = &eth_spec;
pattern[0].mask = &eth_mask;

memset(&vlan_spec,0,sizeof(struct rte_flow_item_vlan));
memset(&vlan_mask,0,sizeof(struct rte_flow_item_vlan));
vlan_spec.tci = 2;
vlan_mask.tci = 0xffff;
pattern[1].type = RTE_FLOW_ITEM_TYPE_VLAN;
pattern[1].spec = &vlan_spec;
pattern[1].mask = &vlan_mask;

pattern[2].type = RTE_FLOW_ITEM_TYPE_END;

Could any expert here help me find which part I miss?

BTW the DPDK version I use is 21.02.

Q2. Is there any method I can just redirector tagged packet to another rx queue?

I just try to use above code and replace pattern[1] with RTE_FLOW_ITEM_TYPE_END but it does not work either.

Q3. I just see pppoe item structure in rte_flow.h.

Does that mean DPDK support pppoe flow redirector in this current version without using DDP? 

Thanks.

BR,

Huai-En


                 reply	other threads:[~2021-02-13 18:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=D4C87278-2A29-4FE7-B82C-3ADA31A02425@csie.io \
    --to=the@csie.io \
    --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).