I. Introduction
In many networking applications, the support of traffic split into multiple possible outputs is required. For example, this is required to partition traffic among multiple paths to a destination or when sending traffic to one of multiple servers. The split has to be deterministic such that all packets of the same flow are mapped to a single output, e.g., to avoid packet reordering within a flow. It is increasingly common to rely on the switches in the network to perform the split [1], [2], and traditional schemes use relatively simple hashing techniques for this task. Equal cost multipath routing (ECMP) [3] implements a split into k options by associating a hash value with each option and mapping a flow according to the hash value of its flow id. While ECMP distributes traffic uniformly among outputs, in many applications non-uniform distributions are required, e.g., when the outputs differ in their available resources. WCMP (Weighted ECMP) [4] is a generalization of ECMP supporting non-uniform output distributions. The possible output values are written to memory entries with repetitions. Then, a flow is randomly hashed into one of the entries, generating a distribution according to the number of appearances of each possible output.