All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Xhonneux <m.xhonneux@gmail.com>
To: David Lebrun <dav.lebrun@gmail.com>
Cc: Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	netdev@vger.kernel.org, David Lebrun <dlebrun@google.com>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [PATCH net-next RFC 0/5] ipv6: sr: introduce seg6local End.BPF action
Date: Wed, 4 Apr 2018 11:34:07 +0200	[thread overview]
Message-ID: <CAKSCvkTkN=bTu2NEDE=Sm=tq6fycVbw1SPHvhLyL0YrufeRj2Q@mail.gmail.com> (raw)
In-Reply-To: <c4e374e8-d385-1f86-cafe-85d983f6c45e@gmail.com>

2018-04-03 16:25 GMT+02:00 David Lebrun <dav.lebrun@gmail.com>:
> Actually I'm wrong here. dst_input() will call either ip6_input() or
> ip6_forward(), not ipv6_rcv(). Both functions expect IP6CB() to be set,
> so using skb->cb here will interfere with them.
>
> What about saving and restoring the IPv6 CB, similarly to what TCP does with
> tcp_v6_restore_cb() ?


Yes. I can change the call to bpf_prog_run_save_cb to bpf_prog_run_clear_cb,
and then manually save/restore the IPv6 CB in input_action_end_bpf.

Or is there maybe a better solution to share some state between the bpf caller
and helpers, that does not need access to skb->cb ?

  parent reply	other threads:[~2018-04-04  9:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-23 10:15 [PATCH net-next RFC 0/5] ipv6: sr: introduce seg6local End.BPF action Mathieu Xhonneux
2018-03-23 10:16 ` [PATCH net-next RFC 1/5] ipv6: sr: export function lookup_nexthop Mathieu Xhonneux
2018-03-23 10:16 ` [PATCH next-next RFC 2/5] bpf: Add IPv6 Segment Routing helpers Mathieu Xhonneux
2018-03-23 10:16 ` [PATCH net-next RFC 3/5] bpf: Split lwt inout verifier structures Mathieu Xhonneux
2018-03-23 10:16 ` [PATCH net-next RFC 4/5] ipv6: sr: Add seg6local action End.BPF Mathieu Xhonneux
2018-03-23 10:16 ` [PATCH net-next RFC 5/5] selftests/bpf: test for seg6local End.BPF action Mathieu Xhonneux
2018-03-30 23:03 ` [PATCH net-next RFC 0/5] ipv6: sr: introduce " Alexei Starovoitov
2018-04-03 11:16   ` Mathieu Xhonneux
2018-04-03 13:40     ` David Lebrun
2018-04-03 14:25       ` David Lebrun
2018-04-03 14:51         ` Eric Dumazet
2018-04-04  9:34         ` Mathieu Xhonneux [this message]
2018-04-05  5:10 Alexei Starovoitov

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='CAKSCvkTkN=bTu2NEDE=Sm=tq6fycVbw1SPHvhLyL0YrufeRj2Q@mail.gmail.com' \
    --to=m.xhonneux@gmail.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=dav.lebrun@gmail.com \
    --cc=dlebrun@google.com \
    --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 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.