Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp121639rwe; Wed, 24 Aug 2022 18:40:39 -0700 (PDT) X-Google-Smtp-Source: AA6agR7Iu4hxU/B2E2Dvs/8MZjggy3latGh1D6czZOLN2q58hMowkNlveI8/KQcLT0KeZW/rfPqz X-Received: by 2002:a17:902:da8f:b0:16f:e43:efda with SMTP id j15-20020a170902da8f00b0016f0e43efdamr1496861plx.164.1661391639103; Wed, 24 Aug 2022 18:40:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661391639; cv=none; d=google.com; s=arc-20160816; b=q3jZAGLXK0UQ5v9JQUmDUDyJG11pzTnAURBggLro4EV35BUX+566t+0ecEeCi/iB+X MbbgU3115D58Gwa5OMD4n6iu7nr8EjXEPz9frL2oTg9/NULtr3tMNjTWdP4uYmh2GQIY EFIBZsfHKQcWsQq/E8Nvk2dtqj6v3hFf+EOuK3Ok6vsbYphq2g16lZr2cdFJQD802NcH nUNIYtw7+UuNPHSK2Y/kTEYd+24ZOSZJ2HQjCSKGZV4ifMWjbj4f8lH83zDsFD+Pyqfk EqiK3quitzXdrGuFZrKkCCpT1hf8G7Gz2XGh3LLyjEB8k7hxD6rRew7FsLyFhU4e4dob nrFw== 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 :dkim-signature; bh=nJi1G4vxci2fdItT58UzsWY6B6WDEkeed95jipdnK64=; b=y/yqUp89owuJP/Wzxzb8sAqpqUz8nHKrkNdsV4kMKOQvvMEgBKf1iueCRyKM6Uh31t sAaxOHg8fB8FEiSThZjSLIuq2cUJxETGEjA/QBw3bNddhd8vZCCR6gsU4l/nF+jQ8Fxr O/qDlU/1hDuG9OMSo5VZlJRqpNdwQ6RCAeMMOyd/x9PVHXOtBkaLqnLDB1kk31M1Vcka bk27MA1zXhOsiLX8Ux3/0YVL0LH7wANMkehWs10fG3Hc1lNm5g9rSEvjEGVJES/NAzHQ s/oSIss1KzXWWkO51yLnIu8e3pMwtl3Q6OCr5tyi0g7q6JyVobe6EnbEHBEqRka+mHh9 iYtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KfPUKgrz; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 203-20020a6300d4000000b0042b2672f722si2195816pga.64.2022.08.24.18.40.28; Wed, 24 Aug 2022 18:40:39 -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=@kernel.org header.s=k20201202 header.b=KfPUKgrz; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231723AbiHYBKs (ORCPT + 99 others); Wed, 24 Aug 2022 21:10:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbiHYBKp (ORCPT ); Wed, 24 Aug 2022 21:10:45 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A93DE6262; Wed, 24 Aug 2022 18:10:44 -0700 (PDT) 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 64629B826C8; Thu, 25 Aug 2022 01:10:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 730F8C433C1; Thu, 25 Aug 2022 01:10:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661389842; bh=eZ9Go/XQl2wAHzhKg+W8LOTDr4ufdLcry+Kq/lkNzUQ=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KfPUKgrzVARDDdQ+kYVWsucaMZd+BX0YulGPrcymaBMqNxMGRq/ikm9hNNEIs6UhE vcbvQU4EiiFy0M696BEvL90BV38fu+LbjEa5Tz/B3Ly+3T8CecDwaXm15p7IqvEygW H+FOCBCNtKjZSWSLhBKf/qWYmDFXo4/iaDPYgbfQfX8Gee1fvQQYc2Y1l+zi1Egjoq KeX1YjhbrO6H0/C+R3iNcTagMhYIVwyUAlLRmnKaPVjpATdE9nLSH82zM4zeTAwveN poZRNF/zVSHYEgrae48+Xtrev4QWy5O26liocbYUk/ky7Uj7bBlNmGNCIZ3sYnNWzc L0+wGovai6YAw== Date: Wed, 24 Aug 2022 18:10:40 -0700 From: Jakub Kicinski To: Eric Dumazet Cc: Menglong Dong , Steven Rostedt , Ingo Molnar , David Miller , Paolo Abeni , Neil Horman , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , Menglong Dong , David Ahern , Talal Ahmad , Kees Cook , LKML , netdev , bpf Subject: Re: [PATCH net-next v4 2/3] net: skb: use auto-generation to convert skb drop reason to string Message-ID: <20220824181040.57ec009e@kernel.org> In-Reply-To: References: <20220606022436.331005-1-imagedong@tencent.com> <20220606022436.331005-3-imagedong@tencent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 Wed, 24 Aug 2022 17:45:15 -0700 Eric Dumazet wrote: > After this patch, I no longer have strings added after the reason: tag Hm, using a kernel address (drop_reasons) as an argument to TP_printk() definitely does not look right, but how to tickle whatever magic __print_symbolic was providing I do not know :S TP_printk("skbaddr=%p protocol=%u location=%p reason: %s", __entry->skbaddr, __entry->protocol, __entry->location, - __print_symbolic(__entry->reason, - TRACE_SKB_DROP_REASON)) + drop_reasons[__entry->reason])