app/testpmd: fix build with musl
authorNatanael Copa <ncopa@alpinelinux.org>
Thu, 5 Nov 2020 21:17:09 +0000 (22:17 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 23 Mar 2021 07:41:05 +0000 (08:41 +0100)
commit3529e8f3a5e62919c6528457c68f0c5c26cfdada
tree0da4328ba7e579316fae3f90d57adcc75f19a2ac
parent29420808d05b4e17a52f860bc4d507d689a95efc
app/testpmd: fix build with musl

1/ Improve portability by avoiding use of non-standard 'uint'.
Use uint8_t for hash_key_len as rss_key_len is a uint8_t type.
This solves following build error when building with musl libc:
    app/test-pmd/testpmd.h:813:29: error: unknown type name 'uint'

2/ In musl libc, stdout is of type (FILE * const).
Because of the const qualifier, a dark magic cast
must be achieved through uintptr_t.

Fixes: 8205e241b2b0 ("app/testpmd: add missing type to RSS hash commands")
Fixes: e977e4199a8d ("app/testpmd: add commands to load/unload BPF filters")
Cc: stable@dpdk.org
Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
Reviewed-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: David Marchand <david.marchand@redhat.com>
app/test-pmd/bpf_cmd.c
app/test-pmd/config.c
app/test-pmd/testpmd.h