Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp156425rwe; Wed, 24 Aug 2022 19:40:38 -0700 (PDT) X-Google-Smtp-Source: AA6agR4awlb0d4H9MWHIQACWeTHnNztrrIt3zlLdjKWpT4HC2aQXdAhlCuJCj/EDTn9XlULxYDJ/ X-Received: by 2002:a17:907:b10:b0:73d:bedd:3121 with SMTP id h16-20020a1709070b1000b0073dbedd3121mr1005691ejl.530.1661395238552; Wed, 24 Aug 2022 19:40:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661395238; cv=none; d=google.com; s=arc-20160816; b=K4pNK2bmW6G9pRXtaKaPgIOX4ip5e5yXEzrQ25hCMbfsYEI2J9xhk53w0sdxYjNcHx 7mZiqPhkuItmQ1nSm9OVjykW9Se9ljfEEDRirQPwwbL03EfEcQsSE864+2aS3c36gHX5 TYER4w9fwzbOjpFFf+vv/O4PaPHj/8ouqKdcDut3X56Du6h+O5+y1FOFjDzP2nE4CJES CbfZICqaSYSdyjvjqyOO992gDTEKz+1+Xb1eeHcuqLr/lug7smowZGggF41kix2xYDcu d3gutzbBUHKkLqCjprap4ZfUf9kMl7MeFCTfMw+Q2E2uopiua7XuOLquy7zlh5BHM3Ou ARrQ== 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=WBu8LmrRIK+SDkVgV6rJt4O1S6Q3tUu803Yb2Y/vIow=; b=CjnCQ7AWtgVCeUzas9GinyHnclkFDY+vRMgEVqYL5Cf5N2kOi7obf/18P3M+3lbCSP xvkpo6JJSuV5gzxNr0/RbuDAFIOtxACgeSMwRt3tjXAOP1FSEJSjFr/SQmN9qe5wD88v JWZJar3oiKcQJh3EabtMfIWOXc0BnW/K22WslvtufNKgWCfoT2klLZKBLtWJjJUv4Z0L zhfYgOO3oIBmn2tCUnjEwbQniBnt3zR96Efu444eZncAqSgpiO0OOSklaF98+4Y907q5 2OB/DFHTP40d3xijM5OZIxB6fhYmloFuU68tBnRdX20ZwZfW6Mv/8dJa3ssqgKXwBN5z /t7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=a0FyiuDP; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o16-20020a170906975000b0073d68945f2bsi3120547ejy.233.2022.08.24.19.40.12; Wed, 24 Aug 2022 19:40:38 -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=@gmail.com header.s=20210112 header.b=a0FyiuDP; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234225AbiHYC3j (ORCPT + 99 others); Wed, 24 Aug 2022 22:29:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233228AbiHYC3h (ORCPT ); Wed, 24 Aug 2022 22:29:37 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ADB8923CC; Wed, 24 Aug 2022 19:29:37 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id f4so14818503pgc.12; Wed, 24 Aug 2022 19:29:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc; bh=WBu8LmrRIK+SDkVgV6rJt4O1S6Q3tUu803Yb2Y/vIow=; b=a0FyiuDPR7RV5jJ9oRUOpgFn1LmdXdCeo0MVMd+Oh6mv8pV0QmkkFNjOCEQXwVgWQ3 vvFRAyTxKm/MeBKl3h7oMlkZgtAjqAtwLCn/SguIxamHqHzl8HJ0Ncmps6RZzttUUicm q9eGpJiZDNkuwpUQY0fZ2NnOU8bPM2YTszpf3Gjwero7TBf/sN9jQi806jzl8Y3QnVUT 17cKHqlWU3FajGbk4nq4sq1ABlxNv7u8AFUv6JLyK8K+iHLiS5Uk4ShttSBeHpHQnd58 cHotG1udn/Q/1Su5bJOFzBgToOUzdjckTra/ApNZgeQTceIbCc3smxJjeM4SiYSr8cg9 MyzQ== 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=WBu8LmrRIK+SDkVgV6rJt4O1S6Q3tUu803Yb2Y/vIow=; b=VP17OATRdQoQWFDoEygk8QT9+vQqeze9GcZfLCeUPxQb21BSuIQ+CdnflGrkjVB/on 0Lmx9PqfLuZ0XUQbKTmKNdD/Tkl9aEG+f3O/GfpV3MtFzsfKt1jwuyxlhWcuMP5YXJjd iKiTsfhQOx8b4qDjMnl34vwKQ6AOOD+xwIYY+yTo309eDeZ+EfocpuoYe28Tqm6uVNVf I9BQYmBEONq3/vZku43DGgSBz3gzq/zQfF5FQgzYmU923+GGSipZ+h7NIA6Z9DWJzk4r IZmaxcij1fuDaeJU7SiHDh7CaDJec1o87KYsS7JTLOw46bAr6gdT7MobOCzaNfljOkQd kRig== X-Gm-Message-State: ACgBeo0TGT8Te8axPTTEfB0lvD+2DcPU4J+p0yB/49Uk69tD0NP4L1H2 ilE9e/J67iW4Z7KlsY01mZzEvQhBze/9BDZoaDk= X-Received: by 2002:a05:6a00:a05:b0:534:b1ad:cfac with SMTP id p5-20020a056a000a0500b00534b1adcfacmr1938835pfh.35.1661394576605; Wed, 24 Aug 2022 19:29:36 -0700 (PDT) MIME-Version: 1.0 References: <20220606022436.331005-1-imagedong@tencent.com> <20220606022436.331005-3-imagedong@tencent.com> <20220824181040.57ec009e@kernel.org> In-Reply-To: <20220824181040.57ec009e@kernel.org> From: Menglong Dong Date: Thu, 25 Aug 2022 10:29:25 +0800 Message-ID: Subject: Re: [PATCH net-next v4 2/3] net: skb: use auto-generation to convert skb drop reason to string To: Jakub Kicinski , Eric Dumazet Cc: 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 Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 Thu, Aug 25, 2022 at 9:10 AM Jakub Kicinski wrote: > > 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]) it seems that TP_printk is not as simple as I thought....... Sorry for the problem I brought, I'm looking for a solution. Thanks! Menglong Dong