]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: better skb->sender_cpu and skb->napi_id cohabitation
authorEric Dumazet <edumazet@google.com>
Wed, 11 Oct 2017 09:31:13 +0000 (17:31 +0800)
committerEthan Zhao <ethan.zhao@oracle.com>
Fri, 13 Oct 2017 02:06:29 +0000 (22:06 -0400)
commit639c96315aba15fd372b951c31442b622f4eb3df
treebe0ae296d9045b6db7e7c92e450e7a58fed00f44
parent008dae863de6802b3f6c6a043d8dcce90c671365
net: better skb->sender_cpu and skb->napi_id cohabitation

Orabug: 26953388
Orabug: 26591689

skb->sender_cpu and skb->napi_id share a common storage,
and we had various bugs about this.

We had to call skb_sender_cpu_clear() in some places to
not leave a prior skb->napi_id and fool netdev_pick_tx()

As suggested by Alexei, we could split the space so that
these errors can not happen.

0 value being reserved as the common (not initialized) value,
let's reserve [1 .. NR_CPUS] range for valid sender_cpu,
and [NR_CPUS+1 .. ~0U] for valid napi_id.

This will allow proper busy polling support over tunnels.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Suggested-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
Reviewed-by: Jack Vogel <jack.vogel@oracle.com>
include/linux/skbuff.h
net/core/dev.c
net/core/flow_dissector.c