To get beyond 2 million packets/second, you need an Intel 10-gbps Ethernet adapter and a special driver known as "PF_RING DNA" from http://www.ntop.org/products/pf_ring/. Masscan doesn't need to be rebuilt in order to use PF_RING.
The updated ebuils is in Pentoo overlay:
+ pf_ring? ( sys-kernel/pf_ring-kmod )"