Thread (1 message) 1 message, 1 author, 2015-03-03

Re: [PATCH] net: add SO_MAX_DGRAM_QLEN for AF_UNIX SOCK_DGRAM sockets

From: Eric Dumazet <hidden>
Date: 2015-03-03 15:56:15
Also in: netdev

On Tue, 2015-03-03 at 16:05 +0100, Christian Seiler wrote:
Doesn't this assume a typical datagram size of 256 bytes? Isn't that
something that should be left up to the user? Also, suddenly the RCVBUF
size of UNIX domain sockets suddenly becomes relevant, even though it
is never actually checked when it comes to queuing the messages (only
the SNDBUF size of the sending socket is checked). This creates really
inconsistent semantics in my eyes where the receive buffer is useful
for some things, but not for others.
Simple : If limit is expressed in term of packets, not in term of memory
usage, then the limit is in number of packets, not in bytes.

This is the reason we have pfifo and bfifo qdisc :
Admin can choose what he wants to limit on a device : packets or bytes.

If you want to allow the limitation being done in same SO_RCVBUF spirit,
you need to submit a patch for that.

(Using skb_set_owner_r() and tracking sk->sk_rmem_alloc instead of
skb_queue_len(&sk->sk_receive_queue) )
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help