bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Yakunin <zeil@yandex-team.ru>
To: Martin KaFai Lau <kafai@fb.com>
Cc: "davem@davemloft.net" <davem@davemloft.net>,
	"brakmo@fb.com" <brakmo@fb.com>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH bpf-next] bpf: add SO_KEEPALIVE and related options to bpf_setsockopt
Date: Wed, 27 May 2020 23:44:48 +0300	[thread overview]
Message-ID: <80511590611840@mail.yandex-team.ru> (raw)
In-Reply-To: <20200527170221.iutwmch6sim35bkt@kafai-mbp>

27.05.2020, 20:03, "Martin KaFai Lau" <kafai@fb.com>:
> On Wed, May 27, 2020 at 06:05:43PM +0300, Dmitry Yakunin wrote:
>>  This patch adds support of SO_KEEPALIVE flag and TCP related options
>>  to bpf_setsockopt() routine. This is helpful if we want to enable or tune
>>  TCP keepalive for applications which don't do it in the userspace code.
>>  In order to avoid copy-paste, common code from classic setsockopt was moved
>>  to auxiliary functions in the headers.
> Thanks for refatoring some of the pieces. I suspect some more can be done.
> In the long run, I don't think this copy-and-paste is scalable.
> For most of the options (integer value and do not need ns_capable()),
> do_tcp_setsockopt() and sock_setsockopt() can be directly called with
> some refactoring.
> The change looks good. For this patch,
> Acked-by: Martin KaFai Lau <kafai@fb.com>

Thanks for your comment, Martin.
I agree with you, bpf_setsockopt and older setsockopts should be refactored to use common code.
I'll keep this in mind if i want to add new options.

      reply	other threads:[~2020-05-27 20:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 15:05 [PATCH bpf-next] bpf: add SO_KEEPALIVE and related options to bpf_setsockopt Dmitry Yakunin
2020-05-27 16:42 ` Eric Dumazet
2020-05-27 20:17   ` Dmitry Yakunin
2020-05-29 12:41   ` David Laight
2020-05-27 17:02 ` Martin KaFai Lau
2020-05-27 20:44   ` Dmitry Yakunin [this message]

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80511590611840@mail.yandex-team.ru \
    --to=zeil@yandex-team.ru \
    --cc=bpf@vger.kernel.org \
    --cc=brakmo@fb.com \
    --cc=davem@davemloft.net \
    --cc=kafai@fb.com \
    --cc=netdev@vger.kernel.org \


* 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).