diff mbox series

[ovs-dev,5/7] dp-packet: Rename dp_packet_ol_tcp_seg

Message ID 20220603151542.897026-6-mkp@redhat.com
State Superseded
Headers show
Series dp-packet: Refactor offload related names | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Mike Pattrick June 3, 2022, 3:15 p.m. UTC
From: Flavio Leitner <fbl@sysclose.org>

Rename to dp_packet_ol_tcp_seg, because that is less
redundant and allows other protocols.

Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Co-authored-by: Mike Pattrick <mkp@redhat.com>
Signed-off-by: Mike Pattrick <mkp@redhat.com>
---
 lib/dp-packet.h    | 2 +-
 lib/netdev-linux.c | 2 +-
 lib/netdev.c       | 4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

Comments

Maxime Coquelin June 8, 2022, 10:19 a.m. UTC | #1
On 6/3/22 17:15, Mike Pattrick wrote:
> From: Flavio Leitner <fbl@sysclose.org>
> 
> Rename to dp_packet_ol_tcp_seg, because that is less
> redundant and allows other protocols.
> 
> Signed-off-by: Flavio Leitner <fbl@sysclose.org>
> Co-authored-by: Mike Pattrick <mkp@redhat.com>
> Signed-off-by: Mike Pattrick <mkp@redhat.com>
> ---
>   lib/dp-packet.h    | 2 +-
>   lib/netdev-linux.c | 2 +-
>   lib/netdev.c       | 4 ++--
>   3 files changed, 4 insertions(+), 4 deletions(-)
> 

Acked-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime
diff mbox series

Patch

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);