]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: BPF: Use unsigned access for unsigned SKB fields.
authorDavid Daney <david.daney@cavium.com>
Tue, 14 Mar 2017 21:21:42 +0000 (14:21 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 10 Apr 2017 09:56:05 +0000 (11:56 +0200)
commitab37e23aff741585f19644f1c29d07e80fcc3d71
tree9bf9fe780c82a4a1c7ffe69dd8ddf9f1cc69c7d9
parent338bf2f32825149ff3927efbb7200ba07abbb545
MIPS: BPF: Use unsigned access for unsigned SKB fields.

The SKB vlan_tci and queue_mapping fields are unsigned, don't sign
extend these in the BPF JIT.  In the vlan_tci case, the value gets
masked so the change is not needed for correctness, but do it anyway
for agreement with the types defined in struct sk_buff.

Signed-off-by: David Daney <david.daney@cavium.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Steven J. Hill <steven.hill@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15746/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/net/bpf_jit.c