[dpdk-dev] [PATCH 0/7] net/mlx5: support for flow action on VLAN header

Slava Ovsiienko viacheslavo at mellanox.com
Fri Oct 4 12:51:22 CEST 2019


> -----Original Message-----
> From: Hideyuki Yamashita <yamashita.hideyuki at ntt-tx.co.jp>
> Sent: Friday, October 4, 2019 13:35
> To: Hideyuki Yamashita <yamashita.hideyuki at ntt-tx.co.jp>
> Cc: Moti Haimovsky <motih at mellanox.com>; Slava Ovsiienko
> <viacheslavo at mellanox.com>; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH 0/7] net/mlx5: support for flow action on
> VLAN header
> 
> Can somebody (Mellanox guys?) help me out?

Hi, Hideyuki

I'm sorry, there are long holidays in IL, so let me try to answer.

> 
> > Hello Moti,
> >
> > I have some questions on the patch.
> > Just want to know how to use it.
> >
> > Q1. Is it correct understanding that the patch will be reflected in
> > 19.11 if it is approved?

Yes, it is merged and should be reflected.

> >
> > Q2.Which action should I specify when I want to insert VLAN tag to
> > non-VLAN frame?
> >
> > OF_PUSH_VLAN and OF_SET_VLAN_VID and OF_SET_VLAN_PCP ?

All of them, OF_PUSH_VLAN inserts the VLAN header, OF_SET_VLAN_VID and
OF_SET_VLAN_PCP fill the fields with appropriate values.

> >
> > Q3. Is it possible to detag VLAN when it receives VLAN tagged frame
> > from outside of the host?
Do you mean some complex configuration with multiple VMs and engaged E-Switch
feature? Anyway, there are multiple ways to strip (untag) VLAN header:
- with E-Switch rules (including match on specified port)
- with local port rules
- stripping VLAN in Rx queue

> >
> > Q4. Is it possible to entag VLAN to non-VLAN frame when it sends
> > packet to outside of host?
Yes.

> >
> > Q5.Are there any restriction to conbime other ACTIONS like QUEUE?
Should no be. Action QUEUE is on Rx NIC namespace, VLAN POP is supported there.

> >
> > Q6. Is it possible to apply rte_flow actions for specified tx queue of
> > physical NIC?
> > (e.g. VM connect with PHY:0 using tx queue index:1, I want to entag
> > VLAN 101 to the traffic from VM to PHY:0 is it possible?)
Directly - no, there is no item to match with specific Tx queue.

If setting VLAN on specific Tx queue is desired we have two options:

- engage Tx offload DEV_TX_OFFLOAD_VLAN_INSERT, and provide VLAN with
 each packet being transferred to tx_burst

- engage DEV_TX_OFFLOAD_MATCH_METADATA feature, and set specific
metadata for all packets on specific queue. Then the rules matching with this metadata
may be inserted.

[snip]

With best regards, Slava


More information about the dev mailing list