Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3420788rwe; Mon, 29 Aug 2022 11:19:26 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Di0QMMZ43/XL0m9sgxWJRcocjWDd/HIshaIXEM67xZYppZfCCtzj/fLAjKDzfYHmHZ80d X-Received: by 2002:a05:6402:1d4e:b0:43d:9822:b4d1 with SMTP id dz14-20020a0564021d4e00b0043d9822b4d1mr17531354edb.212.1661797166540; Mon, 29 Aug 2022 11:19:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661797166; cv=none; d=google.com; s=arc-20160816; b=Dp2DJoT2YHry6v+WELTe9+AUeLmVWBkj93gXnJ1Cm/w59NdlPMDmbkHbG0/63c8Yzn QoF8F4UeFiGXP9ep1qiqFbpi/tkS3QE94/kY+P4LPfkxZqTxr06PqzvpetbFg+yiBARv /c4i5czZTLgZRbItU3jpjJJno2teFAApqjRxiG/92zUYVRrisBn0lNqNW7Em4rjaSYfV LgsI2EDJ2+X8nA6gz6qZ6EguzKNr7B0HJb2EJDOkYaxYSsgvjP2t8onGlw7NHO6gVOoa XhJKTqKUBF72F0HArGPL1io5RehEWmdnL3Ho+B+0G9ruGfWvS25DvHw/uta2+Xq8UDVq OnMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=xICyMVVdCsY5/fofBo/xR4lYqmLE701ZtHc0T6bkZNY=; b=rzDXlrTpMIUY/fMclUhcvFIyOXSGl6L91XzTTY1SW4yOM18uB4z5Oye+f+hg8awz48 KJ8UioFcH/xixqSu/8F9SMjYsh6fPB2vIsR+WOjoNNfv8l7y1eE82oeb5ajfTXOqSlpD tISWHYxGyUlxqHpRKTlChGwB9wm8Phc3xenrIQY4HFCVV47WyhVGi8AGsSf1oWCBMwPl 3DGJWwJYj2nCl9J9t3XB/SVVC3N1p3JbvKDgS66LCZKrxkqrs20SXPynSxMNGF1X9uIl QFJ+w2XcGtGIDnxpgqJeEkqLXinmdzw1n+3AOzpT+Htr1JsxaFuDdzwMN7+W56Psw7Pc cIGQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=f2mnCMTU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3-20020a170906068300b00730a3906ecfsi6453337ejb.110.2022.08.29.11.19.00; Mon, 29 Aug 2022 11:19:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=f2mnCMTU; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231233AbiH2RJH (ORCPT + 99 others); Mon, 29 Aug 2022 13:09:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39212 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231451AbiH2RIo (ORCPT ); Mon, 29 Aug 2022 13:08:44 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 885FA13D4D for ; Mon, 29 Aug 2022 10:08:19 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-33dc345ad78so212066557b3.3 for ; Mon, 29 Aug 2022 10:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=xICyMVVdCsY5/fofBo/xR4lYqmLE701ZtHc0T6bkZNY=; b=f2mnCMTUX8MUcwoig9BX5a/hSjp+haWVlmf/zgLb1ELSvOm4uiJPmBTdc9u7mpkywY tRpcIfusLS82Y1a6vcFzbfzXwHeCu6PMEvaOgzBsxlccY1llfu5kN9XGPU0vpG3hhdnv 0yvXSMaUSu4L0cByn9rY8ZqMIk4O/F7PdjtWDnW3XyQouMtnpCqMGaMuRwCd39znHM2y 208DPvXLnpvYdHqfW5k8BN24f9Us8BGbwVErhbN9a3a4ELCIVR8T/EFvlrh1+787gf3/ FEr018E1RH9SPJIVg+pAs9j3RV+dyC0szpV28VCjQ5AbGBKiiFRGvieGmRgRr/I0Ue5r ip4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=xICyMVVdCsY5/fofBo/xR4lYqmLE701ZtHc0T6bkZNY=; b=ChALv9COp04xfxxXVbWqqDaCHagQDqYar0cVCYRpmcYnPuTSmO+qx8JaEyVDSticI5 DVcJoad9op2vxCvm0mZljPL4VNKyctWzcX8y5tNQO6GLmpU4qdKCjczgUV7WvDGaC5F3 YGTg0lRJCLb9YI/le8cbk9nqNgszRtpwDNbM8C/w3OI+X71wexu+qUEIoXOlqG3aQaV8 VsY+UHzUjEFPB6iVmGrafrQuc+3eapeiKV7BX6zNCe/Ldyiy9EnpCv2qmpM9XnBhj1oD Hnal21Z8ex++nCYM2nb4Pbn8w5DI8kmQQ+Mx7PoMzp7E6DhVdU04Cnc8z9t0J5ZemmrQ gUUQ== X-Gm-Message-State: ACgBeo33ryfwTYEiS0jF4Qsb7/5VJeQvWCcHmLYxLIbaEcr+XY/JK8ix zO78O4ef5DuXja0q3huWVWohsxERs0LukameN4CSNw== X-Received: by 2002:a25:7cc6:0:b0:67a:6a2e:3d42 with SMTP id x189-20020a257cc6000000b0067a6a2e3d42mr9035859ybc.231.1661792898498; Mon, 29 Aug 2022 10:08:18 -0700 (PDT) MIME-Version: 1.0 References: <20220829081704.255235-1-shaozhengchao@huawei.com> <20220829081704.255235-2-shaozhengchao@huawei.com> In-Reply-To: <20220829081704.255235-2-shaozhengchao@huawei.com> From: Eric Dumazet Date: Mon, 29 Aug 2022 10:08:07 -0700 Message-ID: Subject: Re: [PATCH net-next,v2 1/3] net: sched: choke: remove unused variables in struct choke_sched_data To: Zhengchao Shao Cc: netdev , LKML , David Miller , Jakub Kicinski , Paolo Abeni , Jamal Hadi Salim , Cong Wang , Jiri Pirko , weiyongjun1@huawei.com, YueHaibing Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 29, 2022 at 1:14 AM Zhengchao Shao wrote: > > The variable "other" in the struct choke_sched_data is not used. Remove it. > > Signed-off-by: Zhengchao Shao > --- > v1: qdisc_drop() already counts drops, unnecessary to use "other" to duplicate the same information. > --- > include/uapi/linux/pkt_sched.h | 1 - > net/sched/sch_choke.c | 2 -- > 2 files changed, 3 deletions(-) > > diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h > index f292b467b27f..32d49447cc7a 100644 > --- a/include/uapi/linux/pkt_sched.h > +++ b/include/uapi/linux/pkt_sched.h > @@ -396,7 +396,6 @@ struct tc_choke_qopt { > struct tc_choke_xstats { > __u32 early; /* Early drops */ > __u32 pdrop; /* Drops due to queue limits */ > - __u32 other; /* Drops due to drop() calls */ You can not remove a field in UAPI. > __u32 marked; /* Marked packets */ > __u32 matched; /* Drops due to flow match */ > }; > diff --git a/net/sched/sch_choke.c b/net/sched/sch_choke.c > index 25d2daaa8122..3ac3e5c80b6f 100644 > --- a/net/sched/sch_choke.c > +++ b/net/sched/sch_choke.c > @@ -60,7 +60,6 @@ struct choke_sched_data { > u32 forced_drop; /* Forced drops, qavg > max_thresh */ > u32 forced_mark; /* Forced marks, qavg > max_thresh */ > u32 pdrop; /* Drops due to queue limits */ > - u32 other; /* Drops due to drop() calls */ > u32 matched; /* Drops to flow match */ > } stats; > > @@ -464,7 +463,6 @@ static int choke_dump_stats(struct Qdisc *sch, struct gnet_dump *d) > .early = q->stats.prob_drop + q->stats.forced_drop, > .marked = q->stats.prob_mark + q->stats.forced_mark, > .pdrop = q->stats.pdrop, > - .other = q->stats.other, > .matched = q->stats.matched, > }; > > -- > 2.17.1 >