All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexei Starovoitov <ast@fb.com>
To: "Wangnan (F)" <wangnan0@huawei.com>,
	"David S . Miller" <davem@davemloft.net>
Cc: Daniel Borkmann <daniel@iogearbox.net>,
	Martin KaFai Lau <kafai@fb.com>, <netdev@vger.kernel.org>,
	<kernel-team@fb.com>
Subject: Re: [PATCH v2 net-next 3/6] tools/lib/bpf: expose bpf_program__set_type()
Date: Fri, 31 Mar 2017 16:28:51 -0700	[thread overview]
Message-ID: <6ae6a0af-6b25-0c9d-9230-2d52e7203e6c@fb.com> (raw)
In-Reply-To: <61323557-be03-6e4a-8b02-a20c63d10b20@huawei.com>

On 3/31/17 12:49 AM, Wangnan (F) wrote:
> Hi Alexei,
>
> Please see the patch I sent. Since we export bpf_program__set_type(),
> bpf_program__set_xxx() should be built based on it.

Replied to your patch. I still think simply adding
#include <linux/bpf.h> here like I did in this patch is much cleaner.
That's the whole purpose of uapi header to be used in such libraries
and apps. Copy-pasting enum bpf_prog_type from bpf.h into bunch of
macros in libbpf.h just doesn't look right and likely an indication
that whatever you do with your proprietary stuff is fragile.
Clearly you're trying to avoid including bpf.h not because of perf,
which has its own copy of bpf.h in tools/include/
Just like iproute2 has its copy of bpf.h as well.

  reply	other threads:[~2017-03-31 23:29 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31  4:45 [PATCH v2 net-next 0/6] bpf: program testing framework Alexei Starovoitov
2017-03-31  4:45 ` [PATCH v2 net-next 1/6] bpf: introduce BPF_PROG_TEST_RUN command Alexei Starovoitov
2017-04-01  7:14   ` Jesper Dangaard Brouer
2017-04-01 15:45     ` Alexei Starovoitov
2017-04-01 20:42       ` Jesper Dangaard Brouer
2017-03-31  4:45 ` [PATCH v2 net-next 2/6] tools/lib/bpf: add support for " Alexei Starovoitov
2017-03-31  6:36   ` Wangnan (F)
2017-03-31  4:45 ` [PATCH v2 net-next 3/6] tools/lib/bpf: expose bpf_program__set_type() Alexei Starovoitov
2017-03-31  7:49   ` Wangnan (F)
2017-03-31 23:28     ` Alexei Starovoitov [this message]
2017-04-01  2:29   ` Wangnan (F)
2017-04-01  3:18     ` Alexei Starovoitov
2017-04-01  5:32       ` Wangnan (F)
2017-04-01  5:46         ` Alexei Starovoitov
2017-03-31  4:45 ` [PATCH v2 net-next 4/6] selftests/bpf: add a test for overlapping packet range checks Alexei Starovoitov
2017-03-31  4:45 ` [PATCH v2 net-next 5/6] selftests/bpf: add a test for basic XDP functionality Alexei Starovoitov
2017-03-31  4:45 ` [PATCH v2 net-next 6/6] selftests/bpf: add l4 load balancer test based on sched_cls Alexei Starovoitov
2017-04-01 20:05 ` [PATCH v2 net-next 0/6] bpf: program testing framework 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=6ae6a0af-6b25-0c9d-9230-2d52e7203e6c@fb.com \
    --to=ast@fb.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kafai@fb.com \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    --cc=wangnan0@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.