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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_GIT autolearn=no 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 ABD0EC43603 for ; Tue, 17 Dec 2019 08:47:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 84869207FF for ; Tue, 17 Dec 2019 08:47:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726842AbfLQIra (ORCPT ); Tue, 17 Dec 2019 03:47:30 -0500 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:60255 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725893AbfLQIra (ORCPT ); Tue, 17 Dec 2019 03:47:30 -0500 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e07486;MF=dust.li@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0TlB69Cc_1576572438; Received: from localhost(mailfrom:dust.li@linux.alibaba.com fp:SMTPD_---0TlB69Cc_1576572438) by smtp.aliyun-inc.com(127.0.0.1); Tue, 17 Dec 2019 16:47:24 +0800 From: Dust Li To: Cong Wang , Jamal Hadi Salim , John Fastabend , Jiri Pirko Cc: Tony Lu , netdev@vger.kernel.org Subject: [PATCH net-next 0/2] net: sched: unify __gnet_stats_copy_xxx() for percpu and non-percpu Date: Tue, 17 Dec 2019 16:47:16 +0800 Message-Id: <20191217084718.52098-1-dust.li@linux.alibaba.com> X-Mailer: git-send-email 2.19.1.3.ge56e4f7 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Currently, __gnet_stats_copy_xxx() will overwrite the return value when percpu stats are not enabled. But when percpu stats are enabled, it will add the percpu stats to the result. This inconsistency brings confusion to its callers. This patch series unify the behaviour of __gnet_stats_copy_basic() and __gnet_stats_copy_queue() for percpu and non-percpu stats and fix an incorrect statistic for mqprio class. - Patch 1 unified __gnet_stats_copy_xxx() for both percpu and non-percpu - Patch 2 depending on Patch 1, fixes the problem that 'tc class show' for mqprio class is always 0. Dust Li (2): net: sched: keep __gnet_stats_copy_xxx() same semantics for percpu stats net: sched: fix wrong class stats dumping in sch_mqprio net/core/gen_stats.c | 2 ++ net/sched/sch_mq.c | 35 ++++++++++++------------- net/sched/sch_mqprio.c | 59 +++++++++++++++++++++++------------------- 3 files changed, 51 insertions(+), 45 deletions(-) -- 2.19.1.3.ge56e4f7