ethdev: add sanity checks to functions