mbox series

[ovs-dev,RFC,v3,0/4] extend ovs-tc offload for more pedit action

Message ID 1548678550-6661-1-git-send-email-pieter.jansenvanvuuren@netronome.com
Headers show
Series extend ovs-tc offload for more pedit action | expand

Message

Pieter Jansen van Vuuren Jan. 28, 2019, 12:29 p.m. UTC
Hi all,

This set fixes and subsequently extends the ovs-tc pedit interface
to allow setting ipv4 dscp and ecn fields as well as ipv6 traffic
class in tc via pedit. Patch 1 introduces a new sparse header which
helps work around the big endian issues in the tc_pedit_key structure.
Patch 2 fixes the offset calculation function which could lead to
undefined behaviour. Patch 4 in this set also introduces the notion
of boundary shifts to allow translating non-byte-aligned fields like
traffic class and flow limit for IPv6 to be offloaded.

v2 -> v3:
- Create sparse/linux/tc_act/tc_pedit.h to work around be32 issue.
- Fix big endian issue (patch 1).
- Fix 32 bit shift (patch 2).

v1 -> v2:
- Move helpers from byte-order.h to local tc.c
- Swap htonl/ntohl and reword comment.

Pieter Jansen van Vuuren (4):
  lib/tc: make pedit mask calculations byte order agnostic
  lib/tc: fix 32 bits shift for pedit offset calculation
  lib/tc: add set ipv4 dscp and ecn action offload via pedit
  lib/tc: add set ipv6 traffic class action offload via pedit

 include/sparse/automake.mk             |  3 +-
 include/sparse/linux/tc_act/tc_pedit.h | 29 +++++++++
 lib/netdev-tc-offloads.c               | 10 ++-
 lib/tc.c                               | 87 ++++++++++++++++++--------
 lib/tc.h                               |  2 +
 5 files changed, 102 insertions(+), 29 deletions(-)
 create mode 100644 include/sparse/linux/tc_act/tc_pedit.h

Comments

Simon Horman Jan. 31, 2019, 9:55 a.m. UTC | #1
On Mon, Jan 28, 2019 at 12:29:06PM +0000, Pieter Jansen van Vuuren wrote:
> Hi all,
> 
> This set fixes and subsequently extends the ovs-tc pedit interface
> to allow setting ipv4 dscp and ecn fields as well as ipv6 traffic
> class in tc via pedit. Patch 1 introduces a new sparse header which
> helps work around the big endian issues in the tc_pedit_key structure.
> Patch 2 fixes the offset calculation function which could lead to
> undefined behaviour. Patch 4 in this set also introduces the notion
> of boundary shifts to allow translating non-byte-aligned fields like
> traffic class and flow limit for IPv6 to be offloaded.

Thanks Pieter,

I believe this addresses all outstanding issues with this series.
I have applied it to master.