[PATCH] net/mlx5: fix indirect RSS action hash fields calculation
    Raslan Darawsheh 
    rasland at nvidia.com
       
    Sun Nov  2 11:27:43 CET 2025
    
    
  
Hi,
On 30/10/2025 7:24 PM, Dariusz Sosnowski wrote:
> Whenever indirect RSS flow action is created,
> mlx5 PMD creates an hrxq object (abstraction over HW object
> used to configure RSS hashing),
> for all possible and supported protocols combinations.
> For each combination, the hrxq configuration is adjusted
> based on RSS hash types provided by the user
> (e.g. hash on source L3 address is removed if user passed
> RTE_ETH_RSS_L3_SRC_ONLY in hash types).
> 
> Function used for adjustment, flow_dv_action_rss_l34_hash_adjust(),
> had a bug. If user requested, for example, hashing over both UDP ports
> and only IPv6 source address, then RSS hashing was configured
> to hash both IPv6 addresses. Adjustment for RTE_ETH_RSS_L3_SRC_ONLY
> was skipped.
> 
> In HW Steering mode, this resulted in failures to use such indirect
> RSS flow action in flow rules created through template flow API.
> In this mode, only a single hrxq object is selected during flow rule
> creation, based on actual configuration of RSS hash types
> in flow action.
> Since hrxq was created without applying RTE_ETH_RSS_L3_SRC_ONLY
> adjustment and RSS hash types contained RTE_ETH_RSS_L3_SRC_ONLY,
> then no matching hrxq could be found, resulting in rule creation failure.
> 
> This issue is addressed by the following:
> 
> - Missing adjustments are added to flow_dv_action_rss_l34_hash_adjust()
>    function.
>    This function is reworked to check each protocol type separately,
>    instead of using switch case over all combinations.
> - Code for setting/looking up hrxq objects based on RSS hash types
>    is reworked. Separate switch cases for possible combinations in each
>    function are replaced with a single one.
>    Additional logging and assertions are added to flag any invalid
>    or missing combinations.
> 
> Beside that, the existing set of protocols combinations set
> did not cover RSS hashing only over UDP or TCP ports,
> which is a valid configuration.
> These combinations are added in this patch
> (new elements in mlx5_rss_hash_fields array).
> 
> Fixes: 212d17b6a650 ("net/mlx5: fix missing shared RSS hash types")
> Cc: jackmin at nvidia.com
> Cc: stable at dpdk.org
> 
> Signed-off-by: Dariusz Sosnowski <dsosnowski at nvidia.com>
> Acked-by: Bing Zhao <bingz at nvidia.com>
Patch applied to next-net-mlx,
Kindest regards
Raslan Darawsheh
    
    
More information about the stable
mailing list