Subject: Re: [PATCH net-next] bpf, skb_do_redirect: clear sender_cpu before xmit

From: Alexei Starovoitov <[email-masked]>
Date: Fri, 9 Oct 2015 20:11:51 -0700

On 10/9/15 9:40 AM, Devon H. O'Dell wrote:
> I like the idea, but it seems unnecessarily magical. What about using
> a bitfield? Then there's just an option bit that is either
> OPTION_NAPI_ID or OPTION_SENDER_CPU. Then the check to set sender_cpu
> in netdev_pick_tx becomes
>
>      if (skb->sender_napi_option == OPTION_NAPI_ID || skb->sender_cpu == 0) ..

It's less magical, but slower since two loads from skb and two cmp/jmp
are needed instead of one.
and this is critical path of xmit executed for every skb.
that's why I proposed a sign.