Skip to content

ice: add PFCP filter support

Alexander Lobakin intel-wired-lan lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest21 patches 15 repliesIn review 12 of 21 applied
  2. v521 patches 30 repliesSuperseded

Patches in v6 12 of 21 applied

#Subject and filesSizeRepliesApplied
1/21lib/bitmap: add bitmap_{read,write}()include/linux/bitmap.h+77 -00 repliesApplied
2/21lib/test_bitmap: add tests for bitmap_{read,write}()lib/test_bitmap.c+172 -72 repliesApplied
3/21lib/test_bitmap: use pr_info() for non-error messageslib/test_bitmap.c+5 -50 repliesApplied
4/21bitops: add missing prototype checkinclude/linux/bitops.h+1 -00 repliesApplied
5/21bitops: make BYTES_TO_BITS() treewide-availableinclude/linux/bitops.h kernel/trace/trace_probe.c tools/include/linux/bitops.h +1 more+5 -50 replies
6/21bitops: let the compiler optimize {__,}assign_bit()include/linux/bitops.h+4 -160 repliesApplied
7/21linkmode: convert linkmode_{test,set,clear,mod}_bit() to macrosinclude/linux/linkmode.h+4 -230 repliesApplied
8/21s390/cio: rename bitmap_size() -> idset_bitmap_size()drivers/s390/cio/idset.c+6 -40 repliesApplied
9/21fs/ntfs3: add prefix to bitmap_size() and use BITS_TO_U64()fs/ntfs3/bitmap.c fs/ntfs3/fsntfs.c fs/ntfs3/index.c +2 more+12 -110 replies
10/21btrfs: rename bitmap_set_bits() -> btrfs_bitmap_set_bits()fs/btrfs/free-space-cache.c+4 -40 repliesApplied
11/21tools: move alignment-related macros to new <linux/align.h>tools/include/linux/align.h tools/include/linux/bitmap.h tools/include/linux/mm.h+14 -50 repliesApplied
12/21bitmap: introduce generic optimized bitmap_size()drivers/md/dm-clone-metadata.c drivers/s390/cio/idset.c include/linux/bitmap.h +3 more+11 -150 replies
13/21bitmap: make bitmap_{get,set}_value8() use bitmap_{read,write}()include/linux/bitmap.h+5 -333 repliesApplied
14/21lib/bitmap: add compile-time test for __assign_bit() optimizationlib/test_bitmap.c+10 -80 repliesApplied
15/21ip_tunnel: use a separate struct to store tunnel params in the kerneldrivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.c drivers/net/ethernet/mellanox/mlxsw/spectrum_ipip.h drivers/net/ethernet/mellanox/mlxsw/spectrum_span.c +10 more+137 -752 replies
16/21ip_tunnel: convert __be16 tunnel flags to bitmapsdrivers/net/bareudp.c drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun.h drivers/net/ethernet/mellanox/mlx5/core/en/tc_tun_encap.c +37 more+715 -4150 replies
17/21net: net_test: add tests for IP tunnel flags conversion helpersnet/core/Makefile net/core/net_test.c+125 -90 repliesApplied
18/21pfcp: add PFCP moduledrivers/net/Kconfig drivers/net/Makefile drivers/net/pfcp.c +1 more+254 -00 replies
19/21pfcp: always set pfcp metadatadrivers/net/pfcp.c include/net/ip_tunnels.h include/net/pfcp.h +4 more+282 -64 replies
20/21ice: refactor ICE_TC_FLWR_FIELD_ENC_OPTSdrivers/net/ethernet/intel/ice/ice_tc_lib.c drivers/net/ethernet/intel/ice/ice_tc_lib.h+6 -60 replies
21/21ice: Add support for PFCP hardware offload in switchdevdrivers/net/ethernet/intel/ice/ice_ddp.c drivers/net/ethernet/intel/ice/ice_flex_type.h drivers/net/ethernet/intel/ice/ice_protocol_type.h +4 more+169 -70 replies

Reviews trailers per patch

18 of 21 patches have a Reviewed-by or Acked-by.

PatchAndy ShevchenkoYury NorovPrzemek KitszelJakub KicinskiPeter OberparleiterDavid SterbaSimon Horman
1/21R-b A-b
2/21R-b A-b
3/21A-b
4/21R-b
5/21A-b R-b
6/21A-b R-b
7/21A-b R-b A-b
8/21R-b A-b
9/21R-b R-b
10/21R-b R-b A-b
11/21
12/21A-b R-b
13/21
14/21R-b
15/21R-b
16/21R-b
17/21
18/21R-b
19/21R-b
20/21R-b
21/21R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 7 reviewers.

Read the v6 thread

Cover letter [PATCH net-next v6 00/21] ice: add PFCP filter support

Add support for creating PFCP filters in switchdev mode. Add pfcp module that allows to create a PFCP-type netdev. The netdev then can be passed to tc when creating a filter to indicate that PFCP filter should be created.

To add a PFCP filter, a special netdev must be created and passed to tc command:

  ip link add pfcp0 type pfcp
  tc filter add dev eth0 ingress prio 1 flower pfcp_opts \
    1:12ab/ff:fffffffffffffff0 skip_hw action mirred egress redirect \
    dev pfcp0

Changes in iproute2 [1] are required to use pfcp_opts in tc.

ICE COMMS package is required as it contains PFCP profiles.

Part of this patchset modifies IP_TUNNEL_*_OPTs, which were previously stored in a __be16. All possible values have already been used, making it impossible to add new ones.

* 1-3: add new bitmap_{read,write}(), which is used later in the IP

       tunnel flags code (from Alexander's ARM64 MTE series[2]);

* 4-14: some bitmap code preparations also used later in IP tunnels;
* 15-17: convert IP tunnel flags from __be16 to a bitmap;
* 18-21: add PFCP module and support for it in ice.

[1] https://lore.kernel.org/netdev/[email protected]
[2] https://lore.kernel.org/linux-kernel/[email protected]

Alexander Lobakin (14):
bitops: add missing prototype check
bitops: make BYTES_TO_BITS() treewide-available
bitops: let the compiler optimize {__,}assign_bit()
linkmode: convert linkmode_{test,set,clear,mod}_bit() to macros s390/cio: rename bitmap_size() -> idset_bitmap_size() fs/ntfs3: add prefix to bitmap_size() and use BITS_TO_U64()
btrfs: rename bitmap_set_bits() -> btrfs_bitmap_set_bits()
tools: move alignment-related macros to new <linux/align.h>
bitmap: introduce generic optimized bitmap_size()
bitmap: make bitmap_{get,set}_value8() use bitmap_{read,write}() lib/bitmap: add compile-time test for __assign_bit() optimization
ip_tunnel: use a separate struct to store tunnel params in the kernel
ip_tunnel: convert __be16 tunnel flags to bitmaps
net: net_test: add tests for IP tunnel flags conversion helpers

Alexander Potapenko (2):
lib/test_bitmap: add tests for bitmap_{read,write}() lib/test_bitmap: use pr_info() for non-error messages

Marcin Szycik (2):
ice: refactor ICE_TC_FLWR_FIELD_ENC_OPTS
ice: Add support for PFCP hardware offload in switchdev

Michal Swiatkowski (1):
pfcp: always set pfcp metadata

Syed Nayyar Waris (1):
lib/bitmap: add bitmap_{read,write}()

Wojciech Drewek (1):
pfcp: add PFCP module

 drivers/net/Kconfig                           |  13 +
 drivers/net/Makefile                          |   1 +
 net/core/Makefile                             |   2 +-
 .../net/ethernet/intel/ice/ice_flex_type.h    |   4 +-
 .../ethernet/intel/ice/ice_protocol_type.h    |  12 +
 drivers/net/ethernet/intel/ice/ice_switch.h   |   2 +
 drivers/net/ethernet/intel/ice/ice_tc_lib.h   |   8 +-
 .../ethernet/mellanox/mlx5/core/en/tc_tun.h   |   2 +-
 .../ethernet/mellanox/mlxsw/spectrum_ipip.h   |   2 +-
 fs/ntfs3/ntfs_fs.h                            |   4 +-
 include/linux/bitmap.h                        |  95 ++++--
 include/linux/bitops.h                        |  23 +-
 include/linux/cpumask.h                       |   2 +-
 include/linux/linkmode.h                      |  27 +-
 include/linux/netdevice.h                     |   7 +-
 include/net/dst_metadata.h                    |  10 +-
 include/net/flow_dissector.h                  |   2 +-
 include/net/gre.h                             |  70 ++--
 include/net/ip6_tunnel.h                      |   4 +-
 include/net/ip_tunnels.h                      | 139 ++++++--
 include/net/pfcp.h                            |  90 ++++++
 include/net/udp_tunnel.h                      |   4 +-
 include/uapi/linux/if_tunnel.h                |  36 +++
 include/uapi/linux/pkt_cls.h                  |  14 +
 tools/include/linux/align.h                   |  12 +
 tools/include/linux/bitmap.h                  |   9 +-
 tools/include/linux/bitops.h                  |   2 +
 tools/include/linux/mm.h                      |   5 +-
 drivers/md/dm-clone-metadata.c                |   5 -
 drivers/net/bareudp.c                         |  19 +-
 drivers/net/ethernet/intel/ice/ice_ddp.c      |   9 +
 drivers/net/ethernet/intel/ice/ice_switch.c   |  85 +++++
 drivers/net/ethernet/intel/ice/ice_tc_lib.c   |  68 +++-
 .../mellanox/mlx5/core/en/tc_tun_encap.c      |   6 +-
 .../mellanox/mlx5/core/en/tc_tun_geneve.c     |  12 +-
 .../mellanox/mlx5/core/en/tc_tun_gre.c        |   8 +-
 .../mellanox/mlx5/core/en/tc_tun_vxlan.c      |   9 +-
 .../net/ethernet/mellanox/mlx5/core/en_tc.c   |  16 +-
 .../ethernet/mellanox/mlxsw/spectrum_ipip.c   |  56 ++--
 .../ethernet/mellanox/mlxsw/spectrum_span.c   |  10 +-
 .../ethernet/netronome/nfp/flower/action.c    |  27 +-
 drivers/net/geneve.c                          |  44 ++-
 drivers/net/pfcp.c                            | 302 ++++++++++++++++++
 drivers/net/vxlan/vxlan_core.c                |  14 +-
 drivers/s390/cio/idset.c                      |  12 +-
 fs/btrfs/free-space-cache.c                   |   8 +-
 fs/ntfs3/bitmap.c                             |   4 +-
 fs/ntfs3/fsntfs.c                             |   2 +-
 fs/ntfs3/index.c                              |  11 +-
 fs/ntfs3/super.c                              |   2 +-
 kernel/trace/trace_probe.c                    |   2 -
 lib/math/prime_numbers.c                      |   2 -
 lib/test_bitmap.c                             | 203 ++++++++++--
 net/bridge/br_vlan_tunnel.c                   |   9 +-
 net/core/filter.c                             |  26 +-
 net/core/flow_dissector.c                     |  20 +-
 net/core/{gso_test.c => net_test.c}           | 129 +++++++-
 net/ipv4/fou_bpf.c                            |   2 +-
 net/ipv4/gre_demux.c                          |   2 +-
 net/ipv4/ip_gre.c                             | 144 +++++----
 net/ipv4/ip_tunnel.c                          | 109 +++++--
 net/ipv4/ip_tunnel_core.c                     |  82 +++--
 net/ipv4/ip_vti.c                             |  41 ++-
 net/ipv4/ipip.c                               |  33 +-
 net/ipv4/ipmr.c                               |   2 +-
 net/ipv4/udp_tunnel_core.c                    |   5 +-
 net/ipv6/addrconf.c                           |   3 +-
 net/ipv6/ip6_gre.c                            |  85 ++---
 net/ipv6/ip6_tunnel.c                         |  14 +-
 net/ipv6/sit.c                                |  38 ++-
 net/netfilter/ipvs/ip_vs_core.c               |   6 +-
 net/netfilter/ipvs/ip_vs_xmit.c               |  20 +-
 net/netfilter/nft_tunnel.c                    |  44 +--
 net/openvswitch/flow_netlink.c                |  61 ++--
 net/psample/psample.c                         |  26 +-
 net/sched/act_tunnel_key.c                    |  36 +--
 net/sched/cls_flower.c                        | 134 +++++++-
 tools/perf/util/probe-finder.c                |   4 +-
 78 files changed, 1988 insertions(+), 624 deletions(-)
 create mode 100644 include/net/pfcp.h
 create mode 100644 tools/include/linux/align.h
 create mode 100644 drivers/net/pfcp.c
 rename net/core/{gso_test.c => net_test.c} (67%)

---
From v5[3]:
* 6.9-rc1;
* move IP tunnel flags KUnit test from the bitmap test suite to the networking KUnit (CONFIG_NET_TEST) (Yury);
* pick tags (Yury, Peter); now the entire series is fully tagged (except the above tests);
* no functional changes besides the tests.

From v4[4]:
* rebase on top of 6.8-rc1;
* collect all the dependencies together in one series (did I get it right? :s);
* no functional changes.

[3] https://lore.kernel.org/netdev/[email protected]
[4] https://lore.kernel.org/netdev/[email protected]

v3: https://lore.kernel.org/intel-wired-lan/[email protected]
v2: https://lore.kernel.org/intel-wired-lan/[email protected]
v1: https://lore.kernel.org/intel-wired-lan/[email protected]

Signature · 1 line
2.44.0