Skip to content
Commit f94fd25c authored by Jens Axboe's avatar Jens Axboe Committed by Jakub Kicinski
Browse files

tcp: pass back data left in socket after receive



This is currently done for CMSG_INQ, add an ability to do so via struct
msghdr as well and have CMSG_INQ use that too. If the caller sets
msghdr->msg_get_inq, then we'll pass back the hint in msghdr->msg_inq.

Rearrange struct msghdr a bit so we can add this member while shrinking
it at the same time. On a 64-bit build, it was 96 bytes before this
change and 88 bytes afterwards.

Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/650c22ca-cffc-0255-9a05-2413a1e20826@kernel.dk


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent af2d861d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment