netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Petr Machata <petrm@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, David Ahern <dsahern@kernel.org>,
	Simon Horman <horms@kernel.org>,
	mlxsw@nvidia.com
Subject: Re: [PATCH net-next v3 2/7] net: nexthop: Add NHA_OP_FLAGS
Date: Tue, 5 Mar 2024 10:39:47 +0200	[thread overview]
Message-ID: <ZebaUyYfghHnwG8C@shredder> (raw)
In-Reply-To: <46fd3a32ea411c65a66193b7e25833ecf8141326.1709560395.git.petrm@nvidia.com>

On Mon, Mar 04, 2024 at 09:51:15PM +0100, Petr Machata wrote:
> @@ -2992,6 +2994,11 @@ static int nh_valid_get_del_req(const struct nlmsghdr *nlh,
>  		return -EINVAL;
>  	}
>  
> +	if (tb[NHA_OP_FLAGS])
> +		*op_flags = nla_get_u32(tb[NHA_OP_FLAGS]);
> +	else
> +		*op_flags = 0;
> +
>  	return 0;
>  }

[...]

> @@ -3151,6 +3161,11 @@ static int __nh_valid_dump_req(const struct nlmsghdr *nlh, struct nlattr **tb,
>  		return -EINVAL;
>  	}
>  
> +	if (tb[NHA_OP_FLAGS])
> +		filter->op_flags = nla_get_bitfield32(tb[NHA_OP_FLAGS]).value;

Shouldn't this be:

filter->op_flags = nla_get_u32(tb[NHA_OP_FLAGS]);

?

> +	else
> +		filter->op_flags = 0;
> +
>  	return 0;
>  }

  reply	other threads:[~2024-03-05  8:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-04 20:51 [PATCH net-next v3 0/7] Support for nexthop group statistics Petr Machata
2024-03-04 20:51 ` [PATCH net-next v3 1/7] net: nexthop: Adjust netlink policy parsing for a new attribute Petr Machata
2024-03-05  8:34   ` Ido Schimmel
2024-03-04 20:51 ` [PATCH net-next v3 2/7] net: nexthop: Add NHA_OP_FLAGS Petr Machata
2024-03-05  8:39   ` Ido Schimmel [this message]
2024-03-05 10:42     ` Petr Machata
2024-03-04 20:51 ` [PATCH net-next v3 3/7] net: nexthop: Add nexthop group entry stats Petr Machata
2024-03-04 20:51 ` [PATCH net-next v3 4/7] net: nexthop: Expose nexthop group stats to user space Petr Machata
2024-03-04 20:51 ` [PATCH net-next v3 5/7] net: nexthop: Add hardware statistics notifications Petr Machata
2024-03-04 20:51 ` [PATCH net-next v3 6/7] net: nexthop: Add ability to enable / disable hardware statistics Petr Machata
2024-03-04 20:51 ` [PATCH net-next v3 7/7] net: nexthop: Expose nexthop group HW stats to user space Petr Machata

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=ZebaUyYfghHnwG8C@shredder \
    --to=idosch@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=mlxsw@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).