hw-tc-offload netdev feature config support

Bug #2070314 reported by Dmitrii Shcherbakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
Triaged
Wishlist
Unassigned

Bug Description

Netplan currently supports a subset of netdev feature flags related to stateless offload:

https://github.com/canonical/netplan/blob/b9730281029ce7ebd2415af736bf02e6763725d9/src/parse.c#L2962-L2968
https://github.com/canonical/netplan/blob/b9730281029ce7ebd2415af736bf02e6763725d9/examples/offload.yaml#L5-L11

In order to leverage TC state offload to hardware, some NICs (like ConnectX, Bluefield etc.) support the `hw-tc-offload` feature flag.

https://github.com/torvalds/linux/blob/55027e689933ba2e64f3d245fb1ff185b3e7fc81/net/ethtool/common.c#L63-L63
```
const char netdev_features_strings[NETDEV_FEATURE_COUNT][ETH_GSTRING_LEN] = {
// ...
 [NETIF_F_HW_TC_BIT] = "hw-tc-offload",
// ...
```

https://github.com/torvalds/linux/blob/55027e689933ba2e64f3d245fb1ff185b3e7fc81/include/linux/netdev_features.h#L75
```
 NETIF_F_HW_TC_BIT, /* Offload TC infrastructure */
```

https://github.com/torvalds/linux/commit/1c78c64e9c6f43a490427d55cd2d213b7c6795c1 (commit introducing the feature).

The result of having this setting exposed in netplan (per device) should be equivalent to running the following command on a netdev:

https://docs.nvidia.com/networking/display/bluefielddpuosv460/virtual+switch+on+dpu#src-2571331481_VirtualSwitchonDPU-EnablingOVSHWOffloading

ethtool -K <PF> hw-tc-offload on

It would be good if netplan supported this option which would alleviate the need for ad-hoc scripts enabling it on a per-device basis.

description: updated
Lukas Märdian (slyon)
Changed in netplan:
status: New → Triaged
importance: Undecided → Wishlist
tags: added: foundations-todo
tags: added: fr-8173
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.