public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel•org>
To: Tony Nguyen <anthony.l.nguyen@intel•com>
Cc: davem@davemloft•net, pabeni@redhat•com, edumazet@google•com,
	andrew+netdev@lunn•ch, netdev@vger•kernel.org,
	Phani R Burra <phani.r.burra@intel•com>,
	larysa.zaremba@intel•com, przemyslaw.kitszel@intel•com,
	aleksander.lobakin@intel•com, sridhar.samudrala@intel•com,
	anjali.singhai@intel•com, michal.swiatkowski@linux•intel.com,
	maciej.fijalkowski@intel•com, emil.s.tantilov@intel•com,
	madhu.chittim@intel•com, joshua.a.hay@intel•com,
	jacob.e.keller@intel•com, jayaprakash.shanmugam@intel•com,
	jiri@resnulli•us, horms@kernel•org, corbet@lwn•net,
	richardcochran@gmail•com, linux-doc@vger•kernel.org,
	Bharath R <bharath.r@intel•com>,
	Samuel Salin <Samuel.salin@intel•com>,
	Aleksandr Loktionov <aleksandr.loktionov@intel•com>
Subject: Re: [PATCH net-next v3 05/14] libie: add bookkeeping support for control queue messages
Date: Wed, 20 May 2026 18:51:21 -0700	[thread overview]
Message-ID: <20260520185121.6f380ad0@kernel.org> (raw)
In-Reply-To: <20260515224443.2772147-6-anthony.l.nguyen@intel.com>

On Fri, 15 May 2026 15:44:29 -0700 Tony Nguyen wrote:
> +	guard(spinlock)(&xnm->free_xns_bm_lock);

Quoting documentation:

  Using device-managed and cleanup.h constructs
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  
  Netdev remains skeptical about promises of all "auto-cleanup" APIs,
  including even ``devm_`` helpers, historically. They are not the preferred
  style of implementation, merely an acceptable one.
  
  Use of ``guard()`` is discouraged within any function longer than 20 lines,
  ``scoped_guard()`` is considered more readable. Using normal lock/unlock is
  still (weakly) preferred.
  
  Low level cleanup constructs (such as ``__free()``) can be used when building
  APIs and helpers, especially scoped iterators. However, direct use of
  ``__free()`` within networking core and drivers is discouraged.
  Similar guidance applies to declaring variables mid-function.
  
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#using-device-managed-and-cleanup-h-constructs

  parent reply	other threads:[~2026-05-21  1:51 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 22:44 [PATCH net-next v3 00/14][pull request] Introduce iXD driver Tony Nguyen
2026-05-15 22:44 ` [PATCH net-next v3 01/14] virtchnl: create 'include/linux/intel' and move necessary header files Tony Nguyen
2026-05-21  0:52   ` Jakub Kicinski
2026-05-21  9:28     ` Larysa Zaremba
2026-05-21 13:56       ` Jakub Kicinski
2026-05-22 11:08         ` Alexander Lobakin
2026-05-22 15:40           ` Jakub Kicinski
2026-05-26 14:45             ` Alexander Lobakin
2026-05-26 21:36               ` Jacob Keller
2026-05-15 22:44 ` [PATCH net-next v3 02/14] libie: add PCI device initialization helpers to libie Tony Nguyen
2026-05-18  6:46   ` Larysa Zaremba
2026-05-18 21:54   ` Bjorn Helgaas
2026-05-19  8:20     ` Philipp Stanner
2026-05-19 10:03       ` Larysa Zaremba
2026-05-15 22:44 ` [PATCH net-next v3 03/14] libeth: allow to create fill queues without NAPI Tony Nguyen
2026-05-21  1:49   ` Jakub Kicinski
2026-05-21 10:07     ` Larysa Zaremba
2026-05-15 22:44 ` [PATCH net-next v3 04/14] libie: add control queue support Tony Nguyen
2026-05-18  7:02   ` Larysa Zaremba
2026-05-15 22:44 ` [PATCH net-next v3 05/14] libie: add bookkeeping support for control queue messages Tony Nguyen
2026-05-18  7:24   ` Larysa Zaremba
2026-05-21  1:51   ` Jakub Kicinski [this message]
2026-05-21  8:25     ` Larysa Zaremba
2026-05-15 22:44 ` [PATCH net-next v3 06/14] idpf: remove 'vport_params_reqd' field Tony Nguyen
2026-05-15 22:44 ` [PATCH net-next v3 07/14] idpf: refactor idpf to use libie_pci APIs Tony Nguyen
2026-05-18  7:40   ` Larysa Zaremba
2026-05-15 22:44 ` [PATCH net-next v3 08/14] idpf: refactor idpf to use libie control queues Tony Nguyen
2026-05-18  8:01   ` Larysa Zaremba
2026-05-18 10:14     ` Larysa Zaremba
2026-05-15 22:44 ` [PATCH net-next v3 09/14] idpf: make mbx_task queueing and cancelling more consistent Tony Nguyen
2026-05-15 22:44 ` [PATCH net-next v3 10/14] idpf: print a debug message and bail in case of non-event ctlq message Tony Nguyen
2026-05-15 22:44 ` [PATCH net-next v3 11/14] ixd: add basic driver framework for Intel(R) Control Plane Function Tony Nguyen
2026-05-18  8:32   ` Larysa Zaremba
2026-05-15 22:44 ` [PATCH net-next v3 12/14] ixd: add reset checks and initialize the mailbox Tony Nguyen
2026-05-18  9:12   ` Larysa Zaremba
2026-05-15 22:44 ` [PATCH net-next v3 13/14] ixd: add the core initialization Tony Nguyen
2026-05-18 10:01   ` Larysa Zaremba
2026-05-18 10:10   ` Larysa Zaremba
2026-05-15 22:44 ` [PATCH net-next v3 14/14] ixd: add devlink support Tony Nguyen
2026-05-18 10:11   ` Larysa Zaremba
2026-05-18 10:23 ` [PATCH net-next v3 00/14][pull request] Introduce iXD driver Larysa Zaremba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260520185121.6f380ad0@kernel.org \
    --to=kuba@kernel$(echo .)org \
    --cc=Samuel.salin@intel$(echo .)com \
    --cc=aleksander.lobakin@intel$(echo .)com \
    --cc=aleksandr.loktionov@intel$(echo .)com \
    --cc=andrew+netdev@lunn$(echo .)ch \
    --cc=anjali.singhai@intel$(echo .)com \
    --cc=anthony.l.nguyen@intel$(echo .)com \
    --cc=bharath.r@intel$(echo .)com \
    --cc=corbet@lwn$(echo .)net \
    --cc=davem@davemloft$(echo .)net \
    --cc=edumazet@google$(echo .)com \
    --cc=emil.s.tantilov@intel$(echo .)com \
    --cc=horms@kernel$(echo .)org \
    --cc=jacob.e.keller@intel$(echo .)com \
    --cc=jayaprakash.shanmugam@intel$(echo .)com \
    --cc=jiri@resnulli$(echo .)us \
    --cc=joshua.a.hay@intel$(echo .)com \
    --cc=larysa.zaremba@intel$(echo .)com \
    --cc=linux-doc@vger$(echo .)kernel.org \
    --cc=maciej.fijalkowski@intel$(echo .)com \
    --cc=madhu.chittim@intel$(echo .)com \
    --cc=michal.swiatkowski@linux$(echo .)intel.com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=pabeni@redhat$(echo .)com \
    --cc=phani.r.burra@intel$(echo .)com \
    --cc=przemyslaw.kitszel@intel$(echo .)com \
    --cc=richardcochran@gmail$(echo .)com \
    --cc=sridhar.samudrala@intel$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox