From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2D3545E05; Mon, 2 Dec 2024 14:51:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 91F3D40270; Mon, 2 Dec 2024 14:51:46 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by mails.dpdk.org (Postfix) with ESMTP id 64BD4400D6 for ; Mon, 2 Dec 2024 14:51:45 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1733147505; x=1764683505; h=message-id:date:subject:to:cc:references:from: in-reply-to:mime-version; bh=ejKFdnrAOQHnIp2iQwXGOINKXjE0sIwA/Mp2ADth3Zk=; b=ePq8NZiaai3rBJcFZ8FVGBAbN11GCLvgYMSP8EPCFw0LkPjz3Vm3YrZ/ iO3dBAtTUaihfyO191Ikowa6dP8jVaRUqYBiMoZoHiGZPRPpHWiD5Yji+ Edt0845VtPXn/Dqz1+myaabcTgEfKoEh0/I0SXkgndvaITWMzYxRbdI6G yNwwFDOTvg2HQUbVJA07fvWDJeN1UL/TbjJR+TZZEWRk+kepdHyLr27v1 Ugf9O/evYkjifAMSVY2lb6g9mAWNcFLp3Ylv071UMcDxl1ZIdYd1xCnbD tf1yXA1Jly4NfA4WLOg+HwO0ZGtRcLOV3MkBNDx9HcCZTjB3BIVnK4bDU g==; X-CSE-ConnectionGUID: Ud0fo+/BSnO5YekLlpRniQ== X-CSE-MsgGUID: YRGJT20bQeWx57bYrzchbg== X-IronPort-AV: E=McAfee;i="6700,10204,11274"; a="50834947" X-IronPort-AV: E=Sophos;i="6.12,202,1728975600"; d="scan'208,217";a="50834947" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Dec 2024 05:51:44 -0800 X-CSE-ConnectionGUID: xK2MKIrZQmOb7jBfAgo+FA== X-CSE-MsgGUID: FjbqbHz4Q4G9jjHo4LUA4g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,202,1728975600"; d="scan'208,217";a="93202334" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa006.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 02 Dec 2024 05:51:44 -0800 Received: from orsmsx601.amr.corp.intel.com (10.22.229.14) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 2 Dec 2024 05:51:43 -0800 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Mon, 2 Dec 2024 05:51:43 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.174) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Mon, 2 Dec 2024 05:51:43 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nq+yhKzukVxdfSDtX/xCX4U50y5nbkbXAQ772vZSIx/pVjTsWFvIRLndObjsH953nxTCN7z4pUYv+DszcjtGHkP+txLrPoJ4zud0Sts1kjrCEVwYbWwD915rKkTycSxivw7v1SUpFP92lQVF9699aTPd4elGcTSxtIOPFtNf+ifbs9J3GEKZuXIYuBJdkfcBj5Fbl5Ryc8T+8i9fAzk91JEzF0wdDAmEhFlefLWgGuJ1KxW6LRhQaxQd5p8g3moJ6ghQVCVfO11EpAKbCJD2FD+k4bkQh5J+6h5bL1PQvruubsc6Ba6Fvq9n2fcDjAAUFh44Cqqo3MoL9zVXc3AOzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=XbtPsNm6iCdHlqp3n/ryENefWM3i2UM9nqBJtviGtjs=; b=klnuiA8ugKQUlGr540mvG+uUsa9/N91UXC9DCpqMQ/Gg/a8G2NH1fUORsJJuxipPRlvBeTO2gfCAxXXiNRPLiLDrZswnbSAbg2Po0ND3Wx7JtOIZA5YZj6bzF0bgREBB3u6TdEi1pbLU4hYrLO0UJEz3JZ8TzlzNQZw9wAnniO0IkizNlsT6MKpPwD/3V2airIQ133QBFxmcy6vORpWhtxIN8ahAiBtvN+8CI7mVUy4ZpG6D6UJDe0+oHEY5EMYY7p4mnljltM2rQcp3V32GwHWevzynyLRWNLcFXU0yO/YGqCW1DtV6fJ3z3uapPZkyUcY1JxGAYp4q7RjjMmohVw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by BL3PR11MB6339.namprd11.prod.outlook.com (2603:10b6:208:3b3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.19; Mon, 2 Dec 2024 13:51:39 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::5851:319:3da6:850b%6]) with mapi id 15.20.8207.017; Mon, 2 Dec 2024 13:51:39 +0000 Content-Type: multipart/alternative; boundary="------------EVxOv23MsXfsNzzhn00dqcMd" Message-ID: <69c37ea1-5171-42c1-a5bf-c5572fc2d037@intel.com> Date: Mon, 2 Dec 2024 13:51:35 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 09/21] net/ixgbe: use common Tx queue structure To: Bruce Richardson , CC: Anatoly Burakov , Wathsala Vithanage , Konstantin Ananyev References: <20241122125418.2857301-1-bruce.richardson@intel.com> <20241202112444.1517416-1-bruce.richardson@intel.com> <20241202112444.1517416-10-bruce.richardson@intel.com> Content-Language: en-US From: "Medvedkin, Vladimir" In-Reply-To: <20241202112444.1517416-10-bruce.richardson@intel.com> X-ClientProxiedBy: DU7P250CA0022.EURP250.PROD.OUTLOOK.COM (2603:10a6:10:54f::6) To SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR11MB5772:EE_|BL3PR11MB6339:EE_ X-MS-Office365-Filtering-Correlation-Id: 4379e5cc-1a94-414a-ba6c-08dd12d8722a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|1800799024|8096899003; X-Microsoft-Antispam-Message-Info: =?utf-8?B?S3dvMVhCdmpMbDZ4akVpVHR0QmFFbzhVME5VdXJLRXhVdlhSWTB0Q2tHRVJl?= =?utf-8?B?cXYzMlY3M2dpRUFHY2RmWXkzWnVkUVljSUU0cStPZzhEM3k1MThMWVlZckw1?= =?utf-8?B?VWUyRGQxZGRBTHhCZEZBb1l4SDg3N2ZmcEFCR2lWMVM1bjNvQ01qUU90OW1i?= =?utf-8?B?UzNpclhPTUl0NW8vcTRhMzRJSVNMYVh1WENXc1JnWEV4c041cSs4SktmWlVX?= =?utf-8?B?cnZtOEtJenBTb1phTFpGM2pWb212amNsNlRwdEZUWHB3ZFY0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1bUc0Z0hWSlFaRDNDSlU2emVX?= =?utf-8?B?NHRaYkxmb0F4ekFGb1VKYVErQkJHcDBVT29HOHRKV2Q3R094Yy9TRnp2aS83?= =?utf-8?B?Q05kb2VpeVMxUG1pa05FRG1aNVpLVHowWVowMEduQlh0VFlSM2lJclNMWkxV?= =?utf-8?B?dTBCWWhoZmdlbUZyWlpveTY2bFM1OW1ab3g0NHMzMUZXNGE4YlBseEhKRGZt?= =?utf-8?B?Y0hKOXZrT1lxTE52ZWF3MGdySmNXeGJwenVDLy80Rlp2cmRvL01IelgreE5l?= =?utf-8?B?TEhYYnA1NENlc1crenJkN2U0S2IzTmhkU2VldGkwT1o4NzNjcnNoenpwNDhY?= =?utf-8?B?TTZMMjB1bFZ2eEtRTUxBTnRTZVNwT1dkNEM5TVFwNmRtVFpOYlpiYkl6WlZq?= =?utf-8?B?LzNYVG9iUHNqS2JVb2JYUnVJa0NVNXhBUTdsMWVlMVJnUm1XZzJnZ1pKOExy?= =?utf-8?B?UW5ZSWVsUWZzTUZoMDk1eVZLOWhDZWxVUDZIWTdna2dLbDdSejJ2Mld0YXF0?= =?utf-8?B?bEVjZ3I4Z1AxaGo5YWtNbS9BYVYyRVZXL3NzbFd0NHFCMjhEalhyUVZVQkpL?= =?utf-8?B?MG9BUXkrSmYzOGdDZVBrVFBFMVJ5VjZSZ2JCQVhXUjhiTzQrMmFOVSs0UnVC?= =?utf-8?B?eGluZ2FOWVZhN0dGZktDUT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(1800799024)(8096899003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U3VGdVpRSVcxbmFkZGlRN2xVSnN1Y3lzUWp2UTczKzBqcHdjYW42R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S0ppd285eWhNVTcwQ24rd25DRFlZYlpST0JJY2hKc1Ir?= =?utf-8?B?V0tpa1k4S0F3UHhIZFNDeUVRQ2dFYy9idmRJa1BxNGRNUWZUSmo3ZVRnU1pD?= =?utf-8?B?Z0RKcFkycU5iM3Vyb1lLcjRVbDRYVHNSSE5KOXRvWEdVT1V5Mjl4ajJLdkpp?= =?utf-8?B?azMzMC9GSWFqMjBsVm5JZ01VWnlCaGFIQmZaSDhMOUxRcU1WckVzS0owamFV?= =?utf-8?B?dXFPeDByTkxCc1RTYWlxOHk3QXBHTFhKMVVPSlZvaDB3bXQ0UTZLZ3Rqa2h4?= =?utf-8?B?MmhJMXFBbmlnYXVvZ2Q5WmZuVklRRjJlNVJiWi8zK2R6bnRyTUZuYytVVFIy?= =?utf-8?B?NUE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 4379e5cc-1a94-414a-ba6c-08dd12d8722a X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Dec 2024 13:51:39.5193 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: GDQJqhtLZIsO+KE9Zl/+ZmQMBjytpGVjoi6t9YQSmmOl+iXElk4m5NIn05lE7HpZfWc4M5+HTL/6N+oU/MAabKNfjDima3Ydu+nVC+kkMiQ= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6339 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org --------------EVxOv23MsXfsNzzhn00dqcMd Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit Hi Bruce, On 02/12/2024 11:24, Bruce Richardson wrote: > Merge in additional fields used by the ixgbe driver and then convert it > over to using the common Tx queue structure. > > Signed-off-by: Bruce Richardson > --- > drivers/net/_common_intel/tx.h | 14 +++- > drivers/net/ixgbe/ixgbe_ethdev.c | 4 +- > .../ixgbe/ixgbe_recycle_mbufs_vec_common.c | 2 +- > drivers/net/ixgbe/ixgbe_rxtx.c | 64 +++++++++---------- > drivers/net/ixgbe/ixgbe_rxtx.h | 56 ++-------------- > drivers/net/ixgbe/ixgbe_rxtx_vec_common.h | 26 ++++---- > drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c | 14 ++-- > drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c | 14 ++-- > 8 files changed, 80 insertions(+), 114 deletions(-) > > diff --git a/drivers/net/_common_intel/tx.h b/drivers/net/_common_intel/tx.h > index c4a1a0c816..51ae3b051d 100644 > --- a/drivers/net/_common_intel/tx.h > +++ b/drivers/net/_common_intel/tx.h > @@ -34,9 +34,13 @@ struct ci_tx_queue { > volatile struct i40e_tx_desc *i40e_tx_ring; > volatile struct iavf_tx_desc *iavf_tx_ring; > volatile struct ice_tx_desc *ice_tx_ring; > + volatile union ixgbe_adv_tx_desc *ixgbe_tx_ring; > }; > volatile uint8_t *qtx_tail; /* register address of tail */ > - struct ci_tx_entry *sw_ring; /* virtual address of SW ring */ > + union { > + struct ci_tx_entry *sw_ring; /* virtual address of SW ring */ > + struct ci_tx_entry_vec *sw_ring_vec; > + }; > rte_iova_t tx_ring_dma; /* TX ring DMA address */ > uint16_t nb_tx_desc; /* number of TX descriptors */ > uint16_t tx_tail; /* current value of tail register */ > @@ -87,6 +91,14 @@ struct ci_tx_queue { > uint8_t tc; > bool use_ctx; /* with ctx info, each pkt needs two descriptors */ > }; > + struct { /* ixgbe specific values */ > + const struct ixgbe_txq_ops *ops; > + struct ixgbe_advctx_info *ctx_cache; 'struct ixgbe_advctx_info ctx_cache[IXGBE_CTX_NUM];' takes only 80 bytes of memory, so using a pointer saves 72 bytes. Since the final version of the 'struct ci_tx_queue' without driver specific fields takes 96 bytes, embedding 'ixgbe_advctx_info ctx_cache[2]' array will take one more cache line, which is hot a huge deal in my opinion. Or consider another (possibly better) approach, where for non IXGBE 'struct ci_tx_queue' will remain the same size, but only for IXGBE an extra 80 bytes will be alllocated: struct {/* ixgbe specific values */                         const struct ixgbe_txq_ops *ops;                         uint32_t ctx_curr;                         uint8_t pthresh;  /**< Prefetch threshold register. */                         uint8_t hthresh;  /**< Host threshold register. */                         uint8_t wthresh;  /**< Write-back threshold reg. */                         uint8_t using_ipsec; /**< indicates that IPsec TX feature is in use */ struct ixgbe_advctx_info ctx_cache[0];                 }; > + uint32_t ctx_curr; > +#ifdef RTE_LIB_SECURITY > + uint8_t using_ipsec; /**< indicates that IPsec TX feature is in use */ > +#endif > + }; > }; > }; > -- Regards, Vladimir --------------EVxOv23MsXfsNzzhn00dqcMd Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: 8bit

Hi Bruce,

On 02/12/2024 11:24, Bruce Richardson wrote:
Merge in additional fields used by the ixgbe driver and then convert it
over to using the common Tx queue structure.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 drivers/net/_common_intel/tx.h                | 14 +++-
 drivers/net/ixgbe/ixgbe_ethdev.c              |  4 +-
 .../ixgbe/ixgbe_recycle_mbufs_vec_common.c    |  2 +-
 drivers/net/ixgbe/ixgbe_rxtx.c                | 64 +++++++++----------
 drivers/net/ixgbe/ixgbe_rxtx.h                | 56 ++--------------
 drivers/net/ixgbe/ixgbe_rxtx_vec_common.h     | 26 ++++----
 drivers/net/ixgbe/ixgbe_rxtx_vec_neon.c       | 14 ++--
 drivers/net/ixgbe/ixgbe_rxtx_vec_sse.c        | 14 ++--
 8 files changed, 80 insertions(+), 114 deletions(-)

diff --git a/drivers/net/_common_intel/tx.h b/drivers/net/_common_intel/tx.h
index c4a1a0c816..51ae3b051d 100644
--- a/drivers/net/_common_intel/tx.h
+++ b/drivers/net/_common_intel/tx.h
@@ -34,9 +34,13 @@ struct ci_tx_queue {
 		volatile struct i40e_tx_desc *i40e_tx_ring;
 		volatile struct iavf_tx_desc *iavf_tx_ring;
 		volatile struct ice_tx_desc *ice_tx_ring;
+		volatile union ixgbe_adv_tx_desc *ixgbe_tx_ring;
 	};
 	volatile uint8_t *qtx_tail;               /* register address of tail */
-	struct ci_tx_entry *sw_ring; /* virtual address of SW ring */
+	union {
+		struct ci_tx_entry *sw_ring; /* virtual address of SW ring */
+		struct ci_tx_entry_vec *sw_ring_vec;
+	};
 	rte_iova_t tx_ring_dma;        /* TX ring DMA address */
 	uint16_t nb_tx_desc;           /* number of TX descriptors */
 	uint16_t tx_tail; /* current value of tail register */
@@ -87,6 +91,14 @@ struct ci_tx_queue {
 			uint8_t tc;
 			bool use_ctx;  /* with ctx info, each pkt needs two descriptors */
 		};
+		struct { /* ixgbe specific values */
+			const struct ixgbe_txq_ops *ops;
+			struct ixgbe_advctx_info *ctx_cache;
'struct ixgbe_advctx_info ctx_cache[IXGBE_CTX_NUM];' takes only 80 bytes of memory, so using a pointer saves 72 bytes. Since the final version of the 'struct ci_tx_queue' without driver specific fields takes 96 bytes, embedding 'ixgbe_advctx_info ctx_cache[2]' array will take one more cache line, which is hot a huge deal in my opinion.

Or consider another (possibly better) approach, where for non IXGBE 'struct ci_tx_queue' will remain the same size, but only for IXGBE an extra 80 bytes will be alllocated:

struct { /* ixgbe specific values */

                        const struct ixgbe_txq_ops *ops;

                        uint32_t ctx_curr;

                        uint8_t pthresh;   /**< Prefetch threshold register. */

                        uint8_t hthresh;   /**< Host threshold register. */

                        uint8_t wthresh;   /**< Write-back threshold reg. */

                        uint8_t using_ipsec;  /**< indicates that IPsec TX feature is in use */
                        struct ixgbe_advctx_info ctx_cache[0];

                };

+			uint32_t ctx_curr;
+#ifdef RTE_LIB_SECURITY
+			uint8_t using_ipsec;  /**< indicates that IPsec TX feature is in use */
+#endif
+		};
 	};
 };
 
<snip>

    
-- 
Regards,
Vladimir
--------------EVxOv23MsXfsNzzhn00dqcMd--