From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: David Gibson <david@gibson.dropbear.id.au>,
Laurent Vivier <lvivier@redhat.com>
Subject: [PATCH] ip: Use regular htons() for non-constant protocol number in L2_BUF_IP4_PSUM
Date: Wed, 6 Mar 2024 08:08:36 +0100 [thread overview]
Message-ID: <20240306070836.3417504-1-sbrivio@redhat.com> (raw)
instead of htons_constant(), which is for... constants.
Fixes: 5bf200ae8a1a ("tcp, udp: Don't include destination address in partially precomputed csums")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
ip.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ip.h b/ip.h
index 9be4778..b9aedf6 100644
--- a/ip.h
+++ b/ip.h
@@ -38,7 +38,7 @@
.daddr = 0, \
}
#define L2_BUF_IP4_PSUM(proto) ((uint32_t)htons_constant(0x4500) + \
- (uint32_t)htons_constant(0xff00 | (proto)))
+ (uint32_t)htons(0xff00 | (proto)))
#define L2_BUF_IP6_INIT(proto) \
{ \
--
@@ -38,7 +38,7 @@
.daddr = 0, \
}
#define L2_BUF_IP4_PSUM(proto) ((uint32_t)htons_constant(0x4500) + \
- (uint32_t)htons_constant(0xff00 | (proto)))
+ (uint32_t)htons(0xff00 | (proto)))
#define L2_BUF_IP6_INIT(proto) \
{ \
--
2.39.2
next reply other threads:[~2024-03-06 7:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-06 7:08 Stefano Brivio [this message]
2024-03-08 0:55 ` [PATCH] ip: Use regular htons() for non-constant protocol number in L2_BUF_IP4_PSUM David Gibson
2024-03-08 9:28 ` Stefano Brivio
2024-03-14 5:02 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240306070836.3417504-1-sbrivio@redhat.com \
--to=sbrivio@redhat.com \
--cc=david@gibson.dropbear.id.au \
--cc=lvivier@redhat.com \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).