Netdev Archive on lore.kernel.org
 help / color / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Jiri Pirko <jiri@resnulli.us>
Cc: netdev@vger.kernel.org
Subject: Re: [net-next v2 2/5] devlink: introduce flash update overwrite mask
Date: Mon, 3 Aug 2020 09:53:10 -0700
Message-ID: <72203b31-37f5-0dd1-e7b2-f5da0d0b1398@intel.com> (raw)
In-Reply-To: <20200803153830.GD2290@nanopsycho>



On 8/3/2020 8:38 AM, Jiri Pirko wrote:
> Sat, Aug 01, 2020 at 02:21:56AM CEST, jacob.e.keller@intel.com wrote:
> 
> [...]
> 
>> +	nla_mask = info->attrs[DEVLINK_ATTR_FLASH_UPDATE_OVERWRITE_MASK];
>> +	if (nla_mask) {
>> +		if (!(supported_params & DEVLINK_SUPPORT_FLASH_UPDATE_OVERWRITE_MASK)) {
>> +			NL_SET_ERR_MSG_ATTR(info->extack, nla_mask,
>> +					    "overwrite is not supported");
>> +			return -EOPNOTSUPP;
>> +		}
>> +		params.overwrite_mask = nla_get_u32(nla_mask);
> 
> It's a bitfield, should be NL_ATTR_TYPE_BITFIELD32.
> 

I disagree. BITFIELD32 has both a mask and a field. This doesn't have
the notion of a mask. The bits you allow are set, the bits you don't
allow are not set. Having both a mask and a field over complicates this.

  reply index

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-01  0:21 [net-next v2 0/5] devlink " Jacob Keller
2020-08-01  0:21 ` [net-next v2 1/5] devlink: convert flash_update to use params structure Jacob Keller
2020-08-03 15:46   ` Jiri Pirko
2020-08-01  0:21 ` [net-next v2 2/5] devlink: introduce flash update overwrite mask Jacob Keller
2020-08-03 15:38   ` Jiri Pirko
2020-08-03 16:53     ` Jacob Keller [this message]
2020-08-03 23:08     ` Jacob Keller
2020-08-01  0:21 ` [net-next v2 3/5] ice: add support for " Jacob Keller
2020-08-01  0:21 ` [iproute2-next v2 4/5] Update devlink header for overwrite mask attribute Jacob Keller
2020-08-01  0:21 ` [iproute2-next v2 5/5] devlink: support setting the overwrite mask Jacob Keller
2020-08-03 15:53   ` David Ahern
2020-08-03 16:20     ` Jiri Pirko
2020-08-03 16:56     ` Jacob Keller
2020-08-03 21:20       ` David Ahern
2020-08-03 22:44         ` Jacob Keller
2020-08-03 23:30     ` Jacob Keller
2020-08-03 23:54       ` David Ahern
2020-08-04 18:31         ` Jacob Keller
2020-08-03 15:28 ` [net-next v2 0/5] devlink flash update " Jiri Pirko
2020-08-03 16:51   ` Jacob Keller

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=72203b31-37f5-0dd1-e7b2-f5da0d0b1398@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=jiri@resnulli.us \
    --cc=netdev@vger.kernel.org \
    /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

Netdev Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/netdev/0 netdev/git/0.git
	git clone --mirror https://lore.kernel.org/netdev/1 netdev/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 netdev netdev/ https://lore.kernel.org/netdev \
		netdev@vger.kernel.org
	public-inbox-index netdev

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.netdev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git