sw test tool: Add support for using user-specified port_num

Signed-off-by: Minoru TAKAHASHI <takahashi.minoru7@gmail.com>