]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/bpf: bring back (void *) cast to set_ipv4_csum in test_tc_tunnel
authorStanislav Fomichev <sdf@google.com>
Thu, 11 Apr 2019 22:53:16 +0000 (15:53 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Tue, 16 Apr 2019 07:51:48 +0000 (09:51 +0200)
commit205469fae1b92c298c78cc8284884b3f92377ab1
tree0997fe87eaf8225cf182bd12dd0f3ef270d7102a
parent43cf8d14afa373019b8024428ccd851614163a41
selftests/bpf: bring back (void *) cast to set_ipv4_csum in test_tc_tunnel

It was removed in commit af21fde0bbb1 ("selftests_bpf: extend
test_tc_tunnel for UDP encap") without any explanation.

Otherwise I see:
progs/test_tc_tunnel.c:160:17: warning: taking address of packed member 'ip' of class or structure
      'v4hdr' may result in an unaligned pointer value [-Waddress-of-packed-member]
        set_ipv4_csum(&h_outer.ip);
                       ^~~~~~~~~~
1 warning generated.

Cc: Alan Maguire <alan.maguire@oracle.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Fixes: af21fde0bbb1 ("selftests_bpf: extend test_tc_tunnel for UDP encap")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Song Liu <songliubraving@fb.com>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
tools/testing/selftests/bpf/progs/test_tc_tunnel.c