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

Hideyuki Yamashita yamashita.hideyuki at ntt-tx.co.jp
Mon Oct 21 09:11:48 CEST 2019


Dear Slava, Moti and all,

Please let me know if you need more information.
Partial answer is acceptable for me.

Thanks in advaince!

BR,
HIdeyuki Yamashita
NTT TechnoCross

> Dear Slava and experts,
> 
> Thanks for your answering me.
> Baased on your answer, I tested using testpmd.
> And about the outcome, I have several questions.
> 
> 
> [1.Test environment]
> OS:Ubuntu18.04
> NIC1:MCX4121A-ACAT 25G
> NIC2:MCX516A-CCAT 100G
> Repo:dpdk-next-net
> 
> I checked that the following is shown in git log command.
> 9f1e94469 net/mlx5: fix netlink rdma socket callback routine
> 50735012c net/mlx5: support reading module EEPROM data
> f53a5f917 net/mlx5: support modify VLAN ID on existing VLAN header
> 9af8046a1 net/mlx5: support modify VLAN ID on new VLAN header
> 43184603e net/mlx5: support modifying VLAN priority on VLAN header
> 4f59ffbd8 net/mlx5: support push flow action on VLAN header
> b4bd8f5da net/mlx5: support pop flow action on VLAN header
> 048e3e84c net/mlx5: add VLAN push/pop DR commands to glue
> 
> [2.Test result]
> I tested the follwoing flows with testpmd included in dpdk-next-net.
> 
> A.flow create 0 ingress pattern eth / vlan id is 100 / end actions OF_POP_VLAN / end 
> B.flow create 0 ingress pattern eth dst is BB:BB:BB:BB:BB:BB / end actions OF_PUSH_VLAN ethertype 1000 / end 
> C.flow create 0 ingress pattern eth dst is BB:BB:BB:BB:BB:BB / end actions OF_SET_VLAN_VID vlan_vid 200 / end 
> D.flow create X ingress pattern eth dst is BB:BB:BB:BB:BB:BB / end actions of_SET_VLAN_PCP vlan_pcp 3 / end 
> E.flow create 0 egress pattern eth src is BB:BB:BB:BB:BB:BB / end actions OF_PUSH_VLAN ethertype 1000 / end
> 
> A-D, resulted in "Caught error type 16 (specific action): cause: 0x7ffcc711db48, action not supported: Operation not supported".
> E resulted in "Egress is not supported".
> 
> [3. Quetions]
> Q1. What is the appropriate flow to entag/detag VLAN using testpmd?
>  I think related commits are included so it "should" work and my guess is that my flow is somehow wrong.
> Q2. Is it correct understanding that "egress" is not supported for mlx5 PMD?
> Q3. If yes, is it possible to entag VLAN tag to the outgoing packet from physical NIC by using rte_flow?
> 
> BR,
> Hideyuki Yamashita
> NTT TechnoCross
> 
> 
> > > -----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