All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4 net-next] flow_offload: update mangle action representation
@ 2019-08-30  0:53 Pablo Neira Ayuso
  2019-08-30  0:53 ` [PATCH net-next 1/4] net: flow_offload: flip mangle action mask Pablo Neira Ayuso
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Pablo Neira Ayuso @ 2019-08-30  0:53 UTC (permalink / raw)
  To: netfilter-devel; +Cc: davem, netdev, vishal, jakub.kicinski, saeedm, jiri

Hi,

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 actions.

Patch 4) add payload mangling for netfilter.

After this patchset:

* Offsets do 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.

* The front-end coalesces consecutive pedit actions into one single
  word, so drivers can mangle IPv6 and ethernet address fields in one
  single go.

On the driver side, diffstat -t shows that drivers code to deal with
payload mangling gets simplified:

	INSERTED,DELETED,MODIFIED,FILENAME
	46,116,0,drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.c (-70 LOC)
	12,28,0,drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h (-16 LOC)
	30,60,0,drivers/net/ethernet/mellanox/mlx5/core/en_tc.c (-30 LOC)
	89,111,0,drivers/net/ethernet/netronome/nfp/flower/action.c (-22 LOC)

While, on the front-end side the balance is the following:

	122,21,0,net/sched/cls_api.c (+101 LOC)

Please, apply.

P.S: This patchset comes after the "netfilter: payload mangling offload
     support" series, although it has been heavily reworked.

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    |  90 +++------
 drivers/net/ethernet/netronome/nfp/flower/action.c | 201 +++++++++------------
 include/net/flow_offload.h                         |   7 +-
 net/netfilter/nft_payload.c                        |  72 ++++++++
 net/sched/cls_api.c                                | 142 +++++++++++++--
 7 files changed, 376 insertions(+), 339 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-09-03  0:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-30  0:53 [PATCH 0/4 net-next] flow_offload: update mangle action representation Pablo Neira Ayuso
2019-08-30  0:53 ` [PATCH net-next 1/4] net: flow_offload: flip mangle action mask Pablo Neira Ayuso
2019-08-30  0:53 ` [PATCH net-next 2/4] net: flow_offload: bitwise AND on mangle action value field Pablo Neira Ayuso
2019-08-30  0:53 ` [PATCH net-next 3/4] net: flow_offload: mangle action at byte level Pablo Neira Ayuso
2019-08-30 15:28   ` Vlad Buslov
2019-08-30  0:53 ` [PATCH net-next 4/4] netfilter: nft_payload: packet mangling offload support Pablo Neira Ayuso
2019-08-30  1:54 ` [PATCH 0/4 net-next] flow_offload: update mangle action representation Jakub Kicinski
2019-08-30  9:07   ` Pablo Neira Ayuso
2019-08-30 22:33     ` Jakub Kicinski
2019-08-31 14:22       ` Pablo Neira Ayuso
2019-09-01 20:47         ` Jakub Kicinski
2019-09-03  0:05           ` Pablo Neira Ayuso

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.