On Tue, 14 Feb 2017 22:08:10 +
Edward Cree wrote:
> To me, the sensible interface (which makes the batching explicit to
> the driver, which I think is necessary) is to have an int (or maybe
> unsigned int, which is the return type of xdp_hookfn, I'm not sure
> which is intended) member in
On Tue, Feb 14, 2017 at 2:08 PM, Edward Cree wrote:
> On 14/02/17 21:07, Tom Herbert wrote:
>> Off the top of my head... I'd say may we might be able to have a
>> minimally invasive interface with something like:
>>
>> XDP_RUN(hook, xdp, drv_xdp_handle_action)
>>
>> This replaces xdp_run and retur
On 14/02/17 21:07, Tom Herbert wrote:
> Off the top of my head... I'd say may we might be able to have a
> minimally invasive interface with something like:
>
> XDP_RUN(hook, xdp, drv_xdp_handle_action)
>
> This replaces xdp_run and return codes are processed in the called
> functions. Its a macr
On Tue, Feb 14, 2017 at 12:47 PM, Tom Herbert wrote:
> On Tue, Feb 14, 2017 at 12:31 PM, Jesper Dangaard Brouer
> wrote:
>> On Wed, 8 Feb 2017 15:41:20 -0800
>> Tom Herbert wrote:
>>
>>> +static inline int __xdp_run_one_hook(struct xdp_hook *hook,
>>> + struct xd
On Tue, Feb 14, 2017 at 12:31 PM, Jesper Dangaard Brouer
wrote:
> On Wed, 8 Feb 2017 15:41:20 -0800
> Tom Herbert wrote:
>
>> +static inline int __xdp_run_one_hook(struct xdp_hook *hook,
>> + struct xdp_buff *xdp)
>> +{
>> + void *priv = rcu_dereference(hook->
On Wed, 8 Feb 2017 15:41:20 -0800
Tom Herbert wrote:
> +static inline int __xdp_run_one_hook(struct xdp_hook *hook,
> + struct xdp_buff *xdp)
> +{
> + void *priv = rcu_dereference(hook->priv);
> +
> + if (hook->is_bpf) {
> + /* Run BPF programs
From: Tom Herbert
Date: Thu, 9 Feb 2017 20:55:34 -0800
> On Thu, Feb 9, 2017 at 7:33 PM, David Miller wrote:
>> From: Tom Herbert
>> Date: Thu, 9 Feb 2017 18:29:54 -0800
>>
>>> So we have thousands or LOC coming into drivers every day anyway with
>>> all those properties anyway, so this "restri
On 2017年02月10日 10:30, Tom Herbert wrote:
On Thu, Feb 9, 2017 at 5:48 PM, David Miller wrote:
From: Tom Herbert
Date: Thu, 9 Feb 2017 15:08:22 -0800
Okay, how about this... I'll add a configuration option like
XDP_ALLOW_OTHER_HOOKS. The default will be to disallow setting any
hook other tha
On Thu, Feb 9, 2017 at 7:33 PM, David Miller wrote:
> From: Tom Herbert
> Date: Thu, 9 Feb 2017 18:29:54 -0800
>
>> So we have thousands or LOC coming into drivers every day anyway with
>> all those properties anyway, so this "restricted" environment solves
>> at best 1% of the problem.
>
> What
From: Tom Herbert
Date: Thu, 9 Feb 2017 15:08:22 -0800
> Okay, how about this... I'll add a configuration option like
> XDP_ALLOW_OTHER_HOOKS. The default will be to disallow setting any
> hook other than a BPF. If it is set, then we'll accept other hooks
> to be run. This way mostly restrict the
From: Tom Herbert
Date: Thu, 9 Feb 2017 18:29:54 -0800
> So we have thousands or LOC coming into drivers every day anyway with
> all those properties anyway, so this "restricted" environment solves
> at best 1% of the problem.
What you must understand is that no matter what someone outside of
up
From: Tom Herbert
Date: Thu, 9 Feb 2017 14:45:04 -0800
> On Thu, Feb 9, 2017 at 2:34 PM, David Miller wrote:
>> From: Tom Herbert
>> Date: Thu, 9 Feb 2017 14:26:50 -0800
>>
>>> On Thu, Feb 9, 2017 at 2:17 PM, David Miller wrote:
From: Tom Herbert
Date: Wed, 8 Feb 2017 15:41:20 -0800
On Thu, Feb 9, 2017 at 5:48 PM, David Miller wrote:
> From: Tom Herbert
> Date: Thu, 9 Feb 2017 15:08:22 -0800
>
>> Okay, how about this... I'll add a configuration option like
>> XDP_ALLOW_OTHER_HOOKS. The default will be to disallow setting any
>> hook other than a BPF. If it is set, then we'll
On Thu, Feb 9, 2017 at 5:42 PM, David Miller wrote:
> From: Tom Herbert
> Date: Thu, 9 Feb 2017 14:45:04 -0800
>
>> On Thu, Feb 9, 2017 at 2:34 PM, David Miller wrote:
>>> From: Tom Herbert
>>> Date: Thu, 9 Feb 2017 14:26:50 -0800
>>>
On Thu, Feb 9, 2017 at 2:17 PM, David Miller wrote:
>>
On Thu, Feb 9, 2017 at 2:34 PM, David Miller wrote:
> From: Tom Herbert
> Date: Thu, 9 Feb 2017 14:26:50 -0800
>
>> On Thu, Feb 9, 2017 at 2:17 PM, David Miller wrote:
>>> From: Tom Herbert
>>> Date: Wed, 8 Feb 2017 15:41:20 -0800
>>>
These hooks are also generic to allow for XDP/BPF progr
On Thu, Feb 9, 2017 at 2:34 PM, David Miller wrote:
> From: Tom Herbert
> Date: Thu, 9 Feb 2017 14:26:50 -0800
>
>> On Thu, Feb 9, 2017 at 2:17 PM, David Miller wrote:
>>> From: Tom Herbert
>>> Date: Wed, 8 Feb 2017 15:41:20 -0800
>>>
These hooks are also generic to allow for XDP/BPF progr
From: Tom Herbert
Date: Thu, 9 Feb 2017 14:26:50 -0800
> On Thu, Feb 9, 2017 at 2:17 PM, David Miller wrote:
>> From: Tom Herbert
>> Date: Wed, 8 Feb 2017 15:41:20 -0800
>>
>>> These hooks are also generic to allow for XDP/BPF programs as well
>>> as non-BPF code (e.g. kernel code can be writte
On Thu, Feb 9, 2017 at 2:17 PM, David Miller wrote:
> From: Tom Herbert
> Date: Wed, 8 Feb 2017 15:41:20 -0800
>
>> These hooks are also generic to allow for XDP/BPF programs as well
>> as non-BPF code (e.g. kernel code can be written in a module).
>
> I don't think we should even remotely consid
From: Tom Herbert
Date: Wed, 8 Feb 2017 15:41:20 -0800
> These hooks are also generic to allow for XDP/BPF programs as well
> as non-BPF code (e.g. kernel code can be written in a module).
I don't think we should even remotely consider surrendering the XDP
hook to module code.
We restrict it to
> + * Fields:
> + *
> + * priority - priority for insertion into set. The set is ordered lowest to
> + * highest priority.
> + * is_bpf - indicates that the hook is a BPF program (priv refers to a
> + * bpf_prog structure. This allows calling the BPF program directly
> + * from xdp_run wi
Thu, Feb 09, 2017 at 12:41:20AM CET, t...@herbertland.com wrote:
>This patch creates an infrastructure for registering and running code at
>XDP hooks in drivers. This extends and generalizes the original XDP/BPF
>interface. Specifically, it defines a generic xdp_hook structure and a
>set of hooks t
This patch creates an infrastructure for registering and running code at
XDP hooks in drivers. This extends and generalizes the original XDP/BPF
interface. Specifically, it defines a generic xdp_hook structure and a
set of hooks that can be assigned to devices or napi instances. These
hooks are al
22 matches
Mail list logo