Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp732774pxu; Thu, 15 Oct 2020 15:20:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/1MymCVX9TNzBQ9+r/Bat7zWeBvWr5/d4tQjxYfIEn17TXIvNQtHdwc4cNmE8AjY+/QAD X-Received: by 2002:a17:906:6a07:: with SMTP id o7mr551218ejr.454.1602800446254; Thu, 15 Oct 2020 15:20:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602800446; cv=none; d=google.com; s=arc-20160816; b=R1AXv30uQcmp8UF0/OgvA70KSq5gXshBgVb1lvwp7HYN4qpwy7Gvvh6ToADGybXxcK jtXrzJBU1WoCrSSVOpbrwWwhCoRwqBYFcTQp7/q2LxlxywLYxsVC7lk9JEJthDTvnxul svV2e4ObXpELHl4ZuvHUUGePcpx2e5oZIWPIK1qsKvZcC3haVsPsJaf0VGVvgdEcWxZk KCNibMkeVg9U68WHGl7Hyb3UFR1yiKM5SYIbjRObmEMgRVnuS/LymM80rELP3+Y8SfRr fj7Z5xTlRiK8f6Q8MfCAiuyNNNVUqLXMAy+Q7GxUIw8YUbqf59t9tVS1u1I0UMkdpzzm Q9Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=FsqHAs58x4trJhhHbsTmRDV/y8bm/KqBtxUEW7L/rUE=; b=OtXHcUSFdIZCFpiTUWRKh9AJVMvNXnq33vr81zDKr5kD5XITcWmPxDx3gXIjexDpIt mvuMXTEJAsWqtXWO6CYRAX1t2vVPKuBqjYxuLPLOKpK7Y12IiLHHMWq0Ogcwv3zxNVoM /5aLU6ygqvSiAHF14ACWhoc81vv9iBEL8Wy12i4Rm8yr3RPuiFy/o5UVOrqppawNwkR5 TNlVR0rGBgb0bjSmm/ttINhQLeKvUk0MvsNKtbLJcM1O0XqkL4WNiAFCRG4aVLAzXWvx SMBGQr1Ynk/MlMb/IGV7L66iyeAqElN9bibrc+8cStAijwNaMvQYRd7V8ii8biFNtKp5 K2uA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YNNWaoUt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cb11si207070edb.274.2020.10.15.15.20.10; Thu, 15 Oct 2020 15:20:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=YNNWaoUt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391455AbgJOTEy (ORCPT + 99 others); Thu, 15 Oct 2020 15:04:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730089AbgJOTEx (ORCPT ); Thu, 15 Oct 2020 15:04:53 -0400 Received: from mail-ua1-x944.google.com (mail-ua1-x944.google.com [IPv6:2607:f8b0:4864:20::944]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF335C0613D2 for ; Thu, 15 Oct 2020 12:04:52 -0700 (PDT) Received: by mail-ua1-x944.google.com with SMTP id t15so1136272ual.6 for ; Thu, 15 Oct 2020 12:04:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=FsqHAs58x4trJhhHbsTmRDV/y8bm/KqBtxUEW7L/rUE=; b=YNNWaoUtxTP/GIofNOCaOHVKhI6pyeffEbAmx886qQVLDGA3jsArPDvJf/qbzSWmCc C5JfSYJSVtYWs6UJQCeHi99QiHWdoFYMYViyrs4GkHdbebB9lvRoT5MsmnuVEbrv5sQ5 xyBdn1KZD+RztL6gagqXOC5GBULxTxnMWP+g3mewAA2K+kcEaPCupv4dBfWaESKTZ0q4 F/jljeAcNeIyh+7o++HQGpupYtGu3HVDJc3LL7YW5gHdbei4cJBlby+rSSR2WQbMITIL Y200lB9YcKNGyyeCJEg3TIV4W7HQoW+8SvWycOmJ5NiqvujbAt6k1iobSf04Y5uPkCOq SULw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=FsqHAs58x4trJhhHbsTmRDV/y8bm/KqBtxUEW7L/rUE=; b=fuaZtU15QX1GWPNxLhb5HeNvbacBI8Ir3r4NYbFukAZFhGJBAk+b6euw2Vl1lq8xE3 CMGRljlqGfgQxTgh9LiWlU4bgG6HluHLTsuXSZpOPZSZ4ViTJxkFwRhggFBvTZDtQHun j5Rd7AXd4tl9W5CUpg68Umh9UlXr9iyhQmIF4Y+pgkg7wAJXJWp3mhTKhAJ72ZR5CzpE f37MnUVMfW2wON1cfTudm2onT8Cvzuv/oAqo3BIL0j0gRSA+9aOC6JLCFzT+jdyHvAxH 7rNMRoZ4iwRHf8qavEqWWhSFIkonaOukukR9+tTfF1eSIB4G+GSm6BeaQiNtda8rlfZ/ cgHw== X-Gm-Message-State: AOAM533UENAQftYineD6BePvVggCXcWsSKA2p2L2SanxWK1Pt1vpF2du miTsAkup/85aHHFydAjw6sAqAMDOMJQ= X-Received: by 2002:ab0:384a:: with SMTP id h10mr76019uaw.132.1602788690075; Thu, 15 Oct 2020 12:04:50 -0700 (PDT) Received: from mail-vs1-f43.google.com (mail-vs1-f43.google.com. [209.85.217.43]) by smtp.gmail.com with ESMTPSA id l23sm15466uap.7.2020.10.15.12.04.48 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 15 Oct 2020 12:04:48 -0700 (PDT) Received: by mail-vs1-f43.google.com with SMTP id r1so44898vsi.12 for ; Thu, 15 Oct 2020 12:04:48 -0700 (PDT) X-Received: by 2002:a67:d84:: with SMTP id 126mr3522829vsn.51.1602788688034; Thu, 15 Oct 2020 12:04:48 -0700 (PDT) MIME-Version: 1.0 References: <20201007101726.3149375-1-a.nogikh@gmail.com> <20201007101726.3149375-2-a.nogikh@gmail.com> <20201009161558.57792e1a@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201010081431.1f2d9d0d@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> <20201013095038.61ba8f55@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> In-Reply-To: <20201013095038.61ba8f55@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com> From: Willem de Bruijn Date: Thu, 15 Oct 2020 15:04:11 -0400 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] net: store KCOV remote handle in sk_buff To: Jakub Kicinski Cc: Aleksandr Nogikh , Dmitry Vyukov , David Miller , Johannes Berg , Eric Dumazet , Andrey Konovalov , Marco Elver , LKML , netdev , linux-wireless , Aleksandr Nogikh , Florian Westphal Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Tue, Oct 13, 2020 at 12:50 PM Jakub Kicinski wrote: > > On Tue, 13 Oct 2020 18:59:28 +0300 Aleksandr Nogikh wrote: > > On Mon, 12 Oct 2020 at 09:04, Dmitry Vyukov wrote: > > > > > > On Sat, Oct 10, 2020 at 5:14 PM Jakub Kicinski wrote: > > > > > > > > On Sat, 10 Oct 2020 09:54:57 +0200 Dmitry Vyukov wrote: > > > > > On Sat, Oct 10, 2020 at 1:16 AM Jakub Kicinski wrote: > > [...] > > > > > > Could you use skb_extensions for this? > > > > > > > > > > Why? If for space, this is already under a non-production ifdef. > > > > > > > > I understand, but the skb_ext infra is there for uncommon use cases > > > > like this one. Any particular reason you don't want to use it? > > > > The slight LoC increase? > > > > > > > > Is there any precedent for adding the kcov field to other performance > > > > critical structures? > > > > It would be great to come to some conclusion on where exactly to store > > kcov_handle. Technically, it is possible to use skb extensions for the > > purpose, though it will indeed slightly increase the complexity. > > > > Jakub, you think that kcov_handle should be added as an skb extension, > > right? > > That'd be preferable. I understand with current use cases it doesn't > really matter, but history shows people come up with all sort of > wonderful use cases down the line. And when they do they rarely go back > and fix such fundamental minutiae. > > > Though I do not really object to moving the field, it still seems to > > me that sk_buff itself is a better place. Right now skb extensions > > store values that are local to specific protocols and that are only > > meaningful in the context of these protocols (correct me if I'm > > wrong). Although this patch only adds remote kcov coverage to the wifi > > code, kcov_handle can be meaningful for other protocols as well - just > > like the already existing sk_buff fields. So adding kcov_handle to skb > > extensions will break this logical separation. > > It's not as much protocols as subsystems. The values are meaningful to > a subsystem which inserts them, that doesn't mean single layer of the > stack. If it was about storing layer's context we would just use > skb->cb. > > So I think the kcov use matches pretty well. skb_extensions was the first thing that came to mind when I read this patchset too. It is not specific to protocols. We have long stopped growing sk_buff size.