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=unavailable 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 7F7BAC4CED1 for ; Thu, 3 Oct 2019 17:15:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4CF4620673 for ; Thu, 3 Oct 2019 17:15:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570122950; bh=uJuJAo1xVU26HBO94Sblngg/fDJwSP7RTRepFXVxBw4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=ULfFciIOFt6QVLIpVrBJ7E8pxWGghuya6psZjkislXU4QJVkTcQRORYid05ZzAxIc ftDFgkfaCBKZM91x+01dSNvWp+bu8ox1VdUDdtySAylZkjN+Q2t/rUbYPEaXezdclT zYI1H5r3Hzu9DI3SkVuvadtvUxsRG71iTOEXFzWM= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389207AbfJCQZK (ORCPT ); Thu, 3 Oct 2019 12:25:10 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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);