All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Vladimir Oltean <olteanv@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	"Przemek Kitszel" <przemyslaw.kitszel@intel.com>,
	Masahiro Yamada <masahiroy@kernel.org>,
	<linux-kernel@vger.kernel.org>, <netdev@vger.kernel.org>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH net-next v2 3/9] lib: packing: add pack_fields() and unpack_fields()
Date: Mon, 4 Nov 2024 11:06:29 -0800	[thread overview]
Message-ID: <30df1dc6-1206-4584-89de-e223e5f7d3ac@intel.com> (raw)
In-Reply-To: <20241103103142.4ba70d58@kernel.org>



On 11/3/2024 10:31 AM, Jakub Kicinski wrote:
> On Fri, 25 Oct 2024 17:04:55 -0700 Jacob Keller wrote:
>> +ifdef CONFIG_PACKING_CHECK_FIELDS_1
>> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_1
>> +endif
>> +ifdef CONFIG_PACKING_CHECK_FIELDS_2
>> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_2
>> +endif
> [...]
>> +ifdef CONFIG_PACKING_CHECK_FIELDS_49
>> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_49
>> +endif
>> +ifdef CONFIG_PACKING_CHECK_FIELDS_50
>> +HOSTCFLAGS_lib/gen_packing_checks.o += -DPACKING_CHECK_FIELDS_50
> 
> This series is marked as Not Applicable in PW. Not sure why.
> 
> I can't bring myself to revive it, tho, this isn't pretty. 
> It'd be one thing to do the codegen and the ugly copy / paste
> 50 times in the lib/ but all drivers have to select all field 
> counts they use..
> 
> Since all you want is compile time checking and logic is quite
> well constrained - can we put the field definitions in a separate
> ro section and make modpost validate them?
> 

This is a much better idea actually. I think I can figure that out.

> Also Documentation needs to be extended with basic use examples.

Will fix in v3

  reply	other threads:[~2024-11-04 19:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-26  0:04 [PATCH net-next v2 0/9] lib: packing: introduce and use (un)pack_fields Jacob Keller
2024-10-26  0:04 ` [PATCH net-next v2 1/9] lib: packing: create __pack() and __unpack() variants without error checking Jacob Keller
2024-10-26  0:04 ` [PATCH net-next v2 2/9] lib: packing: demote truncation error in pack() to a warning in __pack() Jacob Keller
2024-10-26  0:04 ` [PATCH net-next v2 3/9] lib: packing: add pack_fields() and unpack_fields() Jacob Keller
2024-11-03 18:31   ` Jakub Kicinski
2024-11-04 19:06     ` Jacob Keller [this message]
2024-10-26  0:04 ` [PATCH net-next v2 4/9] ice: remove int_q_state from ice_tlan_ctx Jacob Keller
2024-10-29 14:36   ` Daniel Machon
2024-10-26  0:04 ` [PATCH net-next v2 5/9] ice: use structures to keep track of queue context size Jacob Keller
2024-10-29 14:42   ` Daniel Machon
2024-10-26  0:04 ` [PATCH net-next v2 6/9] ice: use <linux/packing.h> for Tx and Rx queue context data Jacob Keller
2024-10-29 14:50   ` Daniel Machon
2024-10-29 22:09     ` Jacob Keller
2024-10-29 23:32       ` Jacob Keller
2024-10-30 11:19         ` Dan Carpenter
2024-10-30 20:34           ` Jacob Keller
2024-10-31  7:46             ` Dan Carpenter
2024-11-07 17:32               ` Jacob Keller
2024-10-26  0:04 ` [PATCH net-next v2 7/9] ice: reduce size of queue context fields Jacob Keller
2024-10-26  0:05 ` [PATCH net-next v2 8/9] ice: move prefetch enable to ice_setup_rx_ctx Jacob Keller
2024-10-26  0:05 ` [PATCH net-next v2 9/9] ice: cleanup Rx queue context programming functions Jacob Keller
2024-10-29 18:28 ` [PATCH net-next v2 0/9] lib: packing: introduce and use (un)pack_fields Vladimir Oltean
2024-10-31  9:30 ` Daniel Machon

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=30df1dc6-1206-4584-89de-e223e5f7d3ac@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=anthony.l.nguyen@intel.com \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masahiroy@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.