On 2/27/26 9:29 AM, David Marchand via dev wrote: > Define a helper capable of segmenting packets from a batch and returning > them in the input batch. > This will allow calling GSO in other places of OVS during packet > processing. > > Using this helper, we still need to ensure that the netdev ->send() op > is called with only NETDEV_MAX_BURST packets.
I wonder why? There seems to be no actual limit for the Tx side, even for dpdk ports. There is a litmit technically, but it's UINT16_MAX, which we should not be able to reach. Or am I missing something? > Add two more helpers for sending one burst of NETDEV_MAX_BURST, and > another to split a large batch into multiple bursts. > > Signed-off-by: David Marchand <[email protected]> > --- > Documentation/topics/userspace-tso.rst | 4 +- > lib/dp-packet-gso.c | 66 +++++++----- > lib/dp-packet-gso.h | 4 +- > lib/dp-packet.h | 16 +++ > lib/netdev.c | 133 +++++++++---------------- > tests/dpif-netdev.at | 31 ++++++ > 6 files changed, 135 insertions(+), 119 deletions(-) [...] > diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at > index 4e6aa3ce04..b4eb64ffd0 100644 > --- a/tests/dpif-netdev.at > +++ b/tests/dpif-netdev.at > @@ -3405,6 +3405,37 @@ AT_CHECK([ovs-pcap p3-tx.pcap | wc -l], [0], [2 > OVS_VSWITCHD_STOP > AT_CLEANUP > > +AT_SETUP([dpif-netdev - tso + dynamic packet batch grow]) > +AT_KEYWORDS([userspace offload]) > +OVS_VSWITCHD_START( > + [set Open_vSwitch . other_config:userspace-tso-enable=true]) > +add_of_ports --pcap br0 $(seq 1 2) > + > +AT_CHECK([ovs-vsctl set Interface p1 options:ol_tso_segsz=1000]) > + > +AT_CHECK([ovs-ofctl add-flow br0 in_port=1,actions=output:2]) > + > +OVS_CHECK_BATCH_GROW([0]) > +CHECK_COVERAGE([dp_packet_gso], [0]) > + > +flow_s="in_port(1),eth(src=50:54:00:00:00:05,dst=50:54:00:00:01:00),eth_type(0x0800), > \ > + ipv4(src=10.0.1.1,dst=10.0.0.1,proto=6,tos=0,ttl=64,frag=no), \ > + tcp(src=1234,dst=80),tcp_flags(ack)" > +AT_CHECK([ovs-appctl netdev-dummy/receive p1 "${flow_s}" --len 35000]) > + > +dnl Interface statistics and coverage counters take some time to refresh. > +OVS_WAIT_UNTIL([test `ovs-vsctl get interface p1 statistics:rx_packets` -eq > 1]) Should use $(). > +CHECK_COVERAGE([netdev_received], [1]) > +OVS_CHECK_BATCH_GROW([1]) > +CHECK_COVERAGE([dp_packet_gso], [1]) > +CHECK_COVERAGE([netdev_send_multi], [1]) > +CHECK_COVERAGE([netdev_sent], [2]) > +AT_CHECK([ovs-vsctl get interface p2 statistics:tx_packets], [0], [35 > +]) > + > +OVS_VSWITCHD_STOP > +AT_CLEANUP > + > AT_SETUP([dpif-netdev - revalidators handle dp modification fail correctly]) > OVS_VSWITCHD_START( > [add-port br0 p1 \ _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
