app/testpmd: fix crash when port id out of bound