Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp2119401lqe; Tue, 9 Apr 2024 10:01:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVgAUGifToODXn4q1aKbVqPgL2VAeC5OuSo5EbND1GhQbejSVj+uyh8a+eSKD5WlFeke/N4FcdimF4ztHG/+bsclz9KTry6BozBPBtQbg== X-Google-Smtp-Source: AGHT+IFGFPrhEyQ+kOrYihRYuBxszcGaFZMOW+kx+UQeW0m2iW+RyKK9KReq4qQuTGPFs7XCsFmr X-Received: by 2002:a05:6a20:1582:b0:1a3:5c61:5ec2 with SMTP id h2-20020a056a20158200b001a35c615ec2mr579053pzj.16.1712682070446; Tue, 09 Apr 2024 10:01:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712682070; cv=pass; d=google.com; s=arc-20160816; b=ZyzazanSsjNwu7V++j0Xp490L4EJezQw9z1Qyi+ddxcEjltG3l51VYCFEPz4Zht9kx cBa0Qns+nTqkBnaATw+xSVTz2gwgFh7cJ9t5nIGN1YYcnv/6fei96HkknDYQ1MusdF1q 4E5nKNUS38heP+3Pt/J72InnoQdvhgKu2jKpQjJBBYx9U4uvRK1P40rtI1I7dcNuDaz/ Lkgk0+SuethyWe0/KnRtTE8VgV870mnsfb2xmUI7x8W4A7q1HpLGU8Sdwe6XgNp71do1 dTUjOvmS++LltfQw6rfBpLQpVH8h+UJ3N8+SvV2V97O2rxxdI20yb8IwjtyUCydx/sl/ 4lyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VlcmHNsCwSvCc74TrBcs49hXKJM0udmD4CNSlCrF+Lo=; fh=BcMCSwLv2Y8CAalXHIqn7oy5r1AauS2rTWr4gFle6HU=; b=XvwXk53H5n4gpfP0KbA3o1lCo2FWbGgxrQQ35uEno9wGTU3by65lVRRayjWSLpi0F9 ri2iDXElGAgvZV8Q8o4wUdOBzeFDmYXaxcIDQdtjDfIfRAcuFXlNoHwZ+vVIlkeZhWB0 ZGrSs8QgponqlzgMut0EEAvcTWgBT/KoY7gRrRkPjGBOFqOPtu2D9JNfQQpQGvogVELD AAaSBKFHjpsGckZ5AZ14Lzzfn/uBJXuRzraaRef90JlWwC1/Qy5lVlXZ9mmpBXHuXqq8 8oXpSjTIQ+GtQikHpUb+b5egBIY8lGpi7EEBdgYlxA1AqgJNuqz2xddpMJbQQalqWmNd oFhw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KsXVlU5Q; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-137305-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137305-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 75-20020a63004e000000b005dc8ccd36d9si8956628pga.250.2024.04.09.10.01.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 10:01:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137305-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KsXVlU5Q; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-137305-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137305-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 01D9FB29CD2 for ; Tue, 9 Apr 2024 16:18:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4728613D8BC; Tue, 9 Apr 2024 16:17:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="KsXVlU5Q" Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EE65013D62B for ; Tue, 9 Apr 2024 16:17:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712679476; cv=none; b=L4NiNR+b3n4Qo1ECTxH47eg4JrC1L9ZB1bHATX+DNyvcXyM+AHznZSiZqVLPXby6q2Yxsien5/QuEOpSVPRl5aNUZeDxzr8xB/0zllUIISCPmHPVHi0XscUB/1t3EptYwuf9bQebNor5+IxuuWa/6h4h5wn+E9l9Asz0lnhSG5Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712679476; c=relaxed/simple; bh=cJq3TaB12y1+3tX/CpoQNDUPIteKzZNWbXEr1MNnXlE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Qs2GpUxPnsa24we2e4ImevCFBnbxzf8MqmSRo8YfAdvChGAyT6uq5fYE4lcN+Lc1IwE5RTyPHAy5EFCoTU1RSEouVMr+VCY8FSGEszMcbNJ7I/VssYt3g29W9TL0kTOPP6M8ei5JiFT9B7Tk53KiUdBjO3yVfQ7trMlC3R3t5/4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=KsXVlU5Q; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-6ed0938cd1dso3673900b3a.2 for ; Tue, 09 Apr 2024 09:17:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712679474; x=1713284274; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=VlcmHNsCwSvCc74TrBcs49hXKJM0udmD4CNSlCrF+Lo=; b=KsXVlU5QbFYMDKbO4iO93x3QNISOWDpBERnT0yXNQ0YF5TKpxiOhMBxYHqJ5pl4wVV 7bcoRugnIXsaVTwkoIUEGXNIZR+CvPeIOZbGPc5oR0zWQ4M1KhDi6i+tDKj+rQ3sJkwq j/IEB0lbRPo7V+dp9/nT25nDh0/7DRf+jmsI4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712679474; x=1713284274; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=VlcmHNsCwSvCc74TrBcs49hXKJM0udmD4CNSlCrF+Lo=; b=Sox/mp4FS6in/9DR5tqOKi86CkHJVfGuPA2K9Q5FXszDJDOXqIuJgVijt8s9oJn1No KZHxQYndRi7nO8LhjfJKvfLYG/S9Fwjtw4ey98q1bpd1kOj9KGNpF92373oJkbfKem1P StHj7Fka/838TupARSGVFICUCNMDGUGsyS9Ca6mhk1zwegVIGcFdXCYvmxAA6LN4f3Qh BFJG9R6N9SPHAzn3aZJSMnc2q56NgsZBhY0BwygcuBNoMsWko9tPBcDqdLrmgrF9MskK 5fNTIxnHSzkd0/LlAA9Meeysde8HZ455Nnn6fTroukeFBEdFqP5JbcGJBIaoM1N5rsOk 6XrA== X-Forwarded-Encrypted: i=1; AJvYcCV9gaLm05YpGl0x+zcCvHk5T+EQ86Xmabg6DXwma62HQxB+zz+Kgu/Ts+2ULSY7qh+9ni+gR4Jo/ju5K1Ek1u4w7YsiG41u26CnK4r9 X-Gm-Message-State: AOJu0Yy4aYhtpO3/KAYPYqPRoQuJahxNWLXO/uONf7mEcHA2RjqFXlPF +P3Q7dkzNGlXdzxjqtmb8MQJB+V/JxJsMfcmGtt0OGWMyWbsi6VX9+n3qfbF+w== X-Received: by 2002:a05:6a20:244d:b0:1a7:a3ba:2bc1 with SMTP id t13-20020a056a20244d00b001a7a3ba2bc1mr405903pzc.15.1712679474281; Tue, 09 Apr 2024 09:17:54 -0700 (PDT) Received: from www.outflux.net ([198.0.35.241]) by smtp.gmail.com with ESMTPSA id y16-20020aa78550000000b006ecda086db2sm8483699pfn.110.2024.04.09.09.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 09:17:53 -0700 (PDT) Date: Tue, 9 Apr 2024 09:17:53 -0700 From: Kees Cook To: Alexander Lobakin Cc: Jakub Kicinski , "David S. Miller" , Eric Dumazet , Paolo Abeni , Alexander Duyck , Yunsheng Lin , Jesper Dangaard Brouer , Ilias Apalodimas , Christoph Lameter , Vlastimil Babka , Andrew Morton , nex.sw.ncis.osdt.itp.upstreaming@intel.com, netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v9 7/9] libeth: add Rx buffer management Message-ID: <202404090909.51BAC81A6@keescook> References: <20240404154402.3581254-1-aleksander.lobakin@intel.com> <20240404154402.3581254-8-aleksander.lobakin@intel.com> <20240405212513.0d189968@kernel.org> <1dda8fd5-233b-4b26-95cc-f4eb339a7f88@intel.com> <755c17b2-0ec2-49dd-9352-63e5d2f1ba4c@intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <755c17b2-0ec2-49dd-9352-63e5d2f1ba4c@intel.com> On Mon, Apr 08, 2024 at 11:45:32AM +0200, Alexander Lobakin wrote: > From: Alexander Lobakin > Date: Mon, 8 Apr 2024 11:11:12 +0200 > > > From: Jakub Kicinski > > Date: Fri, 5 Apr 2024 21:25:13 -0700 > > > >> On Thu, 4 Apr 2024 17:44:00 +0200 Alexander Lobakin wrote: > >>> +/** > >>> + * struct libeth_fq - structure representing a buffer queue > >>> + * @fp: hotpath part of the structure > >> > >> Second time this happens this week, so maybe some tooling change in 6.9 > >> but apparently kdoc does not want to know about the tagged struct: > >> > >> include/net/libeth/rx.h:69: warning: Excess struct member 'fp' description in 'libeth_fq' > > > > Oh no, maybe we should teach kdoc to parse struct_group*()? > > scripts/kernel-doc apparently can handle them... > > + Kees > Ah, hm, scripts/kernel-doc throws away the early arguments of struct_group_tagged, but I suspect it needs to create a synthetic member for the tag. i.e. instead of: struct_group_tagged(tag, name, members...) becoming members... it needs to become struct tag name; members... It seems this is the first place anyone has tried to document the tagged struct name! :) Does this work? I haven't tested it... diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 967f1abb0edb..64a19228d5dd 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc @@ -1151,7 +1151,8 @@ sub dump_struct($$) { # - first eat non-declaration parameters and rewrite for final match # - then remove macro, outer parens, and trailing semicolon $members =~ s/\bstruct_group\s*\(([^,]*,)/STRUCT_GROUP(/gos; - $members =~ s/\bstruct_group_(attr|tagged)\s*\(([^,]*,){2}/STRUCT_GROUP(/gos; + $members =~ s/\bstruct_group_attr\s*\(([^,]*,){2}/STRUCT_GROUP(/gos; + $members =~ s/\bstruct_group_tagged\s*\(([^,]*,)([^,]*,)/struct $1 $2; STRUCT_GROUP(/gos; $members =~ s/\b__struct_group\s*\(([^,]*,){3}/STRUCT_GROUP(/gos; $members =~ s/\bSTRUCT_GROUP(\(((?:(?>[^)(]+)|(?1))*)\))[^;]*;/$2/gos; > > > >> > >>> + * @pp: &page_pool for buffer management > >>> + * @fqes: array of Rx buffers > >>> + * @truesize: size to allocate per buffer, w/overhead > >>> + * @count: number of descriptors/buffers the queue has > >>> + * @buf_len: HW-writeable length per each buffer > >>> + * @nid: ID of the closest NUMA node with memory > >>> + */ > >>> +struct libeth_fq { > >>> + struct_group_tagged(libeth_fq_fp, fp, > >>> + struct page_pool *pp; > >>> + struct libeth_fqe *fqes; > >>> + > >>> + u32 truesize; > >>> + u32 count; > >>> + ); > >>> + > >>> + /* Cold fields */ > >>> + u32 buf_len; > >>> + int nid; > >>> +}; > > Thanks, > Olek -- Kees Cook