Re: [PATCH v6 net-next 14/15] iavf: Add net_shaper_ops support

From
Jakub Kicinski <kuba@kernel.org>
Date
2024-09-05 01:58:50
Also in
intel-wired-lan
Reply to
Paolo Abeni, 2024-09-04
On Wed,  4 Sep 2024 15:53:46 +0200 Paolo Abeni wrote:
quoted hunk ↗ jump to hunk
+static int iavf_verify_handle(struct net_shaper_binding *binding,
+			      const struct net_shaper_handle *handle,
+			      struct netlink_ext_ack *extack)
+{
+	struct iavf_adapter *adapter = netdev_priv(binding->netdev);
+	int qid = handle->id;
+
+	if (qid >= adapter->num_active_queues) {
+		NL_SET_ERR_MSG_FMT(extack, "Invalid shaper handle, queued id %d max %d",
+				   qid, adapter->num_active_queues);
+		return -EINVAL;
+	}
+	return 0;
+}
This can go once we have the real_num validation in the core?
Otherwise LGTM!
Thread (32 messages) 32 messages, 2 authors, last reply 2024-09-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help