netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Petr Machata <petrm@nvidia.com>, netdev@vger.kernel.org
Cc: David Ahern <dsahern@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Ido Schimmel <idosch@nvidia.com>
Subject: Re: [PATCH net-next v2 2/3] nexthop: Use a dedicated policy for nh_valid_dump_req()
Date: Wed, 20 Jan 2021 21:27:40 -0700	[thread overview]
Message-ID: <fa4f9781-9989-db11-41af-79eb2d94e7ba@gmail.com> (raw)
In-Reply-To: <6d799e1d8d5c4b3e079554b42912842887335092.1611156111.git.petrm@nvidia.com>

On 1/20/21 8:44 AM, Petr Machata wrote:
> This function uses the global nexthop policy, but only accepts four
> particular attributes. Create a new policy that only includes the four
> supported attributes, and use it. Convert the loop to a series of ifs.
> 
> Signed-off-by: Petr Machata <petrm@nvidia.com>
> ---
> 
> Notes:
>     v2:
>     - Do not specify size of the policy array. Use ARRAY_SIZE instead
>       of NHA_MAX
>     - Convert manual setting of true to nla_get_flag().
> 
>  net/ipv4/nexthop.c | 60 +++++++++++++++++++++-------------------------
>  1 file changed, 27 insertions(+), 33 deletions(-)
> 

Reviewed-by: David Ahern <dsahern@kernel.org>



  reply	other threads:[~2021-01-21  4:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-20 15:44 [PATCH net-next v2 0/3] nexthop: More fine-grained policies for netlink message validation Petr Machata
2021-01-20 15:44 ` [PATCH net-next v2 1/3] nexthop: Use a dedicated policy for nh_valid_get_del_req() Petr Machata
2021-01-21  4:26   ` David Ahern
2021-01-20 15:44 ` [PATCH net-next v2 2/3] nexthop: Use a dedicated policy for nh_valid_dump_req() Petr Machata
2021-01-21  4:27   ` David Ahern [this message]
2021-01-20 15:44 ` [PATCH net-next v2 3/3] nexthop: Specialize rtm_nh_policy Petr Machata
2021-01-21  4:29   ` David Ahern
2021-01-21  5:10 ` [PATCH net-next v2 0/3] nexthop: More fine-grained policies for netlink message validation patchwork-bot+netdevbpf

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=fa4f9781-9989-db11-41af-79eb2d94e7ba@gmail.com \
    --to=dsahern@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=idosch@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --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).