From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5B8E2ECD6D7 for ; Wed, 11 Feb 2026 18:13:29 +0000 (UTC) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 82B154026A; Wed, 11 Feb 2026 19:13:28 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id 59AF3400D7 for ; Wed, 11 Feb 2026 19:13:27 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1770833607; x=1802369607; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=wYL2YS+eL2Jrnuf43G1ALPMgBo/8l53Q6UzZW0FR6Us=; b=UodMRsAtbYWeogmj/nBVCYm6NLcFC0kwIOgb1P9MvQQHUsmJVfGtlhv6 E6cyuO3ug8sMMGC+VCP8OdpByTUrRtglwdRT/W8MU2DXC9AiPTbvOaJMq SCnq7mZHYYVSy0BloZ4P0tO0Hm9itmTgxTOsxMhWo8gPG7z+co2Gw0xb0 Q8hXDxhxCNbYndyRn6nuXl49heJ/rH6ghwOFmIKsaxuzoSI0CMOQNFM6J 8OkeYnRU9xh8JVtzhz/WeIqA+dkfnXuiHGUTNlbPsRGtRlc64pxRn2dUd loNmVtB02lFrVy9+dCRdQeVRKQgvgFxV9NPJ4qvx1QlbH3Xes0he+wvhj Q==; X-CSE-ConnectionGUID: C76nHZKqSD6yABkKuqUkUg== X-CSE-MsgGUID: sj6fAUhPT9uRV/XPrzorhw== X-IronPort-AV: E=McAfee;i="6800,10657,11698"; a="75834640" X-IronPort-AV: E=Sophos;i="6.21,285,1763452800"; d="scan'208";a="75834640" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Feb 2026 10:13:26 -0800 X-CSE-ConnectionGUID: fD6V23XlTw+8JmjHt4w3Mg== X-CSE-MsgGUID: nkCdKuU0R9Ch2LAQdDbxTg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,285,1763452800"; d="scan'208";a="249986224" Received: from silpixa00401385.ir.intel.com ([10.20.224.226]) by orviesa001.jf.intel.com with ESMTP; 11 Feb 2026 10:13:25 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v5 00/35] combine multiple Intel scalar Tx paths Date: Wed, 11 Feb 2026 18:12:29 +0000 Message-ID: <20260211181309.2838042-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20251219172548.2660777-1-bruce.richardson@intel.com> References: <20251219172548.2660777-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The scalar Tx paths, with support for offloads and multiple mbufs per packet, are almost identical across drivers ice, i40e, iavf and the single-queue mode of idpf. Therefore, we can do some rework to combine these code paths into a single function which is parameterized by compile-time constants, allowing code saving to give us a single path to optimize and maintain - apart from edge cases like IPSec support in iavf. The ixgbe driver has a number of similarities too, which we take advantage of where we can, but the overall descriptor format is sufficiently different that its main scalar code path is kept separate. Once merged, we can then optimize the drivers a bit to improve performance, and also easily extend some drivers to use additional paths for better performance, e.g. add the "simple scalar" path to IDPF driver for better performance on platforms without AVX. V5: - more updates following review including: * dropped patch 19 for new EAL macro, and used struct alignment instead * added extra comments for some code, e.g. reason to remove volatile * dropped patch 22 marking a branch as unlikely * split bugfix off patch 24 * corrected idpf path selection logic to not assume in-order queue setup V4: - Updates following review: - merged patches 3 and 5 - renamed new file to tx_scalar.h - added UDP_TSO flag to drivers - other minor fixups V3: - rebase on top of latest next-net-intel tree - fix issues with iavf and cpfl drivers seen in some testing V2: - reworked the simple-scalar path as well as full scalar one - added simple scalar path support to idpf driver - small cleanups, e.g. issues flagged by checkpatch Bruce Richardson (36): net/intel: create common Tx descriptor structure net/intel: fix memory leak on TX queue setup failure net/intel: use common Tx ring structure net/intel: create common post-Tx cleanup function net/intel: consolidate definitions for Tx desc fields net/intel: add common fn to calculate needed descriptors net/ice: refactor context descriptor handling net/i40e: refactor context descriptor handling net/idpf: refactor context descriptor handling net/intel: consolidate checksum mask definition net/intel: create common checksum Tx offload function net/intel: create a common scalar Tx function net/i40e: use common scalar Tx function net/intel: add IPsec hooks to common Tx function net/intel: support configurable VLAN tag insertion on Tx net/iavf: use common scalar Tx function net/i40e: document requirement for QinQ support net/idpf: use common scalar Tx function net/intel: avoid writing the final pkt descriptor twice net/intel: write descriptors using non-volatile pointers net/intel: remove unnecessary flag clearing net/intel: mark mid-burst ring cleanup as unlikely net/intel: add special handling for single desc packets net/intel: use separate array for desc status tracking net/ixgbe: use separate array for desc status tracking net/intel: drop unused Tx queue used count net/intel: remove index for tracking end of packet net/intel: merge ring writes in simple Tx for ice and i40e net/intel: consolidate ice and i40e buffer free function net/intel: complete merging simple Tx paths net/intel: use non-volatile stores in simple Tx function net/intel: align scalar simple Tx path with vector logic net/intel: use vector SW ring entry for simple path net/intel: use vector mbuf cleanup from simple scalar path net/idpf: enable simple Tx function net/cpfl: enable simple Tx function doc/guides/nics/i40e.rst | 18 + drivers/net/intel/common/tx.h | 124 ++- drivers/net/intel/common/tx_scalar.h | 589 ++++++++++++++ drivers/net/intel/cpfl/cpfl_rxtx.c | 64 +- drivers/net/intel/i40e/i40e_fdir.c | 34 +- drivers/net/intel/i40e/i40e_rxtx.c | 673 +++------------- drivers/net/intel/i40e/i40e_rxtx.h | 17 +- .../net/intel/i40e/i40e_rxtx_vec_altivec.c | 25 +- drivers/net/intel/i40e/i40e_rxtx_vec_avx2.c | 36 +- drivers/net/intel/i40e/i40e_rxtx_vec_avx512.c | 52 +- drivers/net/intel/i40e/i40e_rxtx_vec_common.h | 6 +- drivers/net/intel/i40e/i40e_rxtx_vec_neon.c | 25 +- drivers/net/intel/iavf/iavf_rxtx.c | 637 ++++----------- drivers/net/intel/iavf/iavf_rxtx.h | 31 +- drivers/net/intel/iavf/iavf_rxtx_vec_avx2.c | 55 +- drivers/net/intel/iavf/iavf_rxtx_vec_avx512.c | 104 +-- drivers/net/intel/iavf/iavf_rxtx_vec_common.h | 36 +- drivers/net/intel/ice/ice_dcf_ethdev.c | 10 +- drivers/net/intel/ice/ice_rxtx.c | 740 ++++-------------- drivers/net/intel/ice/ice_rxtx.h | 16 +- drivers/net/intel/ice/ice_rxtx_vec_avx2.c | 55 +- drivers/net/intel/ice/ice_rxtx_vec_avx512.c | 53 +- drivers/net/intel/ice/ice_rxtx_vec_common.h | 43 +- drivers/net/intel/idpf/idpf_common_device.h | 1 + drivers/net/intel/idpf/idpf_common_rxtx.c | 314 ++------ drivers/net/intel/idpf/idpf_common_rxtx.h | 24 +- .../net/intel/idpf/idpf_common_rxtx_avx2.c | 53 +- .../net/intel/idpf/idpf_common_rxtx_avx512.c | 54 +- drivers/net/intel/idpf/idpf_rxtx.c | 55 +- drivers/net/intel/idpf/idpf_rxtx_vec_common.h | 6 +- drivers/net/intel/ixgbe/ixgbe_rxtx.c | 103 ++- .../net/intel/ixgbe/ixgbe_rxtx_vec_common.c | 3 +- 32 files changed, 1612 insertions(+), 2444 deletions(-) create mode 100644 drivers/net/intel/common/tx_scalar.h -- 2.51.0