From patchwork Mon Mar 13 21:42:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Lobakin X-Patchwork-Id: 70751 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp434921wrt; Thu, 16 Mar 2023 04:52:38 -0700 (PDT) X-Google-Smtp-Source: AK7set/sYgbqZsc+2RD/mRpEaTALGwsrMJCSURcMtTowjnfWJqEvXCosEF4p2HyfcIW4yffnODoU X-Received: by 2002:a17:90b:180b:b0:237:62f7:3106 with SMTP id lw11-20020a17090b180b00b0023762f73106mr3407391pjb.17.1678967558189; Thu, 16 Mar 2023 04:52:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678967558; cv=none; d=google.com; s=arc-20160816; b=U4a8BPhJ66OO+dFG+5DKoufi/RLa8tL2oSC+BrDIxkTPdOp+KMDTh1VFvEPsgadjpv akcrj0yMA243FzKwEMf30ChD0Z2YWV2kJKl8NaJpFKRGnPM0vo5fy/IVpm+S0h+pJ2AY ErWNtnFABP3UBuQ6VnAApbGuneLzu1uNnn+2l2cq0Qq5f0Wx9pZdQk/4kVxY5LYprXKG e6GY6fkp+JaVX8CL9cZMYuTv9qpoGbY21bZk1PSRMNOWPx19PvQmRgmcJrgqQnC0S8FX C6vKK/ZuHbZO0h/W+YH4OOwOR+dUz/mXebN/ESrLsqkicMMK6gf5CTU3JCIYAaUG3+8Y 0V3w== 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:date:subject:cc:to:from :dkim-signature; bh=CErF05Pxkbg8TlBX5rNA+1nEY6eFFfwq5DTottbupX8=; b=XGri2gWws5vkZI5l+bCm/Wn0DkGyO+kPD9GoOFGynWxp8ye+N+1H+IyXWdqCw7Uut6 3ofQSrcHbskn3a3eOIPcK1xAnP2eCKEwvObRPNq3aN4LwX2wvpUkZkjTBhW/UYRSNimQ Hv9rdeV8eJe94b36g0iHRsH7136zmibZtLOX467HW8E1QA7UWhvashWbbcHkuX6/Lkz4 IWeS1LD4oAUS5yH5qeAUF5AeuEbJosy1A/iYN5twFzzpHq9ceY1xczBMeJVoirchFH4z 9kTlJr8qxoZk6Vd7N6w/eKwXQEZnJt647Y99ign1ImhdnEYHSAURyyurNgbya9vFci8v 5b7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="a/AEq4Cs"; 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=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w1-20020a17090abc0100b00233cea2dab8si4535144pjr.121.2023.03.16.04.52.20; Thu, 16 Mar 2023 04:52: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=@intel.com header.s=Intel header.b="a/AEq4Cs"; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230373AbjCPLhv (ORCPT + 99 others); Thu, 16 Mar 2023 07:37:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58292 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229729AbjCPLhl (ORCPT ); Thu, 16 Mar 2023 07:37:41 -0400 Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BEA6C97DC; Thu, 16 Mar 2023 04:37:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1678966649; x=1710502649; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=g5nPL1hfwFccNcFtYw7ZevITqww5GF47MwYYKvo0Lf4=; b=a/AEq4Cscfqgxmz08a7zmzea0EubpN0ZZRQIa5pPPSi0Md9JhfL18j+g RaBDANv+KTESvwdlx8vuZyyo59KAfH0evXjlLh7gnEvhEGaVb+x2HGmH7 +k0A2LGl8onP63xjtFUgzSaE07p84Kd+mams/bTgc9Eo28HRTWuQ3NlFx 7pE7CNeJeQyCuydTaDOZ4HkT5m4qbZCXuhJk73vD8voZoiA0Vi9NDE+9+ +Hn4GtAK+lXirZh/3+X3yBACRWL3OqNLfPMdb6rrWbAuIq0JGHcXGUEGC sHe4C2w+g+Jru4SG26k/rOG4ep3Tb2MGVfnmgw5+gza16FE/5OJ9Zs7bf Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="340320609" X-IronPort-AV: E=Sophos;i="5.98,265,1673942400"; d="scan'208";a="340320609" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2023 04:37:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10650"; a="1009190188" X-IronPort-AV: E=Sophos;i="5.98,265,1673942400"; d="scan'208";a="1009190188" Received: from irvmail002.ir.intel.com ([10.43.11.120]) by fmsmga005.fm.intel.com with ESMTP; 16 Mar 2023 04:37:18 -0700 Received: from newjersey.igk.intel.com (newjersey.igk.intel.com [10.102.20.203]) by irvmail002.ir.intel.com (Postfix) with ESMTP id 7800D4FEA2; Mon, 13 Mar 2023 21:44:01 +0000 (GMT) From: Alexander Lobakin To: Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau Cc: Alexander Lobakin , Maciej Fijalkowski , Larysa Zaremba , =?utf-8?q?Toke_H=C3=B8iland-J?= =?utf-8?q?=C3=B8rgensen?= , Song Liu , Jesper Dangaard Brouer , John Fastabend , Menglong Dong , Mykola Lysenko , "David S. Miller" , Jakub Kicinski , Eric Dumazet , Paolo Abeni , bpf@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, kernel test robot Subject: [PATCH bpf-next v3 2/4] net: page_pool, skbuff: make skb_mark_for_recycle() always available Date: Mon, 13 Mar 2023 22:42:58 +0100 Message-Id: <20230313214300.1043280-3-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230313214300.1043280-1-aleksander.lobakin@intel.com> References: <20230313214300.1043280-1-aleksander.lobakin@intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760525086471212921?= X-GMAIL-MSGID: =?utf-8?q?1760525086471212921?= skb_mark_for_recycle() is guarded with CONFIG_PAGE_POOL, this creates unneeded complication when using it in the generic code. For now, it's only used in the drivers always selecting Page Pool, so this works. Move the guards so that preprocessor will cut out only the operation itself and the function will still be a noop on !PAGE_POOL systems, but available there as well. No functional changes. Reported-by: kernel test robot Link: https://lore.kernel.org/oe-kbuild-all/202303020342.Wi2PRFFH-lkp@intel.com Signed-off-by: Alexander Lobakin --- include/linux/skbuff.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index fe661011644b..3f3a2a82a86b 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h @@ -5069,12 +5069,12 @@ static inline u64 skb_get_kcov_handle(struct sk_buff *skb) #endif } -#ifdef CONFIG_PAGE_POOL static inline void skb_mark_for_recycle(struct sk_buff *skb) { +#ifdef CONFIG_PAGE_POOL skb->pp_recycle = 1; -} #endif +} #endif /* __KERNEL__ */ #endif /* _LINUX_SKBUFF_H */