From mboxrd@z Thu Jan 1 00:00:00 1970 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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 DC78DC32792 for ; Thu, 3 Oct 2019 16:25:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AFDDC215EA for ; Thu, 3 Oct 2019 16:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119906; bh=uJuJAo1xVU26HBO94Sblngg/fDJwSP7RTRepFXVxBw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=2WQh5loREOk7LF6CW9N7v4KF1bo69zELrpE9n6InPDiS41BMj6aYijpzJrPMyZCqB jRZ8QjX8ATFN9CA4IF9ZQGXygxv/mxSMw/NKfvEZNVQFGXsM8go0iW831WXIQujOnj 2WFpR6MW+QqTdIVsc3V6NcSmG0zWaWJk0vOwVYoA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390876AbfJCQZF (ORCPT ); Thu, 3 Oct 2019 12:25:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:55116 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388308AbfJCQZF (ORCPT ); Thu, 3 Oct 2019 12:25:05 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C35C020867; Thu, 3 Oct 2019 16:25:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570119904; bh=uJuJAo1xVU26HBO94Sblngg/fDJwSP7RTRepFXVxBw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LviVXQdmTifiCl1VwStLb1j0cOdxuaqX8jAq+3NCBai+IXlGxaQXWWD9KntVozm8u pRouOZx1RrYdxFjXFZNH5N3w4vXTr/pzQiO01aNppHYuXlBP6G9Ktl19c0b+Ym0QyE 0VlNODmYZrGL+JdvsnTAcAkyxf68iWwwYrVkRwpY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Saeed Mahameed , Maor Gottlieb Subject: [PATCH 5.2 024/313] net/mlx5e: Fix traffic duplication in ethtool steering Date: Thu, 3 Oct 2019 17:50:02 +0200 Message-Id: <20191003154535.742085273@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154533.590915454@linuxfoundation.org> References: <20191003154533.590915454@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Saeed Mahameed [ Upstream commit d22fcc806b84b9818de08b32e494f3c05dd236c7 ] Before this patch, when adding multiple ethtool steering rules with identical classification, the driver used to append the new destination to the already existing hw rule, which caused the hw to forward the traffic to all destinations (rx queues). Here we avoid this by setting the "no append" mlx5 fs core flag when adding a new ethtool rule. Fixes: 6dc6071cfcde ("net/mlx5e: Add ethtool flow steering support") Signed-off-by: Saeed Mahameed Reviewed-by: Maor Gottlieb Signed-off-by: Saeed Mahameed Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_fs_ethtool.c @@ -397,10 +397,10 @@ add_ethtool_flow_rule(struct mlx5e_priv struct mlx5_flow_table *ft, struct ethtool_rx_flow_spec *fs) { + struct mlx5_flow_act flow_act = { .flags = FLOW_ACT_NO_APPEND }; struct mlx5_flow_destination *dst = NULL; - struct mlx5_flow_act flow_act = {0}; - struct mlx5_flow_spec *spec; struct mlx5_flow_handle *rule; + struct mlx5_flow_spec *spec; int err = 0; spec = kvzalloc(sizeof(*spec), GFP_KERNEL);