diff mbox series

[ovs-dev,[PATCH,RFC] 08/17] dp-packet: Rename dp_packet_ol_is_ipv4.

Message ID 20211207165156.705727-9-fbl@sysclose.org
State RFC
Headers show
Series [ovs-dev,[PATCH,RFC] 08/17] dp-packet: Rename dp_packet_ol_is_ipv4. | expand

Commit Message

Flavio Leitner Dec. 7, 2021, 4:51 p.m. UTC
Rename to dp_packet_ol_tx_ipv4 to align the flag.

Signed-off-by: Flavio Leitner <fbl@sysclose.org>
---
 lib/conntrack.c    | 4 ++--
 lib/dp-packet.h    | 2 +-
 lib/ipf.c          | 6 +++---
 lib/netdev-linux.c | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)
diff mbox series

Patch

diff --git a/lib/conntrack.c b/lib/conntrack.c
index 24234e672..2f9b17670 100644
--- a/lib/conntrack.c
+++ b/lib/conntrack.c
@@ -2095,7 +2095,7 @@  conn_key_extract(struct conntrack *ct, struct dp_packet *pkt, ovs_be16 dl_type,
             COVERAGE_INC(conntrack_l3csum_err);
         } else {
             bool hwol_good_l3_csum = dp_packet_ip_csum_good(pkt)
-                                     || dp_packet_ol_is_ipv4(pkt);
+                                     || dp_packet_ol_tx_ipv4(pkt);
             /* Validate the checksum only when hwol is not supported. */
             ok = extract_l3_ipv4(&ctx->key, l3, dp_packet_l3_size(pkt), NULL,
                                  !hwol_good_l3_csum);
@@ -3402,7 +3402,7 @@  handle_ftp_ctl(struct conntrack *ct, const struct conn_lookup_ctx *ctx,
                 }
                 if (seq_skew) {
                     ip_len = ntohs(l3_hdr->ip_tot_len) + seq_skew;
-                    if (!dp_packet_ol_is_ipv4(pkt)) {
+                    if (!dp_packet_ol_tx_ipv4(pkt)) {
                         l3_hdr->ip_csum = recalc_csum16(l3_hdr->ip_csum,
                                                         l3_hdr->ip_tot_len,
                                                         htons(ip_len));
diff --git a/lib/dp-packet.h b/lib/dp-packet.h
index 614ebbb4d..dfa25e095 100644
--- a/lib/dp-packet.h
+++ b/lib/dp-packet.h
@@ -979,7 +979,7 @@  dp_packet_ol_tcp_seg(const struct dp_packet *p)
 
 /* Returns 'true' if packet 'p' is marked for IPv4 checksum offloading. */
 static inline bool
-dp_packet_ol_is_ipv4(const struct dp_packet *p)
+dp_packet_ol_tx_ipv4(const struct dp_packet *p)
 {
     return !!(*dp_packet_ol_flags_ptr(p) & DP_PACKET_OL_TX_IPV4);
 }
diff --git a/lib/ipf.c b/lib/ipf.c
index f290d5d23..fd40e32c4 100644
--- a/lib/ipf.c
+++ b/lib/ipf.c
@@ -433,7 +433,7 @@  ipf_reassemble_v4_frags(struct ipf_list *ipf_list)
     len += rest_len;
     l3 = dp_packet_l3(pkt);
     ovs_be16 new_ip_frag_off = l3->ip_frag_off & ~htons(IP_MORE_FRAGMENTS);
-    if (!dp_packet_ol_is_ipv4(pkt)) {
+    if (!dp_packet_ol_tx_ipv4(pkt)) {
         l3->ip_csum = recalc_csum16(l3->ip_csum, l3->ip_frag_off,
                                     new_ip_frag_off);
         l3->ip_csum = recalc_csum16(l3->ip_csum, l3->ip_tot_len, htons(len));
@@ -609,7 +609,7 @@  ipf_is_valid_v4_frag(struct ipf *ipf, struct dp_packet *pkt)
     }
 
     if (OVS_UNLIKELY(!dp_packet_ip_csum_good(pkt)
-                     && !dp_packet_ol_is_ipv4(pkt)
+                     && !dp_packet_ol_tx_ipv4(pkt)
                      && csum(l3, ip_hdr_len) != 0)) {
         COVERAGE_INC(ipf_l3csum_err);
         goto invalid_pkt;
@@ -1185,7 +1185,7 @@  ipf_post_execute_reass_pkts(struct ipf *ipf,
                     } else {
                         struct ip_header *l3_frag = dp_packet_l3(frag_i->pkt);
                         struct ip_header *l3_reass = dp_packet_l3(pkt);
-                        if (!dp_packet_ol_is_ipv4(frag_i->pkt)) {
+                        if (!dp_packet_ol_tx_ipv4(frag_i->pkt)) {
                             ovs_be32 reass_ip =
                                 get_16aligned_be32(&l3_reass->ip_src);
                             ovs_be32 frag_ip =
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 5d0af5a40..696a86db2 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -6671,7 +6671,7 @@  netdev_linux_prepend_vnet_hdr(struct dp_packet *b, int mtu)
 
         vnet->hdr_len = (OVS_FORCE __virtio16)hdr_len;
         vnet->gso_size = (OVS_FORCE __virtio16)(mtu - hdr_len);
-        if (dp_packet_ol_is_ipv4(b)) {
+        if (dp_packet_ol_tx_ipv4(b)) {
             vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
         } else {
             vnet->gso_type = VIRTIO_NET_HDR_GSO_TCPV6;