On 15/12/2025 13:57, David Marchand via dev wrote: > In case no inner checksum is requested, we can consider the inner data > as opaque since there is nothing to do and rely on simple HW UDP checksum > without considering support for HW outer UDP checksum. > > Cleanup the DPDK helper accordingly. > > Acked-by: Mike Pattrick <[email protected]> > Signed-off-by: David Marchand <[email protected]> > --- > Changes since v2: > - added check for TSO packets, > > --- > lib/dp-packet.c | 16 +++++++++++----- > lib/netdev-dpdk.c | 5 +---- > 2 files changed, 12 insertions(+), 9 deletions(-) > > diff --git a/lib/dp-packet.c b/lib/dp-packet.c > index b34bcf26f3..b893fbd396 100644 > --- a/lib/dp-packet.c > +++ b/lib/dp-packet.c > @@ -553,12 +553,18 @@ dp_packet_compare_offsets(struct dp_packet *b1, struct > dp_packet *b2, > void > dp_packet_ol_send_prepare(struct dp_packet *p, uint64_t flags) > { > - if (!dp_packet_ip_checksum_partial(p) > - && !dp_packet_l4_checksum_partial(p) > - && !dp_packet_inner_ip_checksum_partial(p) > + if (!dp_packet_inner_ip_checksum_partial(p) > && !dp_packet_inner_l4_checksum_partial(p)) { > - /* Only checksumming needs actions. */
nit: "No checksumming needed" :-) It can be fixed on apply Acked-by: Kevin Traynor <[email protected]> > - return; > + > + if (!dp_packet_ip_checksum_partial(p) > + && !dp_packet_l4_checksum_partial(p)) { > + /* Only checksumming needs actions. */ > + return; > + } > + > + if (OVS_UNLIKELY(dp_packet_tunnel(p) && > !dp_packet_get_tso_segsz(p))) { > + p->offloads &= ~DP_PACKET_OL_TUNNEL_MASK; > + } > } > > if (!dp_packet_tunnel(p)) { > diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c > index f6ae235af3..29b1b21d64 100644 > --- a/lib/netdev-dpdk.c > +++ b/lib/netdev-dpdk.c > @@ -2647,10 +2647,7 @@ netdev_dpdk_prep_hwol_packet(struct netdev_dpdk *dev, > struct rte_mbuf *mbuf) > return true; > } > > - if (dp_packet_tunnel(pkt) > - && (dp_packet_inner_ip_checksum_partial(pkt) > - || dp_packet_inner_l4_checksum_partial(pkt) > - || mbuf->tso_segsz)) { > + if (dp_packet_tunnel(pkt)) { > if (dp_packet_ip_checksum_partial(pkt) > || dp_packet_l4_checksum_partial(pkt)) { > mbuf->outer_l2_len = (char *) dp_packet_l3(pkt) - _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
