From: Joshua Hay <joshua.a.hay@intel.com>
To: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org
Subject: [Intel-wired-lan] [PATCH iwl-next v9 05/10] idpf: reshuffle idpf_vport struct members to avoid holes
Date: Tue, 21 Oct 2025 16:30:51 -0700 [thread overview]
Message-ID: <20251021233056.1320108-6-joshua.a.hay@intel.com> (raw)
In-Reply-To: <20251021233056.1320108-1-joshua.a.hay@intel.com>
From: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
The previous refactor of moving queue and vector resources out of the
idpf_vport structure, created few holes. Reshuffle the existing members
to avoid holes as much as possible.
Reviewed-by: Anton Nadezhdin <anton.nadezhdin@intel.com>
Signed-off-by: Pavan Kumar Linga <pavan.kumar.linga@intel.com>
---
v8: rebase on AF_XDP series
---
drivers/net/ethernet/intel/idpf/idpf.h | 32 ++++++++++++--------------
1 file changed, 15 insertions(+), 17 deletions(-)
diff --git a/drivers/net/ethernet/intel/idpf/idpf.h b/drivers/net/ethernet/intel/idpf/idpf.h
index 093c4cb13118..40f1ce901500 100644
--- a/drivers/net/ethernet/intel/idpf/idpf.h
+++ b/drivers/net/ethernet/intel/idpf/idpf.h
@@ -349,29 +349,29 @@ struct idpf_q_vec_rsrc {
/**
* struct idpf_vport - Handle for netdevices and queue resources
* @dflt_qv_rsrc: contains default queue and vector resources
- * @num_txq: Number of allocated TX queues
- * @compln_clean_budget: Work budget for completion clean
* @txqs: Used only in hotpath to get to the right queue very fast
- * @crc_enable: Enable CRC insertion offload
- * @xdpsq_share: whether XDPSQ sharing is enabled
+ * @num_txq: Number of allocated TX queues
* @num_xdp_txq: number of XDPSQs
* @xdp_txq_offset: index of the first XDPSQ (== number of regular SQs)
+ * @xdpsq_share: whether XDPSQ sharing is enabled
* @xdp_prog: installed XDP program
- * @rx_ptype_lkup: Lookup table for ptypes on RX
* @vdev_info: IDC vport device info pointer
* @adapter: back pointer to associated adapter
* @netdev: Associated net_device. Each vport should have one and only one
* associated netdev.
* @flags: See enum idpf_vport_flags
- * @vport_type: Default SRIOV, SIOV, etc.
+ * @compln_clean_budget: Work budget for completion clean
* @vport_id: Device given vport identifier
+ * @vport_type: Default SRIOV, SIOV, etc.
* @idx: Software index in adapter vports struct
- * @default_vport: Use this vport if one isn't specified
* @max_mtu: device given max possible MTU
* @default_mac_addr: device will give a default MAC to use
* @rx_itr_profile: RX profiles for Dynamic Interrupt Moderation
* @tx_itr_profile: TX profiles for Dynamic Interrupt Moderation
+ * @rx_ptype_lkup: Lookup table for ptypes on RX
* @port_stats: per port csum, header split, and other offload stats
+ * @default_vport: Use this vport if one isn't specified
+ * @crc_enable: Enable CRC insertion offload
* @link_up: True if link is up
* @tx_tstamp_caps: Capabilities negotiated for Tx timestamping
* @tstamp_config: The Tx tstamp config
@@ -380,34 +380,32 @@ struct idpf_q_vec_rsrc {
*/
struct idpf_vport {
struct idpf_q_vec_rsrc dflt_qv_rsrc;
- u16 num_txq;
- u32 compln_clean_budget;
struct idpf_tx_queue **txqs;
- bool crc_enable;
-
- bool xdpsq_share;
+ u16 num_txq;
u16 num_xdp_txq;
u16 xdp_txq_offset;
+ bool xdpsq_share;
struct bpf_prog *xdp_prog;
- struct libeth_rx_pt *rx_ptype_lkup;
-
struct iidc_rdma_vport_dev_info *vdev_info;
struct idpf_adapter *adapter;
struct net_device *netdev;
DECLARE_BITMAP(flags, IDPF_VPORT_FLAGS_NBITS);
- u16 vport_type;
+ u32 compln_clean_budget;
u32 vport_id;
+ u16 vport_type;
u16 idx;
- bool default_vport;
u16 max_mtu;
u8 default_mac_addr[ETH_ALEN];
u16 rx_itr_profile[IDPF_DIM_PROFILE_SLOTS];
u16 tx_itr_profile[IDPF_DIM_PROFILE_SLOTS];
- struct idpf_port_stats port_stats;
+ struct libeth_rx_pt *rx_ptype_lkup;
+ struct idpf_port_stats port_stats;
+ bool default_vport;
+ bool crc_enable;
bool link_up;
struct idpf_ptp_vport_tx_tstamp_caps *tx_tstamp_caps;
--
2.39.2
next prev parent reply other threads:[~2025-10-21 23:20 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-21 23:30 [Intel-wired-lan] [PATCH iwl-next v9 00/10] refactor IDPF resource Joshua Hay
2025-10-21 23:30 ` [Intel-wired-lan] [PATCH iwl-next v9 01/10] idpf: introduce local idpf structure to store virtchnl queue chunks Joshua Hay
2025-11-03 15:27 ` Salin, Samuel
2025-11-08 17:20 ` Simon Horman
2025-11-12 18:49 ` Hay, Joshua A
2025-10-21 23:30 ` [Intel-wired-lan] [PATCH iwl-next v9 02/10] idpf: introduce idpf_q_vec_rsrc struct and move vector resources to it Joshua Hay
2025-11-03 15:27 ` Salin, Samuel
2025-10-21 23:30 ` [Intel-wired-lan] [PATCH iwl-next v9 03/10] idpf: move queue resources to idpf_q_vec_rsrc structure Joshua Hay
2025-11-03 15:27 ` Salin, Samuel
2025-10-21 23:30 ` [Intel-wired-lan] [PATCH iwl-next v9 04/10] idpf: move some iterator declarations inside for loops Joshua Hay
2025-10-22 6:42 ` Loktionov, Aleksandr
2025-11-03 15:27 ` Salin, Samuel
2025-10-21 23:30 ` Joshua Hay [this message]
2025-11-03 15:28 ` [Intel-wired-lan] [PATCH iwl-next v9 05/10] idpf: reshuffle idpf_vport struct members to avoid holes Salin, Samuel
2025-10-21 23:30 ` [Intel-wired-lan] [PATCH iwl-next v9 06/10] idpf: add rss_data field to RSS function parameters Joshua Hay
2025-10-22 6:43 ` Loktionov, Aleksandr
2025-11-03 15:28 ` Salin, Samuel
2025-10-21 23:30 ` [Intel-wired-lan] [PATCH iwl-next v9 07/10] idpf: remove vport pointer from queue sets Joshua Hay
2025-11-03 15:28 ` Salin, Samuel
2025-10-21 23:30 ` [Intel-wired-lan] [PATCH iwl-next v9 08/10] idpf: generalize send virtchnl message API Joshua Hay
2025-11-03 15:28 ` Salin, Samuel
2025-10-21 23:30 ` [Intel-wired-lan] [PATCH iwl-next v9 09/10] idpf: avoid calling get_rx_ptypes for each vport Joshua Hay
2025-11-03 15:28 ` Salin, Samuel
2025-10-21 23:30 ` [Intel-wired-lan] [PATCH iwl-next v9 10/10] idpf: generalize mailbox API Joshua Hay
2025-10-22 6:43 ` Loktionov, Aleksandr
2025-11-03 15:28 ` Salin, Samuel
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=20251021233056.1320108-6-joshua.a.hay@intel.com \
--to=joshua.a.hay@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
/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