netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Borkmann <daniel@iogearbox.net>
To: Alexei Starovoitov <ast@plumgrid.com>,
	"David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next] bpf: allow BPF programs access skb->skb_iif and skb->dev->ifindex fields
Date: Thu, 28 May 2015 21:22:34 +0200	[thread overview]
Message-ID: <55676AFA.2030403@iogearbox.net> (raw)
In-Reply-To: <1432765839-7709-1-git-send-email-ast@plumgrid.com>

On 05/28/2015 12:30 AM, Alexei Starovoitov wrote:
> classic BPF already exposes skb->dev->ifindex via SKF_AD_IFINDEX extension.
> Allow eBPF program to access it as well. Note that classic aborts execution
> of the program if 'skb->dev == NULL' (which is inconvenient for program
> writers), whereas eBPF returns zero in such case.

That's better, yep.

> Also expose the 'skb_iif' field, since programs triggered by redirected
> packet need to known the original interface index.
> Summary:
> __skb->ifindex         -> skb->dev->ifindex
> __skb->ingress_ifindex -> skb->skb_iif
>
> Signed-off-by: Alexei Starovoitov <ast@plumgrid.com>

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

  reply	other threads:[~2015-05-28 19:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-27 22:30 [PATCH net-next] bpf: allow BPF programs access skb->skb_iif and skb->dev->ifindex fields Alexei Starovoitov
2015-05-28 19:22 ` Daniel Borkmann [this message]
2015-05-29  3:40   ` Alexei Starovoitov
2015-05-29  3:43     ` David Miller
2015-05-29  8:44       ` Daniel Borkmann
2015-05-31  0:51 ` 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=55676AFA.2030403@iogearbox.net \
    --to=daniel@iogearbox.net \
    --cc=ast@plumgrid.com \
    --cc=davem@davemloft.net \
    --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).