Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1305080pxu; Fri, 16 Oct 2020 08:47:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwocxhed1HiyH9GNQJpgH1i0a1mTBEAxFjW336ZtvlfQQ/Nid/LJ4fQSY+rwf0Lh6BimnsP X-Received: by 2002:a17:907:2079:: with SMTP id qp25mr4508561ejb.347.1602863273552; Fri, 16 Oct 2020 08:47:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602863273; cv=none; d=google.com; s=arc-20160816; b=AcQn/emRzlkkIfxNY40x26gYGNWcE+AJuVP63sL0J+bDimahUiiQyYVxVtkHhjqV9Y 51bV9HsDPN0hwIpdyNSKCtqwdudjgJlLPSxLIwZqfx4W0CmybC4ZXOT/EBQ1mDN8jKvb tFF2XcDvQlm6nz3x7mHUSn8O8+O+xGPpJqV9J2Aa4Fr+2pX+ZOSIdI2lGrFmHtQMKpiB 8VnJxE3lQ3x3DhnrimXtG5UsRQe/e+p9G1RkQyV4H/azvtXWf3NpHoIJgA/HObEp2ZZy i0Bx1LYKfc7Dj3BKLC2+VgT6SUXMiRFSKwMzoH/MPWGI8/vNpquO/lmG+SUAKy5RdSIv QKWA== 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=ILU1JiiWwmc95Pb/WWnMrCIUzuQZgL65VpWvlyy0uws=; b=cBBZpcFw6mC0LCQCnD/EvCSwH0rOpgpJesZ5YyVsOglBODTEl4ct/X2z1qxQ69dsbr R1BEoqdtfAKQ6imuMqpCkjmRTQbQiE6WbKbz6V/l+KAZn4XhXgy8Kmo/SVRRgBoxWrWb KMAXW5bsPaCB8elOtndCQLe7dZ7nxy2RB6DZB0uaFUFnbhPUmERDtpZxPNEvMnVfs5pw WVQnFCtyZvVZkiWRccMNioPkk2LLxz2XTajOixDzANnDL9mxSm470B0vX72+ReGDn0Ln 6Hn3YgXMbn4fxAkYtxUX9fuMklPJ+unHKwrQF/vZFLqOCts/QezIZl1su/qPoZb0DGbh /PGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=HEPkXoSC; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d4si1960261edr.173.2020.10.16.08.47.15; Fri, 16 Oct 2020 08:47:53 -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=@google.com header.s=20161025 header.b=HEPkXoSC; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2408779AbgJPOU4 (ORCPT + 99 others); Fri, 16 Oct 2020 10:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2408770AbgJPOUz (ORCPT ); Fri, 16 Oct 2020 10:20:55 -0400 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FA7BC0613D3 for ; Fri, 16 Oct 2020 07:20:55 -0700 (PDT) Received: by mail-il1-x144.google.com with SMTP id p9so2874576ilr.1 for ; Fri, 16 Oct 2020 07:20:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ILU1JiiWwmc95Pb/WWnMrCIUzuQZgL65VpWvlyy0uws=; b=HEPkXoSC4+XViOa2NstBZBi5peIDrb80Thy9EpYPPQFO80kSOluTlFVunJ9q7XLi41 PPqK2THj7pyPrLghVLfFynw1npRcrsx6jx0Wgrfgyqg2brX8ZvopZSU7YSdH/0LkVpDO JDE22r1UgDghP9r57+WICgOjhnO4KERaBTDhCVUqUaqDquxzefiNcEqHITD9Mjmgv5b5 40IbFKVTza9Er2Gz15cRfaJF4YHhV8o59A792eqKJ7sq/2zyOuZ7e5fpSaA3CJyWm7DS 7srxW9LYUi2hOcy39d6X4sgQNR4S94gbsuLgztiZqFFOuee8yzBElhn/1AHSiVKSaaxD Ewrg== 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=ILU1JiiWwmc95Pb/WWnMrCIUzuQZgL65VpWvlyy0uws=; b=PmRuj1rM+hTO8Nz+U/ieiMWHxK/mwscEZpA2aAfzE1oGXID+kNIDpCFWt1HDE3bFcu bKEJ32ivP4vaIKuStE4UZIaovrPprVORcrr7XyXaqCmEPwjubRV71vfEJnYOtGOXRVig LZoP0aXWsQ4pPFMtcswgYYO6WZsjEl+t80irmoY/Q9kFZ2kT7z77sgulDwmpjQ184Hyq nWINGCBh2qVgqkMU9kc59tMugChOzoxtWpEAYr07DCaKwqdjflM4iFTXTsFnSrcq15SB P4AQsNgM8Igp+wMbvc9oCCkKsfcRmvg0Q4/s9zGLyPrmehMNqEVowv95dCyxoALkEiHr dFLw== X-Gm-Message-State: AOAM530cIIpdecbvI3jjRtU122wZHyBzjjhnRY6wl3coowf2AzgtfLha lE9q5vEXxwN92CSHP4txSSWQXy7ChdttMU6WGDJJ612RUkDApbEb X-Received: by 2002:a92:8404:: with SMTP id l4mr3069053ild.134.1602858054317; Fri, 16 Oct 2020 07:20:54 -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: From: Aleksandr Nogikh Date: Fri, 16 Oct 2020 17:20:42 +0300 Message-ID: Subject: Re: [PATCH 1/2] net: store KCOV remote handle in sk_buff To: Willem de Bruijn , Jakub Kicinski Cc: Aleksandr Nogikh , Dmitry Vyukov , David Miller , Johannes Berg , Eric Dumazet , Andrey Konovalov , Marco Elver , LKML , netdev , linux-wireless , Florian Westphal Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, Oct 15, 2020 at 10:04 PM Willem de Bruijn wrote: > > 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. Thank you all for your comments. I'll use skb extensions in v3 of the series.