Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3426291pxf; Mon, 29 Mar 2021 01:45:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyydsp2c0MOYrGcgQJsSpJUBenyUYpzr14v7pPEkKnhXUpgum1kdJ2V2Q/VZLctfYcg2Ld0 X-Received: by 2002:a05:6402:1517:: with SMTP id f23mr28135167edw.272.1617007520163; Mon, 29 Mar 2021 01:45:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617007520; cv=none; d=google.com; s=arc-20160816; b=0KEwodPQIq7j88eas0ZqTYZau3I5imUKo/PPkZtVnIjWZ/qemL5h3jii39AZDKL/dJ gwHdT85la6qn1rJQ1CX6KcXqslXDGRa8sm/JhaWWKWRuBYqwHQgNjyMh4CPW5nCLM3Xc 4F+1Avbx7UK89JoctjjU1F8F6HrB/T1oo+x/WgxQZCYaI5TVqTD3rllJuhw2IhA+oHJ8 0kg80CN3+5UndFWIY5ysb93OJkmvN1p42d+O+U35dBL/Mwp1RIgRX+YbnSi2Y0zn94ja QGmt9B3isbNKvuQPJ6Ql1/ly0Q9hbiN9l37G3DnOdYOBsVcK/KkDkU2akrMbpSDFBVdK o8WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=4uEDJScvIpo8HVeu1yHk6RqRLKGKEeICTENgRjsgrtc=; b=RwTrLCjwRkL6vnXVWk3isz+PGkjEern5kNBZoEB7hYw9mDO8EVL1lpmoXwzfnS81kU KW1o/IacqRzVCC5DIbPWdK3DPD4062g+abHZpGq/7ENV72AbVNoKwXWPR9NH4KvKIhVr QRfM7DM0ufKXF0BbRN+O4fYHY5DxewQperA4mfmQLJt3qy53s8CYqfVcornbxQ1G3sDA RDWEpfo+HgH4lDys4nYg51jr0Md2emXbm5o0hRhdU2rcbG7lQJNKxkNwkejHEpgNZOud y3rk+0/PcXjfJZuF5v0oiPe6Rcopn4WHEiVU0WPvBNnYOIjk/A75NDLvXJr/Bg/QFO3M 6Clw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TAWk0p4M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay27si12045515edb.171.2021.03.29.01.44.56; Mon, 29 Mar 2021 01:45:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=TAWk0p4M; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235207AbhC2Im1 (ORCPT + 99 others); Mon, 29 Mar 2021 04:42:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:40920 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234227AbhC2IYL (ORCPT ); Mon, 29 Mar 2021 04:24:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2389661613; Mon, 29 Mar 2021 08:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1617006246; bh=A+J6a3yoK0zjhH69Ld2rTJGXFsaXp/84hjC1JUYiDn8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TAWk0p4MLUtTAvmmmkujpabe6yWBFYzJJ2j13Tuszxma7Bebg0UzH2DGhsUwUsNHs g5njAwq68J0sICRPXQIAo68xMiwtobROabMLN/Z4wYzKTdCbQOvDuiBUlBDqJJOuD+ NLWvVnj6fEbLDuNfzSydBS+rqV/1FnpmEWD+/mUU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Huy Nguyen , Daniel Jurgens , Saeed Mahameed , Sasha Levin Subject: [PATCH 5.10 170/221] net/mlx5: Add back multicast stats for uplink representor Date: Mon, 29 Mar 2021 09:58:21 +0200 Message-Id: <20210329075634.824293479@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210329075629.172032742@linuxfoundation.org> References: <20210329075629.172032742@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Huy Nguyen [ Upstream commit a07231084da2207629b42244380ae2f1e10bd9b4 ] The multicast counter got removed from uplink representor due to the cited patch. Fixes: 47c97e6b10a1 ("net/mlx5e: Fix multicast counter not up-to-date in "ip -s"") Signed-off-by: Huy Nguyen Reviewed-by: Daniel Jurgens Signed-off-by: Saeed Mahameed Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c index 0dc572aaf177..e2006c6053c9 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c @@ -3666,10 +3666,17 @@ mlx5e_get_stats(struct net_device *dev, struct rtnl_link_stats64 *stats) } if (mlx5e_is_uplink_rep(priv)) { + struct mlx5e_vport_stats *vstats = &priv->stats.vport; + stats->rx_packets = PPORT_802_3_GET(pstats, a_frames_received_ok); stats->rx_bytes = PPORT_802_3_GET(pstats, a_octets_received_ok); stats->tx_packets = PPORT_802_3_GET(pstats, a_frames_transmitted_ok); stats->tx_bytes = PPORT_802_3_GET(pstats, a_octets_transmitted_ok); + + /* vport multicast also counts packets that are dropped due to steering + * or rx out of buffer + */ + stats->multicast = VPORT_COUNTER_GET(vstats, received_eth_multicast.packets); } else { mlx5e_fold_sw_stats64(priv, stats); } -- 2.30.1