Skip to content

flow_dissector, cls_flower: Add support for multiple MPLS Label Stack Entries

Guillaume Nault netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest2 patches 1 replyIn review
  2. v22 patches 5 repliesSuperseded
  3. v12 patches 1 replySuperseded

Changes in v3 from the cover letter

* Fix compilation with the new MLX5 bareudp tunnel code.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2flow_dissector: Parse multiple MPLS Label Stack Entriesdrivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_mplsoudp.c drivers/net/ethernet/netronome/nfp/flower/match.c include/net/flow_dissector.h +2 more+132 -520 replies
2/2cls_flower: Support filtering on multiple MPLS Label Stack Entriesinclude/uapi/linux/pkt_cls.h net/sched/cls_flower.c+265 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH net-next v3 0/2] flow_dissector, cls_flower: Add support for multiple MPLS Label Stack Entries

Currently, the flow dissector and the Flower classifier can only handle the first entry of an MPLS label stack. This patch series generalises the code to allow parsing and matching the Label Stack Entries that follow.

Patch 1 extends the flow dissector to parse MPLS LSEs until the Bottom Of Stack bit is reached. The number of parsed LSEs is capped at FLOW_DIS_MPLS_MAX (arbitrarily set to 7). Flower and the NFP driver are updated to take into account the new layout of struct flow_dissector_key_mpls.

Patch 2 extends Flower. It defines new netlink attributes, which are independent from the previous MPLS ones. Mixing the old and the new attributes in a same filter is not allowed. For backward compatibility, the old attributes are used when dumping filters that don't require the new ones.

Changes since v2:
* Fix compilation with the new MLX5 bareudp tunnel code.

Changes since v1:
* Fix compilation of NFP driver (kbuild test robot).
* Fix sparse warning with entropy label (kbuild test robot).

Guillaume Nault (2):
flow_dissector: Parse multiple MPLS Label Stack Entries
cls_flower: Support filtering on multiple MPLS Label Stack Entries

 .../mellanox/mlx5/core/en/tc_tun_mplsoudp.c   |  27 +-
 .../net/ethernet/netronome/nfp/flower/match.c |  42 ++-
 include/net/flow_dissector.h                  |  14 +-
 include/uapi/linux/pkt_cls.h                  |  23 ++
 net/core/flow_dissector.c                     |  49 ++-
 net/sched/cls_flower.c                        | 295 +++++++++++++++++-
 6 files changed, 397 insertions(+), 53 deletions(-)
Signature · 7 lines
2.21.1

Notes:
  * The NFP and MLX5 udpates have been compile-tested only, as I don't
    don't have the required hardware. Reviews from Netronome and
    Mellanox warmly welcome.
  * Compiles with allmodconfig on latest net-next tree, I swear :)