[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231012173636.68e6eeee@kernel.org>
Date: Thu, 12 Oct 2023 17:36:36 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: "Nambiar, Amritha" <amritha.nambiar@...el.com>
Cc: <netdev@...r.kernel.org>, <sridhar.samudrala@...el.com>
Subject: Re: [net-next PATCH v4 04/10] netdev-genl: Add netlink framework
functions for queue
On Thu, 12 Oct 2023 17:24:41 -0700 Nambiar, Amritha wrote:
> I was thinking your review comment was for the entire
> 'netdev_nl_queue_validate' function (i.e. if the max queue-id validation
> can be handled in the policy as a range with max value for queue-id, and
> since max queue-id was not a constant, but varies within the kernel, ex:
> netdev->real_num_rx_queues, I was unsure of it...). So, another option I
> could come up with for the validation was a 'pre_doit' hook instead of
> netdev_nl_queue_validate().
real_num can change if we're not holding rtnl_lock, and we can't hold
the lock in pre :(
> If your comment referred to the enum queue-type range alone, I see,
> since the policy handles the max check for queue-type, I can remove the
> default case returning EOPNOTSUPP. Correct me if I'm wrong.
Yup! I only meant the type, you can trust netlink to validate the type.
Powered by blists - more mailing lists