From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 91BAA224258 for ; Thu, 8 May 2025 21:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746741056; cv=none; b=foNf+Mb7ia7LIKqLxNIV54VlY7yjeQAk9XwRFFB5U8uZ19mTFebLdoIl5d5o0cqYiRNQPQ077Q1jMC/egQQiwzOXW/c+NrFu7twZQVovSbbDR0TzTDnvebI17+yLULS8J/4PmFycxJLsH3yG/EqcLaVZiI0ma11pnAvq39+IqEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1746741056; c=relaxed/simple; bh=7gqMymAVnIrvrkHyvlsiZ//G1rC3/gyHDyZvYIRk38o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=s/s0MsqrlcwXxsJgbD9+MxgUvFuP7dmsw+3cFtLaHFuioltDug7iyw80v7y9gEVr+PH5MdsYJRqHvCs4NnR9XGoWtb43IoDRQYipvupLxmG5HGTZQu27nES5Chj1zS8aDvQbLSCdlwpXc1GqcFrvlyfjyBlGiZ3sopagzcfTKtk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=brp5SOCC; arc=none smtp.client-ip=192.198.163.18 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="brp5SOCC" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1746741054; x=1778277054; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=7gqMymAVnIrvrkHyvlsiZ//G1rC3/gyHDyZvYIRk38o=; b=brp5SOCCzxbvnvP+9vePZd5NxLRp/4zCtmesLUw27cSjMAXgO8RwKrLM QEEwuSMQIRGtVs+fWkYuVrDHCLU5Y8izDWHSELzk8bBTUJGCaB8X2OAoN KvbOpcRk8b4oxnTo57cC2GAozmLFyhu2WOKw+7MquXTaX3V4n6ept5OM+ svqrq/HSCl3AdHNPbMUYwEZdQXVUSFTLWi4DrUNLxzOg9kpwcJorgNYox bUswqWYB3ucMm9M1LJcGlBCGj/AWLAHNkYR4+T5NIzdfEQQMZQotMkKpm RQ8h6rCBONnzeytVZklDMlCob0Xp0pN4q7DPKqCQzhLUkcy9iengF36eq w==; X-CSE-ConnectionGUID: AkyXwZGuRdCGSEABYV7ibA== X-CSE-MsgGUID: LAVj1UbkRq68+Gywu5A0vg== X-IronPort-AV: E=McAfee;i="6700,10204,11427"; a="47808324" X-IronPort-AV: E=Sophos;i="6.15,273,1739865600"; d="scan'208";a="47808324" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 May 2025 14:50:50 -0700 X-CSE-ConnectionGUID: Nl4zLE++RH+xefVbRtZUgg== X-CSE-MsgGUID: WTLarzd/SBuQQHTzGpoZcQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,273,1739865600"; d="scan'208";a="141534280" Received: from unknown (HELO localhost.jf.intel.com) ([10.166.80.55]) by orviesa005.jf.intel.com with ESMTP; 08 May 2025 14:50:49 -0700 From: Pavan Kumar Linga To: intel-wired-lan@lists.osuosl.org Cc: netdev@vger.kernel.org, milena.olech@intel.com, anton.nadezhdin@intel.com, Pavan Kumar Linga Subject: [PATCH iwl-next v4 5/9] idpf: reshuffle idpf_vport struct members to avoid holes Date: Thu, 8 May 2025 14:50:09 -0700 Message-ID: <20250508215013.32668-6-pavan.kumar.linga@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250508215013.32668-1-pavan.kumar.linga@intel.com> References: <20250508215013.32668-1-pavan.kumar.linga@intel.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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