Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp737224pxb; Tue, 8 Feb 2022 01:02:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzmz3kaIvEEbdBNm4/BPDExEP6N0MzaKziPCSW1KzddYt7duDNblWfNbJRhWjqGknNzYNuJ X-Received: by 2002:a17:90b:4c8d:: with SMTP id my13mr254469pjb.6.1644310926261; Tue, 08 Feb 2022 01:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644310926; cv=none; d=google.com; s=arc-20160816; b=nmJpN+6D8EVozqvvGWZBgAjTRN4XzF0FTa/fyYEk5ej6ZwjLGlhCvR14kdJL+/0qCK pEmPbGFlqU76kVbl5suyN1Rx+Ca6lwKuBX2m+a/qyJclY1ggpvJiqA24DOkI/efNaCxF LF4McyCV+rABXF1p6345P9rO+GxlV54infTjdeMZSwdfMU3yYmY+guC8+CzSpk6HJ1QE 2ls6jD9P5FySM2sJLuaSG6pOYyw9UyCEIoC18HtQTcgt84uoIwDYiMMyffgoNiLEXx/J hfb+gt3isahXm67o/lOCBFIC3Lml80kTr0i7RGLEwipQIYIMbtl0t1DsSORxVtQJRGtL /Nhg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date; bh=KwmLjCkZq5fQue7tE8lGj2OceGhxtDzIjL+s3Dl+MaE=; b=euacT2quWL05P3PA3lyQxla8Bb/fLpjujiWF9JVu2F+cZRBcMvy2KuuP4NBBVd9ybh oeZ5VjB3TjAjV8o4DIF97mJvCbN2tnhv2VvO62QTtFldbsN80q7FlbFG+0LnS54/qfZ1 WWXttjS89HYbkLaiOZdNJW3ryJWcedYzjA6s757v61dJulGv1Up9DFobdDqIILswwJyh SAz0Liy7YclEk6v/itvu3QyvXLmnJmH7QE95o/sHC1zsLO75zR9t5bci0MtlCA2soZEl 7bpdUnnqEqag29s/XnDr99dumEY/V6eLTMX5n+gv4eejGZRtTorzbvJ0gJBuS2vDt/bK d2IQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g187si3483695pgc.830.2022.02.08.01.01.53; Tue, 08 Feb 2022 01:02:06 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1383521AbiBGOoa (ORCPT + 99 others); Mon, 7 Feb 2022 09:44:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236399AbiBGOnI (ORCPT ); Mon, 7 Feb 2022 09:43:08 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C45FFC0401C1; Mon, 7 Feb 2022 06:43:06 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8A0E6B80B44; Mon, 7 Feb 2022 14:43:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57271C004E1; Mon, 7 Feb 2022 14:43:03 +0000 (UTC) Date: Mon, 7 Feb 2022 09:43:01 -0500 From: Steven Rostedt To: menglong8.dong@gmail.com Cc: kuba@kernel.org, dsahern@kernel.org, idosch@idosch.org, nhorman@tuxdriver.com, davem@davemloft.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Menglong Dong Subject: Re: [PATCH v6 net-next] net: drop_monitor: support drop reason Message-ID: <20220207094301.5c061d23@gandalf.local.home> In-Reply-To: <20220205081738.565394-1-imagedong@tencent.com> References: <20220205081738.565394-1-imagedong@tencent.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 Sat, 5 Feb 2022 16:17:38 +0800 menglong8.dong@gmail.com wrote: > --- a/net/core/drop_monitor.c > +++ b/net/core/drop_monitor.c > @@ -48,6 +48,16 @@ > static int trace_state = TRACE_OFF; > static bool monitor_hw; > > +#undef EM > +#undef EMe > + > +#define EM(a, b) [a] = #b, > +#define EMe(a, b) [a] = #b > + > +static const char *drop_reasons[SKB_DROP_REASON_MAX + 1] = { Do you need to define the size above? Can't the compiler do it for you? static const char *drop_reasons[] = { -- Steve > + TRACE_SKB_DROP_REASON > +}; > + > /* net_dm_mutex > *