ethdev: replace bit shifts with macros