[PATCH] ethdev: add calculate hash function
Dariusz Sosnowski
dsosnowski at nvidia.com
Mon Oct 9 10:15:12 CEST 2023
Hi,
> -----Original Message-----
> From: Ori Kam <orika at nvidia.com>
> Sent: Tuesday, September 26, 2023 13:38
> To: cristian.dumitrescu at intel.com; Aman Singh
> <aman.deep.singh at intel.com>; Yuying Zhang <yuying.zhang at intel.com>;
> NBU-Contact-Thomas Monjalon (EXTERNAL) <thomas at monjalon.net>;
> Ferruh Yigit <ferruh.yigit at amd.com>; Andrew Rybchenko
> <andrew.rybchenko at oktetlabs.ru>
> Cc: dev at dpdk.org; Ori Kam <orika at nvidia.com>; Raslan Darawsheh
> <rasland at nvidia.com>
> Subject: [PATCH] ethdev: add calculate hash function
>
> External email: Use caution opening links or attachments
>
>
> rte_flow supports insert by index table[1].
>
> Using the above table, the application can create rules that are based on hash.
> For example application can create the following logic in order to create load
> balancing:
> 1. Create insert by index table with 2 rules, that hashes based on dmac 2.
> Insert to index 0 a rule that sends the traffic to port A.
> 3. Insert to index 1 a rule that sends the traffic to port B.
>
> Let's also assume that before this table, there is a 5 tuple match table that
> jumps to the above table.
>
> So each packet that matches one of the 5 tuple rules is RSSed to port A or B,
> based on dmac hash.
>
> The issue arises when there is a miss on the 5 tuple table, which resulted due
> to the packet being the first packet of this flow, or fragmented packet or any
> other reason.
> In this case, the application must calculate what would be the hash calculated
> by the HW so it can send the packet to the correct port.
>
> This new API allows applications to calculate the hash value of a given packet
> for a given table.
>
> [1] -
> http://patches.dpdk.org/project/dpdk/patch/20230208030624.78465-2-
> akozyrev at nvidia.com/
>
> Signed-off-by: Ori Kam <orika at nvidia.com>
Acked-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
Thanks,
Dariusz Sosnowski
More information about the dev
mailing list