Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next 0/5] Introduce matching on double vlan/QinQ headers for TC flower
@ 2018-06-30  9:53 Jianbo Liu
  2018-06-30  9:53 ` [PATCH net-next 1/5] net/flow_dissector: Save vlan ethertype from headers Jianbo Liu
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jianbo Liu @ 2018-06-30  9:53 UTC (permalink / raw)
  To: netdev, davem, jiri; +Cc: Jianbo Liu

Currently TC flower supports only one vlan tag, it doesn't match on both outer
and inner vlan headers for QinQ. To do this, we add support to get both outer
and inner vlan headers for flow dissector, and then TC flower do matching on
those information.

We also plan to extend TC command to support this feature. We add new
cvlan_id/cvlan_prio/cvlan_ethtype keywords for inner vlan header. The existing
vlan_id/vlan_prio/vlan_ethtype are for outer vlan header, and vlan_ethtype must
be 802.1q or 802.1ad.

The examples for command and output are as the following.
# tc filter add dev ens1f1 parent ffff: protocol 802.1ad pref 33 \
        flower vlan_id 1000 vlan_ethtype 802.1q \
        cvlan_id 100 cvlan_ethtype ipv4 \
        action vlan pop \
        action vlan pop \
        action mirred egress redirect dev ens1f1_0

# tc filter show dev ens1f1 ingress
filter protocol 802.1ad pref 33 flower chain 0
filter protocol 802.1ad pref 33 flower chain 0 handle 0x1
  vlan_id 1000
  vlan_ethtype 802.1Q
  cvlan_id 100
  cvlan_ethtype ip
  eth_type ipv4
  in_hw
    ...

Jianbo Liu (5):
  net/flow_dissector: Save vlan ethertype from headers
  net/sched: flower: Add support for matching on vlan ethertype
  net/flow_dissector: Add support for QinQ dissection
  net/sched: flower: Dump the ethertype encapsulated in vlan
  net/sched: flower: Add supprt for matching on QinQ vlan headers

 include/net/flow_dissector.h |  4 ++-
 include/uapi/linux/pkt_cls.h |  4 +++
 net/core/flow_dissector.c    | 34 +++++++++++----------
 net/sched/cls_flower.c       | 70 ++++++++++++++++++++++++++++++++++++--------
 4 files changed, 83 insertions(+), 29 deletions(-)

-- 
2.9.5

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-06-30 12:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-30  9:53 [PATCH net-next 0/5] Introduce matching on double vlan/QinQ headers for TC flower Jianbo Liu
2018-06-30  9:53 ` [PATCH net-next 1/5] net/flow_dissector: Save vlan ethertype from headers Jianbo Liu
2018-06-30  9:53 ` [PATCH net-next 2/5] net/sched: flower: Add support for matching on vlan ethertype Jianbo Liu
2018-06-30  9:53 ` [PATCH net-next 3/5] net/flow_dissector: Add support for QinQ dissection Jianbo Liu
2018-06-30  9:53 ` [PATCH net-next 4/5] net/sched: flower: Dump the ethertype encapsulated in vlan Jianbo Liu
2018-06-30 12:54   ` kbuild test robot
2018-06-30  9:53 ` [PATCH net-next 5/5] net/sched: flower: Add supprt for matching on QinQ vlan headers Jianbo Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox