Skip to content

fib_rules: support sport, dport and proto match

Roopa Prabhu netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest5 patches 12 repliesIn review
  2. v15 patches 15 repliesSuperseded

Changes in v2 from the cover letter

- address comments from Nikolay, David Ahern and Paolo (Thanks!)

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5net: fib_rules: support for match on ip_proto, sport and dportinclude/net/fib_rules.h include/uapi/linux/fib_rules.h net/core/fib_rules.c+133 -33 replies
2/5ipv4: fib_rules: support match on sport, dport and ip protonet/ipv4/fib_rules.c+11 -01 reply
3/5ipv6: fib6_rules: support for match on sport, dport and ip protonet/ipv6/fib6_rules.c+11 -01 reply
4/5ipv4: route: dissect flow in input path if fib rules need itinclude/net/ip_fib.h include/net/netns/ipv4.h net/ipv4/fib_rules.c +2 more+65 -162 replies
5/5ipv6: route: dissect flow in input path if fib rules need itinclude/net/ip6_fib.h include/net/ip6_route.h include/net/netns/ipv6.h +3 more+72 -122 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by.

PatchPaolo AbeniNikolay Aleksandrov
1/5A-b
2/5A-b
3/5A-b
4/5A-b A-b
5/5A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/5] fib_rules: support sport, dport and proto match

From: Roopa Prabhu <[email protected]>

This series extends fib rule match support to include sport, dport and ip proto match (to complete the 5-tuple match support). Common use-cases of Policy based routing in the data center require 5-tuple match. The last 2 patches in the series add a call to flow dissect in the fwd path if required by the installed fib rules (controlled by a flag).

v1:
- Fix errors reported by kbuild and feedback on RFC
- extend port match uapi to accomodate port ranges

v2:
- address comments from Nikolay, David Ahern and Paolo (Thanks!)

Pending things I will submit separate patches for:
- extack for fib rules
- fib rules test (as requested by david ahern)

Roopa Prabhu (5):
net: fib_rules: support for match on ip_proto, sport and dport
ipv4: fib_rules: support match on sport, dport and ip proto
ipv6: fib6_rules: support for match on sport, dport and ip proto
ipv4: route: dissect flow in input path if fib rules need it
ipv6: route: dissect flow in input path if fib rules need it

 include/net/fib_rules.h        | 31 +++++++++++++-
 include/net/ip6_route.h        |  3 +-
 include/net/ip_fib.h           |  2 +-
 include/net/netns/ipv4.h       |  1 +
 include/net/netns/ipv6.h       |  1 +
 include/uapi/linux/fib_rules.h |  8 ++++
 net/core/fib_rules.c           | 95 +++++++++++++++++++++++++++++++++++++++++-
 net/ipv4/fib_rules.c           | 15 +++++++
 net/ipv4/fib_semantics.c       |  2 +-
 net/ipv4/route.c               | 52 ++++++++++++++++-------
 net/ipv6/fib6_rules.c          | 14 +++++++
 net/ipv6/icmp.c                |  2 +-
 net/ipv6/route.c               | 45 ++++++++++++++++----
 13 files changed, 241 insertions(+), 30 deletions(-)
Signature · 1 line
2.1.4