mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Anton Protopopov <aspsk@isovalent.com>
To: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Andrii Nakryiko <andrii@kernel.org>,
	Martin KaFai Lau <martin.lau@linux.dev>,
	Song Liu <song@kernel.org>, Yonghong Song <yhs@fb.com>,
	John Fastabend <john.fastabend@gmail.com>,
	KP Singh <kpsingh@kernel.org>,
	Stanislav Fomichev <sdf@google.com>, Hao Luo <haoluo@google.com>,
	Jiri Olsa <jolsa@kernel.org>, Brian Vazquez <brianvv@google.com>,
	Hou Tao <houtao1@huawei.com>, Joe Stringer <joe@isovalent.com>,
	bpf@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Anton Protopopov <aspsk@isovalent.com>
Subject: [PATCH bpf-next 0/2] fix setting return values for htab batch ops and docs
Date: Mon, 17 Jul 2023 11:43:05 +0000	[thread overview]
Message-ID: <20230717114307.46124-1-aspsk@isovalent.com> (raw)

This is a small follow up to the conversation with Hou in the following
thread:

  https://lore.kernel.org/bpf/20230705160139.19967-1-aspsk@isovalent.com/T/#u

Namely, the conversation was about that comments in <linux/bpf.h>
describing the return values from the batch operations are not 100%
obvious. I tried to make comments more clear. While doing this I also
found that this is better to patch how __htab_map_lookup_and_delete_batch
sets return values: the output parameter count could be set to non-zero in
case of error, which may confuse some userspace apps (as errno && non-zero
counter is considered a partially successful operation for batch ops).

Anton Protopopov (2):
  bpf: fix setting return values for htab batch ops
  bpf: update uapi/linux/bpf.h docs on the batch map ops

 include/uapi/linux/bpf.h | 22 ++++++++++++----------
 kernel/bpf/hashtab.c     | 14 +++++++-------
 2 files changed, 19 insertions(+), 17 deletions(-)

-- 
2.34.1


             reply	other threads:[~2023-07-17 11:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 11:43 Anton Protopopov [this message]
2023-07-17 11:43 ` [PATCH bpf-next 1/2] bpf: fix setting return values for htab batch ops Anton Protopopov
2023-07-19  0:52   ` Alexei Starovoitov
2023-07-19  7:09     ` Anton Protopopov
2023-07-19 16:28       ` Alexei Starovoitov
2023-07-17 11:43 ` [PATCH bpf-next 2/2] bpf: update uapi/linux/bpf.h docs on the batch map ops Anton Protopopov
2023-07-26  9:12   ` Hou Tao

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=20230717114307.46124-1-aspsk@isovalent.com \
    --to=aspsk@isovalent.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brianvv@google.com \
    --cc=daniel@iogearbox.net \
    --cc=haoluo@google.com \
    --cc=houtao1@huawei.com \
    --cc=joe@isovalent.com \
    --cc=john.fastabend@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=kpsingh@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin.lau@linux.dev \
    --cc=sdf@google.com \
    --cc=song@kernel.org \
    --cc=yhs@fb.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

all inboxes | Powered by JetHome®