From: Eric Dumazet <edumazet@google.com>
To: Josh Hunt <johunt@akamai.com>
Cc: David Miller <davem@davemloft.net>, Arnd Bergmann <arnd@arndb.de>,
Soheil Hassas Yeganeh <soheil@google.com>,
Willem de Bruijn <willemb@google.com>,
Paolo Abeni <pabeni@redhat.com>,
linux-arch@vger.kernel.org, netdev <netdev@vger.kernel.org>
Subject: Re: [RFC PATCH] sock: add SO_RCVQUEUE_SIZE getsockopt
Date: Mon, 13 Mar 2017 09:12:32 -0700 [thread overview]
Message-ID: <CANn89iJ21dhirFW2OdNqHWfOgq-EieVMm5ou9pZ7g2oUz=+bfA@mail.gmail.com> (raw)
In-Reply-To: <1489420786-19547-1-git-send-email-johunt@akamai.com>
On Mon, Mar 13, 2017 at 8:59 AM, Josh Hunt <johunt@akamai.com> wrote:
> Allows application to read the amount of data sitting in the receive
> queue.
>
> Signed-off-by: Josh Hunt <johunt@akamai.com>
> ---
>
> A team here is looking for a way to get the amount of data in a UDP socket's
> receive queue. It seems like this should be SIOCINQ, but for UDP sockets that
> returns the size of the next pending datagram. I implemented the patch below,
> but am wondering if this is the right place for this change? I was debating
> between this or a new UDP ioctl.
But what is the 'amount of data' exactly ?
Number of packets, amount of bytes to read from these packets ?
You chose to report kernel memory usage, which is not guaranteed to be
the same among kernels versions (or kernel configs)
If we export these internals, I would export the whole thing, like we
did with netlink
ie tweak sock_diag_put_meminfo() and export the SK_MEMINFO_VARS
So that we avoid adding other options in the future.
next prev parent reply other threads:[~2017-03-13 16:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 15:59 [RFC PATCH] sock: add SO_RCVQUEUE_SIZE getsockopt Josh Hunt
2017-03-13 15:59 ` Josh Hunt
2017-03-13 16:12 ` Eric Dumazet [this message]
2017-03-13 16:12 ` Eric Dumazet
2017-03-13 17:38 ` Josh Hunt
2017-03-13 17:38 ` Josh Hunt
2017-03-13 19:39 ` David Miller
2017-03-13 23:34 ` Josh Hunt
2017-03-13 23:34 ` Josh Hunt
2017-03-14 0:10 ` David Miller
2017-03-14 22:11 ` Josh Hunt
2017-03-14 1:31 ` Eric Dumazet
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='CANn89iJ21dhirFW2OdNqHWfOgq-EieVMm5ou9pZ7g2oUz=+bfA@mail.gmail.com' \
--to=edumazet@google.com \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=johunt@akamai.com \
--cc=linux-arch@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=soheil@google.com \
--cc=willemb@google.com \
/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).