ethdev: introduce valid port helper