netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jon Maloy <jon.maloy@ericsson.com>
To: David Miller <davem@davemloft.net>,
	Tung Quang Nguyen <tung.q.nguyen@dektech.com.au>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"tipc-discussion@lists.sourceforge.net" 
	<tipc-discussion@lists.sourceforge.net>
Subject: RE: [tipc-discussion][net-next v1] tipc: introduce new socket option TIPC_SOCK_RECVQ_USED
Date: Fri, 19 Apr 2019 21:51:31 +0000	[thread overview]
Message-ID: <BL0PR1501MB20037E349F4A0AADD0F292CF9A270@BL0PR1501MB2003.namprd15.prod.outlook.com> (raw)
In-Reply-To: <20190419.144044.69245687286795279.davem@davemloft.net>



> -----Original Message-----
> From: netdev-owner@vger.kernel.org <netdev-owner@vger.kernel.org>
> On Behalf Of David Miller
> Sent: 19-Apr-19 17:41
> To: Tung Quang Nguyen <tung.q.nguyen@dektech.com.au>
> Cc: netdev@vger.kernel.org; tipc-discussion@lists.sourceforge.net
> Subject: Re: [tipc-discussion][net-next v1] tipc: introduce new socket option
> TIPC_SOCK_RECVQ_USED
> 
> From: Tung Nguyen <tung.q.nguyen@dektech.com.au>
> Date: Thu, 18 Apr 2019 21:02:19 +0700
> 
> > When using TIPC_SOCK_RECVQ_DEPTH for getsockopt(), it returns the
> > number of buffers in receive socket buffer which is not so helpful for
> > user space applications.
> >
> > This commit introduces the new option TIPC_SOCK_RECVQ_USED which
> > returns the current allocated bytes of the receive socket buffer.
> > This helps user space applications dimension its buffer usage to avoid
> > buffer overload issue.
> >
> > Signed-off-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
> 
> TIPC folks, please review.

Acked-by: Jon Maloy <jon.maloy@ericsson.com>

It would of course be nicer if we could recycle  TIPC_SOCK_RECV_QUEUE_DEPTH for this purpose, but that would mean altering the current ABI and incur a (probably very low) risk of breaking existing application.
I am not particularly happy with this, but do we have users who claim it would be useful for them.

///jon


  reply	other threads:[~2019-04-19 21:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-18 14:02 [tipc-discussion][net-next v1] tipc: introduce new socket option TIPC_SOCK_RECVQ_USED Tung Nguyen
2019-04-19 21:40 ` David Miller
2019-04-19 21:51   ` Jon Maloy [this message]
2019-04-19 21:59     ` David Miller

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=BL0PR1501MB20037E349F4A0AADD0F292CF9A270@BL0PR1501MB2003.namprd15.prod.outlook.com \
    --to=jon.maloy@ericsson.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=tipc-discussion@lists.sourceforge.net \
    --cc=tung.q.nguyen@dektech.com.au \
    /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).