netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: makita.toshiaki@lab.ntt.co.jp
Cc: eric@regit.org, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, ast@kernel.org,
	daniel@iogearbox.net
Subject: Re: [PATCH net-next] libbpf: add function to setup XDP
Date: Tue, 12 Dec 2017 10:53:50 -0500 (EST)	[thread overview]
Message-ID: <20171212.105350.1862932376620064454.davem@davemloft.net> (raw)
In-Reply-To: <c1be066a-eb39-c9e0-b21b-4bb4da280b26@lab.ntt.co.jp>

From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Date: Mon, 11 Dec 2017 11:24:12 +0900

> On 2017/12/09 23:43, Eric Leblond wrote:
>> Most of the code is taken from set_link_xdp_fd() in bpf_load.c and
>> slightly modified to be library compliant.
>> 
>> Signed-off-by: Eric Leblond <eric@regit.org>
> ...
>> +int bpf_set_link_xdp_fd(int ifindex, int fd, __u32 flags)
> ...
>> +	for (nh = (struct nlmsghdr *)buf; NLMSG_OK(nh, len);
>> +	     nh = NLMSG_NEXT(nh, len)) {
>> +		if (nh->nlmsg_pid != getpid()) {
> 
> Generally nlmsg_pid should not be compared with process id.
> See man netlink and
> https://github.com/iovisor/bcc/pull/1275/commits/69ce96a54c55960c8de3392061254c97b6306a6d

Right.  I wish we had never named this "pid", it gets misinterpreted
way too easily.

      reply	other threads:[~2017-12-12 15:53 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09 14:43 [PATCH net-next] libbpf: add function to setup XDP Eric Leblond
2017-12-09 16:34 ` David Ahern
2017-12-09 17:49   ` Alexei Starovoitov
2017-12-09 23:57 ` Jakub Kicinski
2017-12-10 20:34   ` Eric Leblond
2017-12-10 21:07     ` David Ahern
2017-12-12  2:23       ` Daniel Borkmann
2017-12-11  2:24 ` Toshiaki Makita
2017-12-12 15:53   ` David Miller [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:
  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=20171212.105350.1862932376620064454.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eric@regit.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=makita.toshiaki@lab.ntt.co.jp \
    --cc=netdev@vger.kernel.org \
    /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).