Received: by 2002:a19:771d:0:0:0:0:0 with SMTP id s29csp1250227lfc; Wed, 1 Jun 2022 13:05:08 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx0QvUhelISSi6CIa0NSi0tkmhNRceqLXPYjskxJpyyTiXiFKojS63CMwExwqTwW31iRleb X-Received: by 2002:a17:902:e881:b0:161:f67c:3478 with SMTP id w1-20020a170902e88100b00161f67c3478mr1100704plg.131.1654113908667; Wed, 01 Jun 2022 13:05:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654113908; cv=none; d=google.com; s=arc-20160816; b=a5iYZDwJEABV1158Fm7ADcfgM5hJKhPA2TBLBp5tIQzCdTfZoBAs8Nu9aQdCQl4eXd U68EJCwBU074Li2058Ya21xv9eWvsmS8Uah4xY+0uR1m0xgKxOfYArgtsrwwfNr71wdr VnvL1TdvNrJ4D4OSnrS5OPRes4s6EDyeYk1kwh+zL++XnyL8MP0mlJZqfF6NTHbABX1K aw0c+DDOM5qLT3Q9MHWnv3IaUxqtpJMjVRleh8X6HGL/S+IrltA3Cf30zK5NON+Wj+wV /qg7D5HTkGY3dSoLxGHhFO28AtAUvkvHtNtviK8ZI31osXrDuz9Kkpg27Y0wUUNlC16f npsA== 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=kZhnsuNfcA3slCEKd3Cel72aDguRhwDCi5gVjwgfFzo=; b=vOKGV4PdMdxutdDBs4cC+YcXSDz18ShguxiXxXBV3XebOmUK7VObhH9+MHM79WdLsv /JmnN7++cE8p12fbGrl76ec0Gesw4tACUboZENQen0eIWO9t/ke7fqdB6qFRqzqgz/2g p+I1izzlpyNUNIBVgpGVzL1kziipBG+Ikrk1lUhX+7IisWBcu942EakSBhDTfBgLucz7 t7kgzXAkv+fgZ+x5SIN+nA0EeD6vvZdKAcHwc+zzqxC8KRWlP1pJsMAJt+0A7+UbLBkI SXqbfe2CBKj5jFMq8z0dyy0d+EyEQxolVI6ttmZyYAvQBg8H1XMPbb52rVd+EW9SYrCs UOpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ahdP1rMH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id r7-20020a17090a1bc700b001e30ca572e2si7304753pjr.23.2022.06.01.13.05.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jun 2022 13:05:08 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ahdP1rMH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8248BD12A; Wed, 1 Jun 2022 12:21:41 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349465AbiFADnb (ORCPT + 99 others); Tue, 31 May 2022 23:43:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36316 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231940AbiFADn2 (ORCPT ); Tue, 31 May 2022 23:43:28 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 786D384A01; Tue, 31 May 2022 20:43:27 -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 dfw.source.kernel.org (Postfix) with ESMTPS id E9DA161139; Wed, 1 Jun 2022 03:43:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26860C385B8; Wed, 1 Jun 2022 03:43:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1654055006; bh=OWd2/VzGcHSJVAYzt1o0X8eGieTIiCjDOqFC4+fczqc=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ahdP1rMHIBgY+/vGYg9zJDWrhhOqu1UYy19CTBGEt2+Aaxns2K1svmgRXQAwHj8lF /fvX15gm4GZcK0DH+hPLuhEhdRKgwAbyeyy4lSoPjv/ck50IfBoy/QK74627Fb2SDx WwPFx9yG3SeA3gkR5L7Deljunzi4URdVOxvFdiJ7xvkEWFaX9fYO2Fu/Q/e1r1loos AOFYxqdrlrLLbVoPsb4tnx7Q1p6OPIfmZqsf4ArLJguI6laJKEzwSzsifxIhw+7L4W HGZT4Og4o4MM+TEfQFVoyTFQDkFLN6EOiLy98Snarc1j3jKcq0nfIvntKDLEPLzM5G LS9oRdtxuOCGA== Date: Tue, 31 May 2022 20:43:25 -0700 From: Jakub Kicinski To: Menglong Dong Cc: Menglong Dong , LKML , netdev Subject: Re: [PATCH net-next v2 2/3] net: skb: use auto-generation to convert skb drop reason to string Message-ID: <20220531204325.5ba1362f@kernel.org> In-Reply-To: References: <20220530081201.10151-1-imagedong@tencent.com> <20220530081201.10151-3-imagedong@tencent.com> <20220530131311.40914ab7@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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, 1 Jun 2022 11:27:41 +0800 Menglong Dong wrote: > > > +#include > > > > Why? > > Oh, you noticed it. To simplify the code in dropreason_str.c, as > EXPORT_SYMBOL() is used. Okay, I'll move it to the generation > part. IMHO you can move the EXPORT_SYMBOL() to skbuff.c, with a comment saying that the array itself is in an auto-generated source. Avoid avoid to "echo" both the EXPORT and the include.