Commit 52d8b8a
net: better skb->sender_cpu and skb->napi_id cohabitation
commit 52bd2d62ce6758d811edcbd2256eb9ea7f6a56cb upstream.
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>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 3c0fcb5 commit 52d8b8a
2 files changed
Lines changed: 16 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1084 | 1084 | | |
1085 | 1085 | | |
1086 | 1086 | | |
1087 | | - | |
1088 | | - | |
1089 | | - | |
1090 | 1087 | | |
1091 | 1088 | | |
1092 | 1089 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
3049 | 3049 | | |
3050 | 3050 | | |
3051 | 3051 | | |
3052 | | - | |
| 3052 | + | |
| 3053 | + | |
| 3054 | + | |
3053 | 3055 | | |
3054 | 3056 | | |
3055 | 3057 | | |
| |||
4726 | 4728 | | |
4727 | 4729 | | |
4728 | 4730 | | |
4729 | | - | |
| 4731 | + | |
| 4732 | + | |
4730 | 4733 | | |
4731 | | - | |
| 4734 | + | |
4732 | 4735 | | |
4733 | | - | |
4734 | | - | |
4735 | | - | |
4736 | | - | |
4737 | | - | |
4738 | | - | |
4739 | | - | |
4740 | | - | |
4741 | | - | |
| 4736 | + | |
| 4737 | + | |
| 4738 | + | |
| 4739 | + | |
| 4740 | + | |
| 4741 | + | |
4742 | 4742 | | |
4743 | | - | |
4744 | | - | |
| 4743 | + | |
| 4744 | + | |
4745 | 4745 | | |
4746 | | - | |
4747 | | - | |
| 4746 | + | |
4748 | 4747 | | |
4749 | 4748 | | |
4750 | 4749 | | |
| |||
0 commit comments