Skip to contentSkip to conversation

net: fix return type of IPv6 L4 packet checksum

PATCH Superseded [email protected] 3 participants 6 messages Apr 6, 2023 – Apr 12, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: fix return type of IPv6 L4 packet checksum

From: Elena Agostini <[email protected]>

Function returns 0 or -1 but the return type is uint16_t.

---
 lib/net/rte_ip.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/net/rte_ip.h +1 -1
index a310e9d498..e7106256aa 100644
@@ -514,7 +514,7 @@ rte_ipv4_udptcp_cksum_verify(const struct rte_ipv4_hdr *ipv4_hdr,
  *   Return 0 if the checksum is correct, else -1.
  */
 __rte_experimental
-static inline uint16_t
+static inline int
 rte_ipv4_udptcp_cksum_mbuf_verify(const struct rte_mbuf *m,
 				  const struct rte_ipv4_hdr *ipv4_hdr,
 				  uint16_t l4_off)
Signature · 1 line
2.34.1
#1 lore raw

Hi Elena,

Maybe it is better to add a fixline here.

BR. Bing

Quoted 35 lines

-----Original Message-----
From: [email protected] <[email protected]>
Sent: Thursday, April 6, 2023 5:21 PM
To: [email protected]
Cc: [email protected]; Elena Agostini <[email protected]>
Subject: [PATCH] net: fix return type of IPv6 L4 packet checksum

External email: Use caution opening links or attachments

From: Elena Agostini <[email protected]>

Function returns 0 or -1 but the return type is uint16_t.

---
 lib/net/rte_ip.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/net/rte_ip.h index a310e9d498..e7106256aa renamed from lib/net/rte_ip.h +0 -0

100644

lib/net/rte_ip.h +1 -1
@@ -514,7 +514,7 @@ rte_ipv4_udptcp_cksum_verify(const struct
 rte_ipv4_hdr *ipv4_hdr,
  *   Return 0 if the checksum is correct, else -1.
  */
 __rte_experimental
-static inline uint16_t
+static inline int
 rte_ipv4_udptcp_cksum_mbuf_verify(const struct rte_mbuf *m,
                                  const struct rte_ipv4_hdr *ipv4_hdr,
                                  uint16_t l4_off)

--
2.34.1

#2 lore raw

PATCH v2 1/1 net: fix return type of IPv6 L4 packet checksum

In reply to [email protected]

From: Elena Agostini <[email protected]>

Function returns 0 or -1 but the return type is uint16_t.

Fixes d178f693bbfe ("net: add UDP/TCP checksum in mbuf segments")

---
V2:
added fixline and fixed cc address
---

---
 lib/net/rte_ip.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/net/rte_ip.h +1 -1
index a310e9d498..e7106256aa 100644
@@ -514,7 +514,7 @@ rte_ipv4_udptcp_cksum_verify(const struct rte_ipv4_hdr *ipv4_hdr,
  *   Return 0 if the checksum is correct, else -1.
  */
 __rte_experimental
-static inline uint16_t
+static inline int
 rte_ipv4_udptcp_cksum_mbuf_verify(const struct rte_mbuf *m,
 				  const struct rte_ipv4_hdr *ipv4_hdr,
 				  uint16_t l4_off)
Signature · 1 line
2.34.1
#5 lore raw

PATCH v3 1/1 net: fix return type of IPv4 L4 packet checksum

In reply to [email protected]

From: Elena Agostini <[email protected]>

Function returns 0 or -1 but the return type is uint16_t.

Fixes d178f693bbfe ("net: add UDP/TCP checksum in mbuf segments")

---
V2:
added fixline and fixed cc address
V3:
title changed

---
 lib/net/rte_ip.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/net/rte_ip.h +1 -1
index a310e9d498..e7106256aa 100644
@@ -514,7 +514,7 @@ rte_ipv4_udptcp_cksum_verify(const struct rte_ipv4_hdr *ipv4_hdr,
  *   Return 0 if the checksum is correct, else -1.
  */
 __rte_experimental
-static inline uint16_t
+static inline int
 rte_ipv4_udptcp_cksum_mbuf_verify(const struct rte_mbuf *m,
 				  const struct rte_ipv4_hdr *ipv4_hdr,
 				  uint16_t l4_off)
Signature · 1 line
2.34.1