[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f6bdacf6-7a8c-226f-5a22-f14bebac356b@fb.com>
Date: Wed, 16 Aug 2017 22:42:12 -0700
From: Alexei Starovoitov <ast@...com>
To: John Fastabend <john.fastabend@...il.com>, <davem@...emloft.net>,
<daniel@...earbox.net>
CC: <tgraf@...g.ch>, <netdev@...r.kernel.org>, <tom@...bertland.com>
Subject: Re: [net-next PATCH 07/10] bpf: add access to sock fields and pkt
data from sk_skb programs
On 8/15/17 10:33 PM, John Fastabend wrote:
> +static int sk_skb_prologue(struct bpf_insn *insn_buf, bool direct_write,
> + const struct bpf_prog *prog)
> +{
> + struct bpf_insn *insn = insn_buf;
> +
> + if (!direct_write)
> + return 0;
> +
> + /* if (!skb->cloned)
> + * goto start;
> + *
> + * (Fast-path, otherwise approximation that we might be
> + * a clone, do the rest in helper.)
> + */
iirc we're doing something similar in other prologue generator?
can be consolidated?
Powered by blists - more mailing lists