summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-07-11 17:33:06 -0700
committerJakub Kicinski <kuba@kernel.org>2025-07-11 17:33:06 -0700
commit19d181d8a0c20fda43c820dbddb1cb4bd477b81c (patch)
tree3fbae20dae046ad79258730c63cbd6c467d936f2 /drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
parenta393644d7d161430207b9de167b798d05c7d684a (diff)
parent2d925db5b2c6e0c70166de928f34cebf6844b8fd (diff)
Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue
Tony Nguyen says: ==================== ice: cleanups and preparation for live migration Jake Keller says: Various cleanups and preparation to the ice driver code for supporting SR-IOV live migration. The logic for unpacking Rx queue context data is added. This is the inverse of the existing packing logic. Thanks to <linux/packing.h> this is trivial to add. Code to enable both reading and writing the Tx queue context for a queue over a shared hardware register interface is added. Thanks to ice_adapter, this is locked across all PFs that need to use it, preventing concurrency issues with multiple PFs. The RSS hash configuration requested by a VF is cached within the VF structure. This will be used to track and restore the same configuration during migration load. ice_sriov_set_msix_vec_count() is updated to use pci_iov_vf_id() instead of open-coding a worse equivalent, and checks to avoid rebuilding MSI-X if the current request is for the existing amount of vectors. A new ice_get_vf_by_dev() helper function is added to simplify accessing a VF from its PCI device structure. This will be used more heavily within the live migration code itself. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: introduce ice_get_vf_by_dev() wrapper ice: avoid rebuilding if MSI-X vector count is unchanged ice: use pci_iov_vf_id() to get VF ID ice: expose VF functions used by live migration ice: move ice_vsi_update_l2tsel to ice_lib.c ice: save RSS hash configuration for migration ice: add functions to get and set Tx queue context ice: add support for reading and unpacking Rx queue context ==================== Link: https://patch.msgid.link/20250710214518.1824208-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_adminq_cmd.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_adminq_cmd.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
index 712f7ef2a00a..97f9ebd62d93 100644
--- a/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
+++ b/drivers/net/ethernet/intel/ice/ice_adminq_cmd.h
@@ -14,11 +14,23 @@
#define ICE_RXQ_CTX_SIZE_DWORDS 8
#define ICE_RXQ_CTX_SZ (ICE_RXQ_CTX_SIZE_DWORDS * sizeof(u32))
-#define ICE_TXQ_CTX_SZ 22
typedef struct __packed { u8 buf[ICE_RXQ_CTX_SZ]; } ice_rxq_ctx_buf_t;
+
+/* The Tx queue context is 40 bytes, and includes some internal state. The
+ * Admin Queue buffers don't include the internal state, so only include the
+ * first 22 bytes of the context.
+ */
+#define ICE_TXQ_CTX_SZ 22
+
typedef struct __packed { u8 buf[ICE_TXQ_CTX_SZ]; } ice_txq_ctx_buf_t;
+#define ICE_TXQ_CTX_FULL_SIZE_DWORDS 10
+#define ICE_TXQ_CTX_FULL_SZ \
+ (ICE_TXQ_CTX_FULL_SIZE_DWORDS * sizeof(u32))
+
+typedef struct __packed { u8 buf[ICE_TXQ_CTX_FULL_SZ]; } ice_txq_ctx_buf_full_t;
+
struct ice_aqc_generic {
__le32 param0;
__le32 param1;