From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
To: davem@davemloft.net, kuba@kernel.org, yoshfuji@linux-ipv6.org,
dsahern@kernel.org
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Paolo Abeni <pabeni@redhat.com>,
Eric Dumazet <edumazet@google.com>
Subject: [PATCH] udp: Switch the order of arguments to copy_linear_skb
Date: Tue, 11 May 2021 12:34:00 +0100 [thread overview]
Message-ID: <20210511113400.1722975-1-willy@infradead.org> (raw)
All other skb functions use (off, len); this is the only one which
uses (len, off). Make it consistent.
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
include/net/udp.h | 2 +-
net/ipv4/udp.c | 2 +-
net/ipv6/udp.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/net/udp.h b/include/net/udp.h
index 360df454356c..c4a7a4c56e75 100644
--- a/include/net/udp.h
+++ b/include/net/udp.h
@@ -392,7 +392,7 @@ static inline bool udp_skb_is_linear(struct sk_buff *skb)
}
#endif
-static inline int copy_linear_skb(struct sk_buff *skb, int len, int off,
+static inline int copy_linear_skb(struct sk_buff *skb, int off, int len,
struct iov_iter *to)
{
int n;
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index 15f5504adf5b..783c466e6071 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1859,7 +1859,7 @@ int udp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, int noblock,
if (checksum_valid || udp_skb_csum_unnecessary(skb)) {
if (udp_skb_is_linear(skb))
- err = copy_linear_skb(skb, copied, off, &msg->msg_iter);
+ err = copy_linear_skb(skb, off, copied, &msg->msg_iter);
else
err = skb_copy_datagram_msg(skb, off, msg, copied);
} else {
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 199b080d418a..24b202dd370e 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -369,7 +369,7 @@ int udpv6_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,
if (checksum_valid || udp_skb_csum_unnecessary(skb)) {
if (udp_skb_is_linear(skb))
- err = copy_linear_skb(skb, copied, off, &msg->msg_iter);
+ err = copy_linear_skb(skb, off, copied, &msg->msg_iter);
else
err = skb_copy_datagram_msg(skb, off, msg, copied);
} else {
--
2.30.2
next reply other threads:[~2021-05-11 11:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-11 11:34 Matthew Wilcox (Oracle) [this message]
2021-05-11 13:11 ` [PATCH] udp: Switch the order of arguments to copy_linear_skb David Laight
2021-05-11 13:38 ` Matthew Wilcox
2021-05-11 13:44 ` David Laight
2021-05-11 13:54 ` Matthew Wilcox
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=20210511113400.1722975-1-willy@infradead.org \
--to=willy@infradead.org \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=yoshfuji@linux-ipv6.org \
/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.
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 NNTP newsgroup(s).