mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
udp6: shuffle up->pending AF_INET bits
Corked AF_INET for ipv6 socket doesn't appear to be the hottest case, so move it out of the common path under up->pending check to remove overhead. Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
cd3c748077
commit
406c4a0af0
1 changed files with 2 additions and 3 deletions
|
@ -1363,9 +1363,6 @@ do_udp_sendmsg:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (up->pending == AF_INET)
|
|
||||||
return udp_sendmsg(sk, msg, len);
|
|
||||||
|
|
||||||
/* Rough check on arithmetic overflow,
|
/* Rough check on arithmetic overflow,
|
||||||
better check is made in ip6_append_data().
|
better check is made in ip6_append_data().
|
||||||
*/
|
*/
|
||||||
|
@ -1374,6 +1371,8 @@ do_udp_sendmsg:
|
||||||
|
|
||||||
getfrag = is_udplite ? udplite_getfrag : ip_generic_getfrag;
|
getfrag = is_udplite ? udplite_getfrag : ip_generic_getfrag;
|
||||||
if (up->pending) {
|
if (up->pending) {
|
||||||
|
if (up->pending == AF_INET)
|
||||||
|
return udp_sendmsg(sk, msg, len);
|
||||||
/*
|
/*
|
||||||
* There are pending frames.
|
* There are pending frames.
|
||||||
* The socket lock must be held while it's corked.
|
* The socket lock must be held while it's corked.
|
||||||
|
|
Loading…
Add table
Reference in a new issue