[0/8] net/mlx5: add switch offload for VXLAN encap/decap
mbox series

Message ID 20180831092038.23051-1-adrien.mazarguil@6wind.com
Headers show
  • net/mlx5: add switch offload for VXLAN encap/decap
Related show


Adrien Mazarguil Aug. 31, 2018, 9:57 a.m. UTC
This series adds support for RTE_FLOW_ACTION_TYPE_VXLAN_ENCAP and

Since these actions are supported at the switch level, the "transfer"
attribute must be set on such flow rules. They must also be combined with a
port redirection action to make sense.

A typical use case is port representors in switchdev mode, with VXLAN
traffic encapsulation performed on traffic coming *from* a representor and
decapsulation on traffic going *to* that representor, in order to
transparently assign a given VXLAN to VF traffic.

Since only ingress is supported, encapsulation flow rules are normally
applied on a physical port and emit traffic to a port representor. The
opposite order is used for decapsulation.

Like other mlx5 switch flow rule actions, these are implemented through
Linux's TC flower API. Since the Linux interface for VXLAN encap/decap
involves virtual network devices (i.e. ip link add type vxlan [...]), the
PMD automatically spawns them on a needed basis through Netlink calls. The
added complexity necessarily results in a rather convoluted PMD

This series relies on "ethdev: add flow API object converter" [1] which
should applied first since testpmd does not provide a means to test VXLAN
encap otherwise.

[1] https://patches.dpdk.org/project/dpdk/list/?series=1123

Adrien Mazarguil (8):
  net/mlx5: speed up interface index retrieval for flow rules
  net/mlx5: clean up redundant interface name getters
  net/mlx5: rename internal function
  net/mlx5: enhance TC flow rule send/ack function
  net/mlx5: prepare switch flow rule parser for encap offloads
  net/mlx5: add convenience macros to switch flow rule engine
  net/mlx5: add VXLAN encap support to switch flow rules
  net/mlx5: add VXLAN decap support to switch flow rules

 drivers/net/mlx5/Makefile       |   75 ++
 drivers/net/mlx5/mlx5.c         |   74 +-
 drivers/net/mlx5/mlx5.h         |   28 +-
 drivers/net/mlx5/mlx5_ethdev.c  |  188 ++--
 drivers/net/mlx5/mlx5_flow.c    |   16 +-
 drivers/net/mlx5/mlx5_nl.c      |    9 +-
 drivers/net/mlx5/mlx5_nl_flow.c | 1763 ++++++++++++++++++++++++++++++++--
 7 files changed, 1871 insertions(+), 282 deletions(-)