1. A network device comprising: an input port configured to receive a plurality of network packets including a first set of packets and a second set of packets, at least a portion of each packet of the first and second sets of packets including a same first value in a header of the each packet; a plurality of output ports coupled to a plurality of network hardware elements outside of the network device; and processing logic configured to: receive the first set of packets from the input port; determine that a number of input packets in the first set of packets is less than or equal to a set number; perform a first hash operation using the first value to identify a first output port from the plurality of output ports for the first set of packets; send, through the first output port, the first set of packets to a first one of the network hardware elements; receive the second set of packets from the input port; determine that a number of input packets that have been processed using the first hash operation is equal to the set number; perform a second hash operation using the first value to identify a second output port from the plurality of output ports for the second set of packets, wherein the second output port is distinct from the first output port; and send, through the second output port, the second set of packets to a second one of the network hardware elements.