From: Flavio Leitner <[email protected]> Rename to dp_packet_ol_tcp_seg, because that is less redundant and allows other protocols.
Signed-off-by: Flavio Leitner <[email protected]> Co-authored-by: Mike Pattrick <[email protected]> Signed-off-by: Mike Pattrick <[email protected]> Acked-by: Maxime Coquelin <[email protected]> --- lib/dp-packet.h | 2 +- lib/netdev-linux.c | 2 +- lib/netdev.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dp-packet.h b/lib/dp-packet.h index 1b17ef263..fdc0882ab 100644 --- a/lib/dp-packet.h +++ b/lib/dp-packet.h @@ -974,7 +974,7 @@ dp_packet_ol_tx_l4_checksum(const struct dp_packet *a) /* Returns 'true' if packet 'a' is marked for TCP segmentation offloading. */ static inline bool -dp_packet_ol_is_tso(const struct dp_packet *a) +dp_packet_ol_tcp_seg(const struct dp_packet *a) { return !!(*dp_packet_ol_flags_ptr(a) & DP_PACKET_OL_TX_TCP_SEG); } diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 490c751b6..47765032c 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -6682,7 +6682,7 @@ netdev_linux_prepend_vnet_hdr(struct dp_packet *p, int mtu) { struct virtio_net_hdr *vnet = dp_packet_push_zeros(p, sizeof *vnet); - if (dp_packet_ol_is_tso(p)) { + if (dp_packet_ol_tcp_seg(p)) { uint16_t hdr_len = ((char *) dp_packet_l4(p) - (char *) dp_packet_eth(p)) + TCP_HEADER_LEN; diff --git a/lib/netdev.c b/lib/netdev.c index d087929e5..fb535ed7c 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -794,7 +794,7 @@ netdev_send_prepare_packet(const uint64_t netdev_flags, { uint64_t l4_mask; - if (dp_packet_ol_is_tso(packet) + if (dp_packet_ol_tcp_seg(packet) && !(netdev_flags & NETDEV_OFFLOAD_TX_TCP_TSO)) { /* Fall back to GSO in software. */ VLOG_ERR_BUF(errormsg, "No TSO support"); @@ -960,7 +960,7 @@ netdev_push_header(const struct netdev *netdev, size_t i, size = dp_packet_batch_size(batch); DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, batch) { - if (OVS_UNLIKELY(dp_packet_ol_is_tso(packet) + if (OVS_UNLIKELY(dp_packet_ol_tcp_seg(packet) || dp_packet_ol_l4_mask(packet))) { COVERAGE_INC(netdev_push_header_drops); dp_packet_delete(packet); -- 2.31.1 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
