summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2026-01-23 22:49:58 +0300
committerJakub Kicinski <kuba@kernel.org>2026-01-23 22:49:58 +0300
commit6a9e8b60f003e66f989097a5928d4ba83360b4ef (patch)
tree818885cad68e69b8018effa9cfb46ef2e7014eaf /include
parent56f9058eb3601049c094b76462b77c2ef943100a (diff)
parentb33006ebb78a5e2b4bce25d01010e1e420571d5a (diff)
downloadlinux-6a9e8b60f003e66f989097a5928d4ba83360b4ef.tar.xz
Merge branch 'net-restore-the-structure-of-driver-facing-qcfg-api'
Jakub Kicinski says: ==================== net: restore the structure of driver-facing qcfg API The goal of qcfg objects is to let us seamlessly support new use cases without modifying all the drivers. We want to pull all the logic of combining configuration supplied via different interfaces into the core and present the drivers with a flat queue-by-queue configuration. Additionally we want to separate the current effective configuration from the user intent (default vs user setting vs memory provider setting). Restructure the recently added code to re-introduce the pieces that are missing compared to the old RFC: https://lore.kernel.org/20250421222827.283737-1-kuba@kernel.org Namely: - the netdev_queue_config() helper - queue config validation callback I hopefully removed all the more "out there" parts of the RFC. ==================== Link: https://patch.msgid.link/20260122005113.2476634-1-kuba@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include')
-rw-r--r--include/net/netdev_queues.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/include/net/netdev_queues.h b/include/net/netdev_queues.h
index 2ab3eae8e8c3..95ed28212f4e 100644
--- a/include/net/netdev_queues.h
+++ b/include/net/netdev_queues.h
@@ -139,7 +139,16 @@ enum {
* @ndo_queue_get_dma_dev: Get dma device for zero-copy operations to be used
* for this queue. Return NULL on error.
*
- * @ndo_default_qcfg: Populate queue config struct with defaults. Optional.
+ * @ndo_default_qcfg: (Optional) Populate queue config struct with defaults.
+ * Queue config structs are passed to this helper before
+ * the user-requested settings are applied.
+ *
+ * @ndo_validate_qcfg: (Optional) Check if queue config is supported.
+ * Called when configuration affecting a queue may be
+ * changing, either due to NIC-wide config, or config
+ * scoped to the queue at a specified index.
+ * When NIC-wide config is changed the callback will
+ * be invoked for all queues.
*
* @supported_params: Bitmask of supported parameters, see QCFG_*.
*
@@ -164,12 +173,18 @@ struct netdev_queue_mgmt_ops {
int idx);
void (*ndo_default_qcfg)(struct net_device *dev,
struct netdev_queue_config *qcfg);
+ int (*ndo_validate_qcfg)(struct net_device *dev,
+ struct netdev_queue_config *qcfg,
+ struct netlink_ext_ack *extack);
struct device * (*ndo_queue_get_dma_dev)(struct net_device *dev,
int idx);
unsigned int supported_params;
};
+void netdev_queue_config(struct net_device *dev, int rxq,
+ struct netdev_queue_config *qcfg);
+
bool netif_rxq_has_unreadable_mp(struct net_device *dev, int idx);
/**