On 09/11/2026 17:43, Eelco Chaudron wrote:
External email: Use caution opening links or attachments
Allow the netdev_hw_post_process() callback to return an optional set of
alternative actions via a new 'alt_actions' parameter. When set, these
actions are executed instead of the flow's own actions, enabling offload
providers to indicate that a subset of the actions was already performed
in hardware.
v4 changes:
- Add additional counter to count action continuation hits.
Hi Eelco, thanks for the counter enhancement.
However, my meaning about statistics was for per flow.
This feature is aimed to be used in CT offload. With such, consider a
typical flow:
<M>,actions=A1,ct(),recirc()
If all is offloaded (both the megaflow and the connection), we will hit
fully in HW.
With a new connection, the same megaflow is in HW. The HW will match <M>
and perform A1, but we will miss in CT, so we will continue
the processing in SW.
It will be useful if we have such info in ovs-appctl dpctl/dump-flows -m.
For example (from our downstream):
ufid:fe4f3bd1-7a31-42ea-9a0a-a54dfd363f3f,
recirc_id(0),dp_hash(0/0),skb_priority(0/0),nv_mp_pid(0/0),nv_mp_preferred(0/0),nv_mp_strict(0/0),in_port(enp8s0f0_0),skb_mark(0/0),ct_state(0/0x20),ct_zone(0/0),ct_mark(0/0),ct_label(0/0),packet_type(ns=0,id=0),eth(src=00:00:00:00:00:01/00:00:00:00:00:00,dst=00:00:00:00:00:02/00:00:00:00:00:00),eth_type(0x0800),ipv4(src=1.1.1.1/0.0.0.0,dst=2.2.2.2/0.0.0.0,proto=17/0,tos=0/0,ttl=64/0,frag=no),udp(src=1000/0,dst=2000/0),
partial_offload_packets:4, partial_offload_bytes:240, packets:7,
bytes:420, used:2.185s, offloaded:yes, dp:doca,
actions:ct(zone=2),recirc(0x1), dp-extra-info:miniflow_bits(3,2)
As I mentioned, we removed altogether the support for the "legacy"
partial offload (match only), so our "partial" meaning is only for this
case.
For upstream, I think we should decide on names.
Another enhancement I suggested (same area, not those commits) is to
have (per-flow, like this), is a separation between SW/HW counters.
It can show both (even for a simple flow), in case the offload thread
takes some time while some packets still pass in SW. It's an edge case,
but still worth considering.
v3 changes:
- Reworked dummy_build_alt_actions() to preserve action ordering,
processing actions up to the first non-offloadable port and
returning the remainder as alt_actions. Also changed
dummy_offload_hw_process_pkt() to adhere to this.
- Restored comment in dummy_netdev_simulate_offload() that was
incorrectly removed.
- Fixed potential ABBA deadlock in dummy_netdev_hw_offload_run()
that was introduced.
v2 changes:
- Removed first patch adding the ALWAYS_INLINE attribute
- Use positive error codes in dpif-offload-dummy.c
- Fixed some style issues
Eelco Chaudron (2):
dpif-offload: Add support for alternative actions.
dpif-offload-dummy: Exercise hw_post_process() alt_actions API.
lib/dpif-netdev-perf.c | 3 +
lib/dpif-netdev-perf.h | 2 +
lib/dpif-netdev.c | 113 ++++++++++++++++++++-------
lib/dpif-offload-dpdk.c | 5 +-
lib/dpif-offload-dummy.c | 148 +++++++++++++++++++++++++++++++-----
lib/dpif-offload-provider.h | 7 +-
lib/dpif-offload.c | 4 +-
lib/dpif-offload.h | 7 ++
tests/dpif-netdev.at | 103 ++++++++++++++++++++++++-
tests/ofproto-dpif.at | 65 ++++++++++------
tests/pmd.at | 3 +-
11 files changed, 384 insertions(+), 76 deletions(-)
--
2.56.0
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev