Re: [Intel-wired-lan] [PATCH iwl-next v4 5/9] idpf: reshuffle idpf_vport struct members to avoid holes

2025-05-21 Thread Salin, Samuel



> -Original Message-
> From: Intel-wired-lan  On Behalf Of
> Pavan Kumar Linga
> Sent: Thursday, May 8, 2025 2:50 PM
> To: [email protected]
> Cc: [email protected]; Olech, Milena ;
> Nadezhdin, Anton ; Linga, Pavan Kumar
> 
> Subject: [Intel-wired-lan] [PATCH iwl-next v4 5/9] idpf: reshuffle idpf_vport
> struct members to avoid holes
> 
> 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 
> Signed-off-by: Pavan Kumar Linga 
> ---
> 2.43.0

Tested-by: Samuel Salin 


[Intel-wired-lan] [PATCH iwl-next v4 5/9] idpf: reshuffle idpf_vport struct members to avoid holes

2025-05-08 Thread Pavan Kumar Linga
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 
Signed-off-by: Pavan Kumar Linga 
---
 drivers/net/ethernet/intel/idpf/idpf.h | 27 +-
 1 file changed, 13 insertions(+), 14 deletions(-)

diff --git a/drivers/net/ethernet/intel/idpf/idpf.h 
b/drivers/net/ethernet/intel/idpf/idpf.h
index 8e13cf29dec7..188bd8364080 100644
--- a/drivers/net/ethernet/intel/idpf/idpf.h
+++ b/drivers/net/ethernet/intel/idpf/idpf.h
@@ -325,24 +325,24 @@ 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
- * @rx_ptype_lkup: Lookup table for ptypes on RX
  * @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
+ * @num_txq: Number of allocated TX queues
  * @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
  * @sw_marker_wq: workqueue for marker packets
  * @tx_tstamp_caps: Capabilities negotiated for Tx timestamping
@@ -352,27 +352,26 @@ 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;
-
-   struct libeth_rx_pt *rx_ptype_lkup;
 
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 num_txq;
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;
 
wait_queue_head_t sw_marker_wq;
-- 
2.43.0