Received: by 2002:a05:6a10:87d6:0:0:0:0 with SMTP id g22csp575039pxr; Mon, 11 Apr 2022 01:19:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztAkFVxfPa4hz07k9xqhkQlnyblDBFefY/0OLZyxIx9UVna31y/Wp6KwZUgjwKzosSB+z0 X-Received: by 2002:a63:d842:0:b0:398:f14c:f86b with SMTP id k2-20020a63d842000000b00398f14cf86bmr25721281pgj.216.1649665153497; Mon, 11 Apr 2022 01:19:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649665153; cv=none; d=google.com; s=arc-20160816; b=JqMvRAkovrc6JkHP15ntp5lylb5vndGue7/G74nid0+arq33QcrFmgRL3xJlH3Pstl VAIdlsScTsaJ8OwoRhkBLnPmln3vRQ1K5Ps2FQ00bnzfwBDhuKYbur1I5IiJWUPhO3gV OPNWbXrWRplgbxpgRScktKm+EESdFbfhz23c4qOF7O8M9mW0MeU4KbmijGokeFsj+NxK hEbjaLyFZ6E+/RzLsO3HjMr9itCXLMwTIbWO86ScxwwRI7+hruJm6s2LSg+1OrIThXzz G0kC0HBiCFbVfM6lPVB7JvoTPEUh8cPXHIZLx2DiISi+z+nVX7X6lelZVgpXW5zOc2tJ nS7Q== 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=MwT66OTKltbZMwgHX4nqox5JAQt5FZEjkwefedCS/PI=; b=p0wBZpZKEYrgK3LliNyurB08xK27lu3BM6a05I7OyIEFg+/R/ZFsYyCWEqHGqreVpI osqlnAzLmuZeXIAng4nXn3RydtDpw/SfnpCDdjUBz8fLLmwEL3tuAxoQLc75vMfpx/g7 +2xojQIwBEiOvJxPVU8uzGjgGvx/WBlvt5MLuSH5csSiXn/zwjDeAG93HNnzUGHQfM9b 4Sazj2sO+BMylQxiP3ctZpv+XCTZlyoOrk3xWwrxUp1w/B09L/kJSYJTnW7/F8y1FLOy KVNxwVqXVOMhktN8Aj1G3liEPgTrdfm7W2XWncgEaxZpVnwHYMc5alwhTi1hAomJZrHE W4Yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Wm6J5gAZ; 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 r145-20020a632b97000000b00398b859041esi8971856pgr.255.2022.04.11.01.18.58; Mon, 11 Apr 2022 01:19:13 -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=Wm6J5gAZ; 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 S239680AbiDIDwE (ORCPT + 99 others); Fri, 8 Apr 2022 23:52:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53290 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231553AbiDIDwD (ORCPT ); Fri, 8 Apr 2022 23:52:03 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B04D71DA5E; Fri, 8 Apr 2022 20:49:57 -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 4AE77622C4; Sat, 9 Apr 2022 03:49:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 63957C385A8; Sat, 9 Apr 2022 03:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1649476196; bh=Qwq9S4OmRjUWa0BGRlb24xrLBmmP4CFvVpb7WkE+qyE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=Wm6J5gAZJijPEttNW0lkFvt+hNB3qIZOWodrnYEIRTMJKiejqb11P4x+gztK9cERk kglOSP0OeXVhPep8B0XZxa2Q+7I8+3jurIOwPoBZUflCwYeA4MEFSn3oCda/i9GWfe ZtBXZ/cIWnPXt8j4Z8Rp8gvkREAsIpq3N4wsj6CvCw+faWBjcACI5Sa0SWPXozPTWX lh2f++bfnNz6BOE6l6aOdKKVmQNIJ2UsgC/dECJZYIPA7CPJn4fOJdydVLbud+SAD6 hLiPyWZmUZOoDulmLS2ErCnoYYEMF9SPj0+cWFiMJJfwL016aIbUe33CZC6alDBtn5 SPQ6pWsmb+H4Q== Message-ID: <94414a48-f8d3-aa20-0d82-930043a3d4cd@kernel.org> Date: Fri, 8 Apr 2022 21:49:54 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH RESEND net-next v5 1/4] net: sock: introduce sock_queue_rcv_skb_reason() Content-Language: en-US To: menglong8.dong@gmail.com, kuba@kernel.org, pabeni@redhat.com Cc: 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, benbjiang@tencent.com References: <20220407062052.15907-1-imagedong@tencent.com> <20220407062052.15907-2-imagedong@tencent.com> From: David Ahern In-Reply-To: <20220407062052.15907-2-imagedong@tencent.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 4/7/22 12:20 AM, menglong8.dong@gmail.com wrote: > From: Menglong Dong > > In order to report the reasons of skb drops in 'sock_queue_rcv_skb()', > introduce the function 'sock_queue_rcv_skb_reason()'. > > As the return value of 'sock_queue_rcv_skb()' is used as the error code, > we can't make it as drop reason and have to pass extra output argument. > 'sock_queue_rcv_skb()' is used in many places, so we can't change it > directly. > > Introduce the new function 'sock_queue_rcv_skb_reason()' and make > 'sock_queue_rcv_skb()' an inline call to it. > > Reviewed-by: Hao Peng > Reviewed-by: Jiang Biao > Signed-off-by: Menglong Dong > --- > include/net/sock.h | 9 ++++++++- > net/core/sock.c | 30 ++++++++++++++++++++++++------ > 2 files changed, 32 insertions(+), 7 deletions(-) > Reviewed-by: David Ahern