Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp894741pxp; Wed, 16 Mar 2022 20:28:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzYbr3uRPjK4Q4Q9XCIqiv7FXhOUSOdDcz9qLnT4SLs+FfcvH1tqZn66C6DhD8icbMa1bqk X-Received: by 2002:a17:903:40c3:b0:151:c8a2:1c46 with SMTP id t3-20020a17090340c300b00151c8a21c46mr2973600pld.141.1647487700940; Wed, 16 Mar 2022 20:28:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647487700; cv=none; d=google.com; s=arc-20160816; b=rVJBCKF5mHoBMlAxHLPVdssRu90OWGuaVVHex0JtWTPT19NBoHyM675Hu9FjKxw/3I kJ/2EBG8J8vQHyCMBDoLO0JYUBqWPeK354RTgTBYeDttOfzd6uG1S65UcHUA75FtpTfW /7A3jnMNhiZWO/e+5P4OX2y1k7OSXk2tdKXWys9A0AttcoMfayr0D4dT2v82oshLrhE9 mZtEjClPjUUB5OhojdGRbno7rTymlkJC2OBEHg+1nffIXf2e/3OEwJo3KGUxLjnRb3t9 n948OBHsHE0mwXis7NkeTOVrqZ/o5uRToEtUV7Ao7YGuBndCymDWozFRddrhjf3BlCs3 2TbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=EpOJ0kgIzPen9X4DdUCWX7UpgVw2Jz9BdJqZhDvoEpg=; b=teM7kAh8KIYK1sIJr/Psb67cYlE1lTVmD+SjD6ZYl/zTSO0W+jw+VnwDpySRPR1L3Y XH1uBYhxJRrc8cBTkZPfOsYnfo8P/EKYG3b3q3WuNdfZysEAdffxUqaPzAFXHrjB5Q8f nOAG6kMw/KswJzwUtR/creOcdqnmYNkIaLWyHbI68aRy8WsQry3jROUTpJEOaGfl72aN PGIaEAxQuEXfWzcNqha5DwsegKGFSZYiXtnz8SXC50wvQHVzxmNCNRgTKs5TKV7HhvtZ 0xV/u2nK7QxNfe9qI5lLuMjzdoG8hnagMJsLINYunki6MQ/cMi8Y176s36F985+/LE0K suYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VVj07273; 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 t10-20020a170902e1ca00b001539954464dsi2997493pla.242.2022.03.16.20.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 20:28:20 -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=VVj07273; 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 A12563465E; Wed, 16 Mar 2022 20:26:49 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1356909AbiCPO5d (ORCPT + 99 others); Wed, 16 Mar 2022 10:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346464AbiCPO5c (ORCPT ); Wed, 16 Mar 2022 10:57:32 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C7BDD66AE4; Wed, 16 Mar 2022 07:56:18 -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 76602B81B9C; Wed, 16 Mar 2022 14:56:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F068DC340E9; Wed, 16 Mar 2022 14:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647442576; bh=qqQodrddbOG2kNSyXN0MaEI+Rphq9l9zxCo9YGmpGCo=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=VVj07273ngZHg/dCg+geeWRkBS/WwhTqptxMeYb72lfXqSo2jFoi4dvm8VP76dJG9 iSay+S/X0pDaygtTkSl1nQ8gbP9hW75Qrvv273piCITyiqlyzS6cOGqDQ2536pLpt+ QZe3SKyfcvfNlkblA9+uTsBJBqqMyoLBRf3757ZxWlYqCQUhKtank+rN36qcJ3MZZw QGrN2C/Jo40McV2HCjDjIGb5yT7y0J5PkJhlpz/elAqUm6MRXkxjU5n5dD8ElEyHUR TZr2PVUBNJiywU3eXv6ririiGPCo5J9+1P2ybh/31PDQuotXoXNlg0Yn/uFXfhEMoT ANB1uqSIB+W1g== Message-ID: <30b0991a-8c41-2571-b1b6-9edc7dc9c702@kernel.org> Date: Wed, 16 Mar 2022 08:56:14 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.6.2 Subject: Re: [PATCH net-next 1/3] net: gre_demux: add skb drop reasons to gre_rcv() Content-Language: en-US To: Jakub Kicinski Cc: menglong8.dong@gmail.com, rostedt@goodmis.org, mingo@redhat.com, xeb@mail.ru, davem@davemloft.net, yoshfuji@linux-ipv6.org, imagedong@tencent.com, edumazet@google.com, kafai@fb.com, talalahmad@google.com, keescook@chromium.org, alobakin@pm.me, flyingpeng@tencent.com, mengensun@tencent.com, dongli.zhang@oracle.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Biao Jiang References: <20220314133312.336653-1-imagedong@tencent.com> <20220314133312.336653-2-imagedong@tencent.com> <20220315200847.68c2efee@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20220315215553.676a5d24@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: David Ahern In-Reply-To: <20220315215553.676a5d24@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, NICE_REPLY_A,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 3/15/22 10:55 PM, Jakub Kicinski wrote: > On Tue, 15 Mar 2022 21:49:01 -0600 David Ahern wrote: >>>> ver = skb->data[1]&0x7f; >>>> - if (ver >= GREPROTO_MAX) >>>> + if (ver >= GREPROTO_MAX) { >>>> + reason = SKB_DROP_REASON_GRE_VERSION; >>> >>> TBH I'm still not sure what level of granularity we should be shooting >>> for with the reasons. I'd throw all unexpected header values into one >>> bucket, not go for a reason per field, per protocol. But as I'm said >>> I'm not sure myself, so we can keep what you have.. >> >> I have stated before I do not believe every single drop point in the >> kernel needs a unique reason code. This is overkill. The reason augments >> information we already have -- the IP from kfree_skb tracepoint. > > That's certainly true. I wonder if there is a systematic way of > approaching these additions that'd help us picking the points were > we add reasons less of a judgment call. In my head it's split between OS housekeeping and user visible data. Housekeeping side of it is more the technical failure points like skb manipulations - maybe interesting to a user collecting stats about how a node is performing, but more than likely not. IMHO, those are ignored for now (NOT_SPECIFIED). The immediate big win is for packets from a network where an analysis can show code location (instruction pointer), user focused reason (csum failure, 'otherhost', no socket open, no socket buffer space, ...) and traceable to a specific host (headers in skb data).