examples/multi_process: check server port validity
authorStephen Hemminger <sthemmin@microsoft.com>
Mon, 5 Aug 2019 16:38:16 +0000 (09:38 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 25 Nov 2019 22:51:55 +0000 (23:51 +0100)
commit1f41d98c207aee8982ced709864c96c463d4503a
tree98da4257206d05b79dc0beafaf74fdd0cb5d4238
parent1b32cc619b617dd356afffbf347569409db037ef
examples/multi_process: check server port validity

The mp_server incorrectly allows a port mask that included hidden
ports and which later caused either lost packets or failed initialization.

This fixes explicitly checking that each bit in portmask is a
valid port before using it.

Fixes: 5b7ba31148a8 ("ethdev: add port ownership")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
Acked-by: Matan Azrad <matan@mellanox.com>
examples/multi_process/client_server_mp/mp_server/args.c
examples/multi_process/client_server_mp/mp_server/args.h
examples/multi_process/client_server_mp/mp_server/init.c