Skip to content

flow_offload: update mangle action representation

Pablo Neira Ayuso netdev netfilter-devel oe-kbuild-all 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest4 patches 11 repliesIn review
  2. v44 patches 1 replySuperseded
  3. v34 patches 10 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v24 patches1 replySuperseded
v14 patches7 repliesSuperseded

Changes since v5 from the cover letter

* v4 patchset was missing the initial 1/4 patch to undo the bitwise NOT operation as the cover letter describes.

* Use header field definitions to calculate the header field from the u32 offset and the mask. This allows for mangling a few bytes of a multi-byte field, eg. offset=0 mask=0x00ff to mangle one single byte of a source port. --Edward Cree

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: flow_offload: flip mangle action maskdrivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c drivers/net/ethernet/mellanox/mlx5/core/en_tc.c drivers/net/ethernet/netronome/nfp/flower/action.c +1 more+14 -141 reply
2/4net: flow_offload: bitwise AND on mangle action value fielddrivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c drivers/net/ethernet/mellanox/mlx5/core/en_tc.c drivers/net/ethernet/netronome/nfp/flower/action.c +1 more+8 -291 reply
3/4net: flow_offload: mangle action at byte leveldrivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h drivers/net/ethernet/mellanox/mlx5/core/en_tc.c +3 more+396 -3289 replies
4/4netfilter: nft_payload: packet mangling offload supportnet/netfilter/nft_payload.c+73 -00 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchJiri Pirko
1/4A-b
2/4A-b
3/4
4/4

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

Read the v5 thread

Cover letter [PATCH net-next,v5 0/4] flow_offload: update mangle action representation

This patch updates the mangle action representation:

Patch 1) Undo bitwise NOT operation on the mangle mask (coming from tc
pedit userspace).

Patch 2) mangle value &= mask from the front-end side.

Patch 3) adjust offset, length and coalesce consecutive pedit keys into
one single action. Calculate header field based on the offset and mask.

Patch 4) add support for payload mangling for netfilter.

After this patchset:

* Offset to payload does not need to be on the 32-bits boundaries anymore. This patchset adds front-end code to adjust the offset and length coming from the tc pedit representation, so drivers get an exact header field offset and length.

* This new front-end code coalesces consecutive pedit action composed of several keys into one single action, so drivers can mangle IPv6 and ethernet address fields in one go, instead of updating 32-bit word at a time.

As a result, driver codebase to deal with payload mangling gets simplified.

Changes since v5:

* v4 patchset was missing the initial 1/4 patch to undo the bitwise NOT operation as the cover letter describes.

* Use header field definitions to calculate the header field from the u32 offset and the mask. This allows for mangling a few bytes of a multi-byte field, eg. offset=0 mask=0x00ff to mangle one single byte of a source port. --Edward Cree

Please, apply.

Pablo Neira Ayuso (4):
net: flow_offload: flip mangle action mask
net: flow_offload: bitwise AND on mangle action value field
net: flow_offload: mangle action at byte level
netfilter: nft_payload: packet mangling offload support

 .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c   | 163 ++++----------
 .../net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h   |  40 +---
 drivers/net/ethernet/mellanox/mlx5/core/en_tc.c    |  80 +++----
 drivers/net/ethernet/netronome/nfp/flower/action.c | 212 +++++++-----------
 include/net/flow_offload.h                         |   7 +-
 net/netfilter/nft_payload.c                        |  73 +++++++
 net/sched/cls_api.c                                | 243 +++++++++++++++++++--
 7 files changed, 469 insertions(+), 349 deletions(-)
Signature · 1 line
2.11.0