From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21D41C433F5 for ; Tue, 7 Dec 2021 16:37:43 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D5E1F6B00A4; Tue, 7 Dec 2021 11:37:25 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id D0C896B00A5; Tue, 7 Dec 2021 11:37:25 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BADC16B00A6; Tue, 7 Dec 2021 11:37:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0197.hostedemail.com [216.40.44.197]) by kanga.kvack.org (Postfix) with ESMTP id ADC246B00A4 for ; Tue, 7 Dec 2021 11:37:25 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 7578E181327B5 for ; Tue, 7 Dec 2021 16:37:15 +0000 (UTC) X-FDA: 78891553230.22.417C5E2 Received: from mail-ot1-f47.google.com (mail-ot1-f47.google.com [209.85.210.47]) by imf07.hostedemail.com (Postfix) with ESMTP id 1E13910000A7 for ; Tue, 7 Dec 2021 16:37:14 +0000 (UTC) Received: by mail-ot1-f47.google.com with SMTP id v15-20020a9d604f000000b0056cdb373b82so18793521otj.7 for ; Tue, 07 Dec 2021 08:37:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Ft01ug+wcObzRghrP/onVbkHp22WiNHqOY27doOM0RM=; b=T9mkAmcketqHkDL0S4AeWZHcTAdu8tvECpuTAUeRAFf+HN89BLOmg3vnuO2jw9UHgt +uSCXnAf4I0Gcqcb8cCEKa94je/kUahnzvMhQ5cIpO6rdZw2DbaN9CfEoaz86h6agmzw k1KnQWQN/d8+naOvt3xRj3F39rKvMYFXi9idYr2KiZoq2mDCrfex30bYQJe+w6iy7aN0 ZWswuMRLyEBoXz9Ug/nqEg6esP77dtFvc72OIxN83WaJWUESCIL0iCu/h6bDxn0/pb3Y It5B5kWro3oAwhAd/wTL6pFRyW1QrOhggqp8B9Gl64nBtNTI5pC5yIxmX5AM3omQQfVT mh1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Ft01ug+wcObzRghrP/onVbkHp22WiNHqOY27doOM0RM=; b=mroTyRL1Vsk3IAk3QlmFFExhfMfnzP3jVy7eWlAcRBrMZED3Rjpxt1z5x9RMJt4Hvy coWF2kvAPytnFfCRtDhyFXcQI8dJXp0evM/1MH3+uPZXh9d6cJ5/pdNVLRJ1wk8Rf+Hr ovuHFA38Gl6p8yq7xdVdPx1/bgWTTQ3WuPIoL9dcN3p4jVLErtSd5VieLBJhV32SeCQD T6UqCj1uxVVEbsx97STmSXSAcqSI+BWanaP7lUBGKPQ1Wzwv9pOxQyki6SUlzE3/rfDg Lh0oS5KISVUJp2ROvnITrhDjHtQakK++ExcbJFqQHXQh5iXEahP6+7HUYPYl6JuPmPwT 03kw== X-Gm-Message-State: AOAM533Iuz93me8Yot+jv2MXXYZNhlmVDFc+A6EisG7u+Do0NVR2r7qn sNC4TNtReigP5V9sUlGjamg= X-Google-Smtp-Source: ABdhPJwzKIOUNkvZkwfRVBMMvlnjpmRPX7hIW6mlTWA1fmmqqhP7d1LyNDplWUSB6pTVYIbQxyJM/Q== X-Received: by 2002:a9d:6d85:: with SMTP id x5mr36557881otp.221.1638895034360; Tue, 07 Dec 2021 08:37:14 -0800 (PST) Received: from [172.16.0.2] ([8.48.134.30]) by smtp.googlemail.com with ESMTPSA id p10sm12430otp.53.2021.12.07.08.37.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 07 Dec 2021 08:37:14 -0800 (PST) Message-ID: Date: Tue, 7 Dec 2021 09:37:12 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.2 Subject: Re: [RFC net-next 2/2] ipv6: ioam: Support for Buffer occupancy data field Content-Language: en-US To: Justin Iurman , netdev@vger.kernel.org Cc: davem@davemloft.net, kuba@kernel.org, dsahern@kernel.org, yoshfuji@linux-ipv6.org, linux-mm@kvack.org, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, vbabka@suse.cz References: <20211206211758.19057-1-justin.iurman@uliege.be> <20211206211758.19057-3-justin.iurman@uliege.be> From: David Ahern In-Reply-To: <20211206211758.19057-3-justin.iurman@uliege.be> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 1E13910000A7 X-Stat-Signature: t4b898nddehudaieakfhrgbobtbfu48m Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=T9mkAmck; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf07.hostedemail.com: domain of dsahern@gmail.com designates 209.85.210.47 as permitted sender) smtp.mailfrom=dsahern@gmail.com X-HE-Tag: 1638895034-10791 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 12/6/21 2:17 PM, Justin Iurman wrote: > This patch is an attempt to support the buffer occupancy in IOAM trace > data fields. Any feedback is appreciated, or any other idea if this one > is not correct. > > The draft [1] says the following: > > The "buffer occupancy" field is a 4-octet unsigned integer field. > This field indicates the current status of the occupancy of the > common buffer pool used by a set of queues. The units of this field > are implementation specific. Hence, the units are interpreted within > the context of an IOAM-Namespace and/or node-id if used. The authors > acknowledge that in some operational cases there is a need for the > units to be consistent across a packet path through the network, > hence it is recommended for implementations to use standard units > such as Bytes. > > An existing function (i.e., get_slabinfo) is used to retrieve info about > skbuff_head_cache. For that, both the prototype of get_slabinfo and > struct definition of slabinfo were moved from mm/slab.h to > include/linux/slab.h. Any objection on this? > > The function kmem_cache_size is used to retrieve the size of a slab > object. Note that it returns the "object_size" field, not the "size" > field. If needed, a new function (e.g., kmem_cache_full_size) could be > added to return the "size" field. To match the definition from the > draft, the number of bytes is computed as follows: > > slabinfo.active_objs * size > > Thoughts? > > [1] https://datatracker.ietf.org/doc/html/draft-ietf-ippm-ioam-data#section-5.4.2.12 > > Signed-off-by: Justin Iurman > --- > include/linux/slab.h | 15 +++++++++++++++ > mm/slab.h | 14 -------------- > net/ipv6/ioam6.c | 13 ++++++++++++- > 3 files changed, 27 insertions(+), 15 deletions(-) > this should be 2 patches - one that moves the slabinfo struct and function across header files and then the ioam6 change. [ I agree with Jakub's line of questioning - how useful is this across nodes with different OS'es and s/w versions. ]