On 2/13/2024 2:16 PM, Ori Kam wrote:
> During encapsulation of a packet, it is possible to change some
> outer headers to improve flow destribution.
> For example, from VXLAN RFC:
> "It is recommended that the UDP source port number
> be calculated using a hash of fields from the inner packet --
> one example being a hash of the inner Ethernet frame's headers.
> This is to enable a level of entropy for the ECMP/load-balancing"
> 
> The tunnel protocol defines which outer field should hold this hash,
> but it doesn't define the hash calculation algorithm.
> 
> An application that uses flow offloads gets the first few packets
> (exception path) and then decides to offload the flow.
> As a result, there are two
> different paths that a packet from a given flow may take.
> SW for the first few packets or HW for the rest.
> When the packet goes through the SW, the SW encapsulates the packet
> and must use the same hash calculation as the HW will do for
> the rest of the packets in this flow.
> 
> the new function rte_flow_calc_encap_hash can query the hash value
> from the driver for a given packet as if the packet was passed
> through the HW.
> 
> Signed-off-by: Ori Kam <or...@nvidia.com>
> Acked-by: Dariusz Sosnowski <dsosnow...@nvidia.com>
>

Acked-by: Ferruh Yigit <ferruh.yi...@amd.com>

Reply via email to