bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sami Tolvanen <samitolvanen@google.com>
To: "David S. Miller" <davem@davemloft.net>,
	Tom Herbert <tom@herbertland.com>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org,
	Sami Tolvanen <samitolvanen@google.com>
Subject: [PATCH] kcm: use BPF_PROG_RUN
Date: Thu,  5 Sep 2019 14:15:28 -0700	[thread overview]
Message-ID: <20190905211528.97828-1-samitolvanen@google.com> (raw)

Instead of invoking struct bpf_prog::bpf_func directly, use the

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
 net/kcm/kcmsock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/kcm/kcmsock.c b/net/kcm/kcmsock.c
index 5dbc0c48f8cb..f350c613bd7d 100644
--- a/net/kcm/kcmsock.c
+++ b/net/kcm/kcmsock.c
@@ -379,7 +379,7 @@ static int kcm_parse_func_strparser(struct strparser *strp, struct sk_buff *skb)
 	struct kcm_psock *psock = container_of(strp, struct kcm_psock, strp);
 	struct bpf_prog *prog = psock->bpf_prog;
-	return (*prog->bpf_func)(skb, prog->insnsi);
+	return BPF_PROG_RUN(prog, skb);
 static int kcm_read_sock_done(struct strparser *strp, int err)

             reply	other threads:[~2019-09-05 21:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 21:15 Sami Tolvanen [this message]
2019-09-06  0:07 ` [PATCH] kcm: use BPF_PROG_RUN Yonghong Song
2019-09-06 17:06   ` Alexei Starovoitov
2019-09-23 21:31     ` Eric Dumazet
2019-09-24 18:59       ` Daniel Borkmann
2019-09-24 19:17         ` 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:

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

  git send-email \
    --in-reply-to=20190905211528.97828-1-samitolvanen@google.com \
    --to=samitolvanen@google.com \
    --cc=bpf@vger.kernel.org \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=tom@herbertland.com \


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