DPDK usage discussions
 help / color / mirror / Atom feed
* [dpdk-users] i40e rte_flow API usage
@ 2021-02-13 18:41 Huai-En Tseng
  0 siblings, 0 replies; only message in thread
From: Huai-En Tseng @ 2021-02-13 18:41 UTC (permalink / raw)
  To: users

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-13 18:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-13 18:41 [dpdk-users] i40e rte_flow API usage Huai-En Tseng

DPDK usage discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git