Skip to content

flow_dissector: Protocol specific flow dissector offload

Tom Herbert netdev 2 versions In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest8 patches 8 repliesIn review
  2. v38 patches 0 repliesSuperseded

Changes in v4 from the cover letter

- skb argument to ndo_rx_flow_steer allso needs to become non constant

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8flow_dissector: Change skbuf argument to be non constdrivers/net/ethernet/broadcom/bnxt/bnxt.c drivers/net/ethernet/cisco/enic/enic_clsf.c drivers/net/ethernet/cisco/enic/enic_clsf.h +17 more+34 -340 replies
2/8flow_dissector: Move ETH_P_TEB processing to main switchnet/core/flow_dissector.c+24 -210 replies
3/8udp: Check static key udp_encap_needed in udp_gro_receiveinclude/net/udp.h net/ipv4/udp.c net/ipv4/udp_offload.c +1 more+19 -10 replies
4/8flow_dissector: Add protocol specific flow dissection offloadinclude/linux/netdevice.h include/net/flow_dissector.h net/core/dev.c +2 more+110 -30 replies
5/8ip: Add callbacks to flow dissection by IP protocolnet/ipv4/af_inet.c net/ipv6/ip6_offload.c+54 -00 replies
6/8udp: flow dissector offloadinclude/linux/udp.h include/net/udp.h include/net/udp_tunnel.h +3 more+89 -00 replies
7/8fou: Support flow dissectionnet/ipv4/fou.c+63 -00 replies
8/8vxlan: support flow dissectdrivers/net/vxlan.c+40 -00 replies

Reviews trailers per patch

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

Read the v4 thread

Cover letter [PATCH v4 net-next 0/8] flow_dissector: Protocol specific flow dissector offload

This patch set adds a new offload type to perform flow dissection for specific protocols (either by EtherType or by IP protocol). This is primary useful to crack open UDP encapsulations (like VXLAN, GUE) for the purposes of parsing the encapsulated packet.

Items in this patch set:
- Create new protocol case in __skb_dissect for ETH_P_TEB. This is based on the code in the GRE dissect function and the special handling in GRE can now be removed (it sets protocol to ETH_P_TEB and returns so goto proto_again is done)
- Add infrastructure for protocol specific flow dissection offload
- Add infrastructure to perform UDP flow dissection. Uses same model of GRO where a flow_dissect callback can be associated with a UDP socket
- Use the infrastructure to support flow dissection of VXLAN and GUE

Tested:

Forced RPS to call flow dissection for VXLAN, FOU, and GUE. Observed that inner packet was being properly dissected.

v2: Add signed off

v3:
- Make skb argument of flow dissector to be non const
- Change UDP GRO to only do something if encap_needed static key is set
- don't reference inet6_offloads or inet_offloads, get to them through ptype

v4:
- skb argument to ndo_rx_flow_steer allso needs to become non constant

Tom Herbert (8):
flow_dissector: Change skbuf argument to be non const
flow_dissector: Move ETH_P_TEB processing to main switch
udp: Check static key udp_encap_needed in udp_gro_receive
flow_dissector: Add protocol specific flow dissection offload
ip: Add callbacks to flow dissection by IP protocol
udp: flow dissector offload
fou: Support flow dissection
vxlan: support flow dissect

 drivers/net/ethernet/broadcom/bnxt/bnxt.c         |  2 +-
 drivers/net/ethernet/cisco/enic/enic_clsf.c       |  2 +-
 drivers/net/ethernet/cisco/enic/enic_clsf.h       |  2 +-
 drivers/net/ethernet/mellanox/mlx4/en_netdev.c    |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en.h      |  2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_arfs.c |  2 +-
 drivers/net/ethernet/qlogic/qede/qede.h           |  2 +-
 drivers/net/ethernet/qlogic/qede/qede_filter.c    |  2 +-
 drivers/net/ethernet/sfc/efx.h                    |  2 +-
 drivers/net/ethernet/sfc/falcon/efx.h             |  2 +-
 drivers/net/ethernet/sfc/falcon/rx.c              |  2 +-
 drivers/net/ethernet/sfc/rx.c                     |  2 +-
 drivers/net/vxlan.c                               | 40 +++++++++++++
 include/linux/netdevice.h                         | 31 +++++++++-
 include/linux/skbuff.h                            | 12 ++--
 include/linux/udp.h                               |  8 +++
 include/net/flow_dissector.h                      |  1 +
 include/net/ip_fib.h                              |  4 +-
 include/net/route.h                               |  4 +-
 include/net/udp.h                                 | 10 ++++
 include/net/udp_tunnel.h                          |  8 +++
 net/core/dev.c                                    | 65 +++++++++++++++++++++
 net/core/flow_dissector.c                         | 71 ++++++++++++++---------
 net/ipv4/af_inet.c                                | 27 +++++++++
 net/ipv4/fib_semantics.c                          |  2 +-
 net/ipv4/fou.c                                    | 63 ++++++++++++++++++++
 net/ipv4/route.c                                  | 10 ++--
 net/ipv4/udp.c                                    |  4 +-
 net/ipv4/udp_offload.c                            | 55 ++++++++++++++++++
 net/ipv4/udp_tunnel.c                             |  1 +
 net/ipv6/ip6_offload.c                            | 27 +++++++++
 net/ipv6/udp_offload.c                            | 23 ++++++++
 net/sched/sch_sfq.c                               |  2 +-
 33 files changed, 433 insertions(+), 59 deletions(-)
Signature · 1 line
2.11.0