From patchwork Sat Jun 26 07:44:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saeed Mahameed X-Patchwork-Id: 467741 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC7BEC49EA5 for ; Sat, 26 Jun 2021 07:44:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D171E61919 for ; Sat, 26 Jun 2021 07:44:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229938AbhFZHq7 (ORCPT ); Sat, 26 Jun 2021 03:46:59 -0400 Received: from mail.kernel.org ([198.145.29.99]:35510 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229573AbhFZHq6 (ORCPT ); Sat, 26 Jun 2021 03:46:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 77BAE6191B; Sat, 26 Jun 2021 07:44:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624693476; bh=jl1UUjuhXl4tOZRB/hIgvnMjn3w5fXZgkA50QukbUp0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=thoMBcs8dGTRDrglntdKkkDx19KxtJro43MoHhySb7TU2bQ8LnnGBci2ORJ3xlq2a CbkTnkT6UrVc74HtjLLey0G6xHGPyQe27DNm6JWCPNWkLiT3tprcPxWGoFX0hQbs3U zzm0NJZAvoq3ArZA4KKg5TzgCgvvFE89QqBMK8HwhICVY1WA0jT8gKOadh0jPjE4IU YNelAoiTB8LGao5TmuWL+HQIp2RJ8BIMbH2i4sjyCzBk9hAawzH2lM/R1qL4/bFHUh /brq1QhGVhbY+po0BKsXoL+M4r2GGdHpmGJSkvY8LL+hkTqD36mecyuYYFm1ujJNVX PFhlN41pRSXcA== From: Saeed Mahameed To: "David S. Miller" , Jakub Kicinski Cc: netdev@vger.kernel.org, Yevgeny Kliteynik , Saeed Mahameed Subject: [net-next 1/6] net/mlx5: Compare sampler flow destination ID in fs_core Date: Sat, 26 Jun 2021 00:44:12 -0700 Message-Id: <20210626074417.714833-2-saeed@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210626074417.714833-1-saeed@kernel.org> References: <20210626074417.714833-1-saeed@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Yevgeny Kliteynik When comparing sampler flow destinations, in fs_core, consider sampler ID as well. Signed-off-by: Yevgeny Kliteynik Signed-off-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/fs_core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c index b8617458a3fd..d7bf0a3e4a52 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/fs_core.c @@ -1504,7 +1504,9 @@ static bool mlx5_flow_dests_cmp(struct mlx5_flow_destination *d1, (d1->type == MLX5_FLOW_DESTINATION_TYPE_TIR && d1->tir_num == d2->tir_num) || (d1->type == MLX5_FLOW_DESTINATION_TYPE_FLOW_TABLE_NUM && - d1->ft_num == d2->ft_num)) + d1->ft_num == d2->ft_num) || + (d1->type == MLX5_FLOW_DESTINATION_TYPE_FLOW_SAMPLER && + d1->sampler_id == d2->sampler_id)) return true; }