ethernet: move dmac filtering to inline function