Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3127930pxb; Mon, 16 Nov 2020 06:34:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJziJwGn9guZEacPcC8bEkA9Q6U/GU2eem5QvxYbpmQPxTiZRTMlvLaLbo8coychCv3BFzz4 X-Received: by 2002:a17:906:7190:: with SMTP id h16mr14359238ejk.221.1605537259964; Mon, 16 Nov 2020 06:34:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605537259; cv=none; d=google.com; s=arc-20160816; b=JvIa5yDwFa8AMj3+R6xYBrptdEktiFDwNOxM0jG/zABghYOKlS/KgYIxmbrxxvXkgO cvWpxaAD0J3MlvRNZsSyEPFXLOG1QR+jGKanlDpjqCTPLY2g3gkxABGiroihZ53gLe2o nFEyif8Wfg01tioyeJGWRDxePSDVCnd3/4idmDDh5g9uKA+SMqSK5QyPdwHsFnQDQvCm 3tl8zMU+BN6FKtMBY3R21S6uOqGdMGuB1dE7wuZfpNJ50T5Zg69ePk067V2mhrkcyzIT Nmy/fDMhrYKxnxTHjZwCdf1HTEdh9j0U8lCWpMax0DYtD+GxxP8qM9ZjsqjgV12DvUXT Tx5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=VfyNgZqCG+DPEgrIRDNvP34L63zstYpMKi+Zz7mZJ/8=; b=joCSXD6j4m5ho+WqHExEKHxZ7zFxnd46ua2HKnDIqEX3wkH1VXU5AMx1voriVAAzG/ VkJeMVHjPWdiQ7SuQUmJnw9dxCcIuIURAZrDu6tB2mD5Xlm8QjH45PK2NtREhJktA3pm O7C9pmdCNt3HrCJbgLvyrX4uMsP5bDZ1XmgGhBxVJWjd9PTonpan2c/ZiY7Ni2IV+x1E +TjYygqloA3gcxEcu0Z4oyqE9YwC3mb02WgNUg07x0OCUn/cM4oPVrWV2oRtP6qZs8cY vXixImoU8qC3F+H4/VxSY0xzJnfXKImUlCR/RCMNAbxuhTZnGhbllOuQTmS+Ouy9KC4x 5t5Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l4si12052989edt.49.2020.11.16.06.33.56; Mon, 16 Nov 2020 06:34:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730053AbgKPOb3 (ORCPT + 99 others); Mon, 16 Nov 2020 09:31:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729614AbgKPOb3 (ORCPT ); Mon, 16 Nov 2020 09:31:29 -0500 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4700DC0613CF; Mon, 16 Nov 2020 06:31:29 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1kefXN-0006id-9l; Mon, 16 Nov 2020 15:31:21 +0100 Date: Mon, 16 Nov 2020 15:31:21 +0100 From: Florian Westphal To: Matthieu Baerts Cc: Randy Dunlap , linux-kernel@vger.kernel.org, kernel test robot , Aleksandr Nogikh , Willem de Bruijn , Jakub Kicinski , linux-next@vger.kernel.org, netdev@vger.kernel.org, Florian Westphal Subject: Re: [PATCH net-next v4] net: linux/skbuff.h: combine SKB_EXTENSIONS + KCOV handling Message-ID: <20201116143121.GC22792@breakpoint.cc> References: <20201116031715.7891-1-rdunlap@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Matthieu Baerts wrote: > > --- linux-next-20201113.orig/include/linux/skbuff.h > > +++ linux-next-20201113/include/linux/skbuff.h > > @@ -4137,7 +4137,6 @@ static inline void skb_set_nfct(struct s > > #endif > > } > > -#ifdef CONFIG_SKB_EXTENSIONS > > enum skb_ext_id { > > #if IS_ENABLED(CONFIG_BRIDGE_NETFILTER) > > SKB_EXT_BRIDGE_NF, > > @@ -4151,12 +4150,11 @@ enum skb_ext_id { > > #if IS_ENABLED(CONFIG_MPTCP) > > SKB_EXT_MPTCP, > > #endif > > -#if IS_ENABLED(CONFIG_KCOV) > > SKB_EXT_KCOV_HANDLE, > > -#endif > > I don't think we should remove this #ifdef: the number of extensions are > currently limited to 8, we might not want to always have KCOV there even if > we don't want it. I think adding items in this enum only when needed was the > intension of Florian (+cc) when creating these SKB extensions. > Also, this will increase a tiny bit some structures, see "struct skb_ext()". Yes, I would also prefer to retrain the ifdef. Another reason was to make sure that any skb_ext_add(..., MY_EXT) gives a compile error if the extension is not enabled. > So if we think it is better to remove these #ifdef here, we should be OK. > But if we prefer not to do that, we should then not add stubs for > skb_ext_{add,find}() and keep the ones for skb_[gs]et_kcov_handle(). Yes, exactly, I did not add these stubs because I could not figure out a case where an empty skb_ext_{add,find} would be wanted. If your code calls skb_ext_add() but no skb extensions exist you forgot a SELECT/DEPENDS SKB_EXTENSIONS in Kconfig & compiler error would tell you that.