Subject: Re: [RFC 05/12] nfp: add BPF to NFP code translator

From: John Fastabend <[email-masked]>
Date: Wed, 1 Jun 2016 13:09:17 -0700

On 16-06-01 01:03 PM, Daniel Borkmann wrote:
> On 06/01/2016 06:50 PM, Jakub Kicinski wrote:
>> Add translator for JITing eBPF to operations which
>> can be executed on NFP's programmable engines.
>>
>> Signed-off-by: Jakub Kicinski <[email-masked]>
>> Reviewed-by: Dinan Gunawardena <[email-masked]>
>> Reviewed-by: Simon Horman <[email-masked]>
> [...]
>> +int
>> +nfp_bpf_jit(struct bpf_prog *filter, void *prog_mem, unsigned int
>> prog_start,
>> +        unsigned int tgt_out, unsigned int tgt_abort,
>> +        unsigned int prog_sz, struct nfp_bpf_result *res)
>> +{
>> +    struct nfp_prog *nfp_prog;
>> +    int ret;
>> +
>> +    /* TODO: maybe make this dependent on bpf_jit_enable? */
> 
> Probably makes sense to leave it independent from this.

Agreed we have an ethtool flag for the other offloads I think this
should just follow the same semantics and get offloaded if the flag
is set.

> 
> Maybe that would rather be an ethtool flag/setting?
> 

I would think using the same flag as we did for u32 and flower
should be fine.