Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp3584275iob; Tue, 17 May 2022 03:15:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxpXbfFGmTDJumRjq4nmn14ULOGeptaka3CQ2iVv2cxRkGbSQNreHJjp+qSwHN+66NpkXeZ X-Received: by 2002:a17:902:efce:b0:161:65bc:4d17 with SMTP id ja14-20020a170902efce00b0016165bc4d17mr11884608plb.40.1652782503674; Tue, 17 May 2022 03:15:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652782503; cv=none; d=google.com; s=arc-20160816; b=Xyt/x9YhsVQ7Zam3J6dNe/V9uVnM7GA5JMmm5lMVP3gSCG7e/ci4I9B1VzBfft/UBh H0VyBaP/3GjYBWumx9gKIflQrvFGo3gfSZoOrk+KtWI8jpudgucM3ciAwmlYkMiA+84n TkFl3Zj4ta+P7W5rf8rQ81k+qM8ZJCYqgJ0IeZLfv8qZ0Fpi4o9X/xz1onpPw90WI3fC 0dP0AWoEKATOd4cbvhUuK1jBc5oWK9LrbkdCq58t8LATgr/JoZzlc+A0CKCm0KUv2OS3 rlLkUDxMIZCc85uvXdeoF9B0KrMMDrp0fiVULFy27AtHA+IkmijIEFcDuMQW057XEV21 x7sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version; bh=jPQFtYFnkUNGuidipY9/4Xq9kjAM7R+8aIy4o0H0O2s=; b=epfhO/7pj5CQYv4pqaPOXfb30P633hSo8K0t9xiSdeZfHTMkFK84y9ssK5gN19o3Q6 GsAqXvkPDce6XxZSLDB/cf5bccHMx6UaHa7FFhRYuZMKr0XHJC2nikj6DjnBkcAqxx0j rxEJ4X8uAT/85Ks94BNWVYmuy2dWXpkOFedhQO0X/VT5LUh48d2IM65P4ZVruQCOyYmM 6DcgGRx2FD+izpDYWishODaT5sQVPb5dmmCTjpHFIwZtB5MuyVcjho3BCrSUCRwTGSuM t1eNTmgWbWV0jnPMzVlzLYPccnTNuu6iTu1vuIpGaOnUbByZ9Itn7CVf5rPiUHUlyGLO CxfQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r36-20020a634424000000b003c177b5f338si15356953pga.375.2022.05.17.03.14.51; Tue, 17 May 2022 03:15:03 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235338AbiEQBub convert rfc822-to-8bit (ORCPT + 99 others); Mon, 16 May 2022 21:50:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44858 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229881AbiEQBu3 (ORCPT ); Mon, 16 May 2022 21:50:29 -0400 Received: from mail-yb1-f179.google.com (mail-yb1-f179.google.com [209.85.219.179]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2282827CEF; Mon, 16 May 2022 18:50:28 -0700 (PDT) Received: by mail-yb1-f179.google.com with SMTP id d137so10929718ybc.13; Mon, 16 May 2022 18:50:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=HAQnHQkvvpfj4UWRUX9L3RaXSVUszfpcXLBvvM7+tw8=; b=wQ/ypxNrN/iFv/cYUPJTwpSSUQfSVV4XBxNYHrhMzbE6qeig8gfdHPWrdmflUMrSvT 0ztNqrzrKLF0el2nmh499EWRDRcPesDezAMatL4pBxTPhk7Lc7Qe2t4Um0DqdEhZSB1s cuBdsqbyHNFh9QJod8aQv8qBFaw4gNPqXDyTSgtPORFDtsCntfvj76iq8lOD87f1LLIV JPto/tFGLu4KgaxbbeHy/TLyYgObXcedowQx6gdsiBnmo09PYLvPKO341TiEXcoE9EJB NfHqak5lHXt4r+qts9DDjRWYMbNAmLeK6yECp9Vd2JrjBVRbAv4tvts8N1HB7E+B0uJH zqbQ== X-Gm-Message-State: AOAM5336sowx5yL7EB8UAqb9kAGx2qftzWKkUGIXgB3dyE8O/v/mUCM/ DhAuFMh2zeQvzJ+zw29jjTli8WPpt4+ZStvNkSg= X-Received: by 2002:a25:e093:0:b0:64d:6c85:6bc6 with SMTP id x141-20020a25e093000000b0064d6c856bc6mr12326409ybg.500.1652752227297; Mon, 16 May 2022 18:50:27 -0700 (PDT) MIME-Version: 1.0 References: <20220513142355.250389-1-mailhol.vincent@wanadoo.fr> <20220514141650.1109542-1-mailhol.vincent@wanadoo.fr> <20220514141650.1109542-4-mailhol.vincent@wanadoo.fr> <7b1644ad-c117-881e-a64f-35b8d8b40ef7@hartkopp.net> In-Reply-To: <7b1644ad-c117-881e-a64f-35b8d8b40ef7@hartkopp.net> From: Vincent MAILHOL Date: Tue, 17 May 2022 10:50:16 +0900 Message-ID: Subject: Re: [PATCH v3 3/4] can: skb:: move can_dropped_invalid_skb and can_skb_headroom_valid to skb.c To: Oliver Hartkopp Cc: Marc Kleine-Budde , linux-can@vger.kernel.org, linux-kernel@vger.kernel.org, Max Staudt , netdev@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Oliver, On Mon. 16 May 2022 at 04:17, Oliver Hartkopp wrote: > Hi Vincent, > > On 14.05.22 16:16, Vincent Mailhol wrote: > > The functions can_dropped_invalid_skb() and can_skb_headroom_valid() > > grew a lot over the years to a point which it does not make much sense > > to have them defined as static inline in header files. Move those two > > functions to the .c counterpart of skb.h. > > > > can_skb_headroom_valid() only caller being can_dropped_invalid_skb(), > > the declaration is removed from the header. Only > > can_dropped_invalid_skb() gets its symbol exported. > > I can see your point but the need for can-dev was always given for > hardware specific stuff like bitrates, TDC, transceivers, whatever. I also see your point :) Actually, I raised the exact same idea in a previous message: https://lore.kernel.org/linux-can/CAMZ6RqLU-Wg0Cau3cM=QsU-t-7Lyzmo1nJ_VAA4Mbw3u0jnNtw@mail.gmail.com/ But you were not in CC and it seems that there is a lot of congestion recently on the mailing list so I wouldn’t be surprised if you tell me you did not receive it. > As there would be more things in slcan (e.g. dev_alloc_skb() could be > unified with alloc_can_skb()) And also the can_{put,get}_echo_skb() I guess. > would it probably make sense to > introduce a new can-skb module that could be used by all CAN > virtual/software interfaces? > > Or some other split-up ... any idea? My concern is: what would be the merrit? If we do not split, the users of slcan and v(x)can would have to load the can-dev module which will be slightly bloated for their use, but is this really an issue? I do not see how this can become a performance bottleneck, so what is the problem? I could also argue that most of the devices do not depend on rx-offload.o. So should we also split this one out of can-dev on the same basis and add another module dependency? The benefit (not having to load a bloated module for three drivers) does not outweigh the added complexity: all hardware modules will have one additional modprobe dependency on the tiny can-skb module. But as said above, I am not fully opposed to the split, I am just strongly divided. If we go for the split, creating a can-skb module is the natural and only option I see. If the above argument does not convince you, I will send a v3 with that split. Yours sincerely, Vincent Mailhol