Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7CC8F606A332 for ; Mon, 30 Nov 2026 17:13:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256 header.s=default header.b=yo+72e9W; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hU0dCrjk Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5B2844065C; Mon, 30 Nov 2026 17:13:56 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id CwRKSepfxDBL; Mon, 30 Nov 2026 17:13:55 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp4.osuosl.org 823C640662 Authentication-Results: smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 ARC-Seal: i=1; d=osuosl.org; s=arc; a=rsa-sha256; cv=none; t=1796058835; b=MXicTuQCc9nfH+LGqeh0udimc2gJQqJdNf8OdpgvPx1MoK+ote2GuI7u/gzHKAt7Bqha 8Wk3gYUeMBxa9Aqnw0Tn+4uIK9rCD7FLCsiwEZQkQry9i591nZlluRM+qhWhqeVuVnXai yAqg235ir4eqIc+a1M0LLuRp7ZBgVsGh4U/GPOPQgeP0neeFU+9VS51DQseUwLV9Dhlof lxFMBoEaKaaSViH74cu+9oxvqk6ooq39WTfQqifafOLlUc1qgF6aA2GMgPgVctqk0jRxi 3Cf04U1qjP3q9sVFmCFGOER32nQeBVIXySq5loJL2SkO6Tl5u3b0XqaJbxSpY0gb+mg== ARC-Message-Signature: i=1; d=osuosl.org; s=arc; a=rsa-sha256; c=relaxed/relaxed; t=1796058835; h=X-Comment:DKIM-Signature:X-Original-To:Delivered-To:Received: Received:X-Virus-Scanned:X-Spam-Flag:X-Spam-Score:X-Spam-Level: X-Spam-Status:Received:ARC-Filter:Received-SPF:Received: DKIM-Signature:X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-IronPort-AV: X-IronPort-AV:Received:X-CSE-ConnectionGUID:X-CSE-MsgGUID:X-ExtLoop1: X-IronPort-AV:Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer: MIME-Version:Content-Transfer-Encoding:X-BeenThere:X-Mailman-Version: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help: List-Subscribe:Errors-To; bh=8C4nWqgS2NM/uFe2/cYDilHnVW7tKHUeRlwquuek9PY=; b=ey4tMqcrnBefNhijSfBIeTLo/oxjTBLRq36tcbel67IkW2tcMMbh9cDk4tE0+rVQpze3 05hcA558sGqmeNJv8C4kiI34veNuUuBHfiW1NmXUUkFXOjaSRaPprmorAkFTiJlDWGdGU t+tyvGypsHz21BV9f60jZLkGbgW9UAD5+7nqs5afHetH7O46CsqziGVPvbN1O9D+1fptv pR2aTPe5TVlFCQEEOJ0UsKcqTYHkqLb0RvLdqMTOtmIbqVaZJGPFZiu/WFsjnbActj2BS JW0i9uhmZcpAhIK25RqdKLC+iaG9IXRBUxBHdkbBQj0flFECc5mqZ3II2OMHMs66oOw== ARC-Authentication-Results: i=1; smtp4.osuosl.org; arc=none smtp.remote-ip=140.211.166.142 X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1796058835; bh=8C4nWqgS2NM/uFe2/cYDilHnVW7tKHUeRlwquuek9PY=; h=From:To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=yo+72e9W+dS2TGQgB43zLAEil/hHSoRPraZMILqXxKL3Y0Kq46xtFefRSb3mzHwRC V6zzxCVW2MQRm9H3xC3PG6Y3RiFyqQUV3ScHYxfWpSHUguArWUOjsMTXc+t4mAPWbG cYvIMjyBgGvOvb2nfG9SBhlYDUIKJ6heUI9D9a1HhgWwWEK8+CjnNPCjBgE4fCSnSH /kr3WeMRCLp62SDKHk+3U6BxlXGTiLvxClYXVD+umxzOXHoJ2LxfuujTpuWLg68S9Q 9Vcttq8ZYz2EpBmFCdTX4UyeXJgy7Jr/RNDVJrr4Lb9TXKIXkinHsafMI5v5BMwKiK cd+zHPEKL1rbw== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp4.osuosl.org (Postfix) with ESMTP id 823C640662; Mon, 30 Nov 2026 17:13:55 +0000 (UTC) Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists1.osuosl.org (Postfix) with ESMTP id EABDED1 for ; Mon, 30 Nov 2026 17:13:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id DCC9780893 for ; Mon, 30 Nov 2026 17:13:53 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id ASUMR8LWkACY for ; Mon, 30 Nov 2026 17:13:52 +0000 (UTC) ARC-Filter: OpenARC Filter v1.3.2 smtp1.osuosl.org 7961580889 Authentication-Results: smtp1.osuosl.org; arc=none smtp.remote-ip=192.198.163.17 Received-SPF: None (mailfrom) identity=mailfrom; client-ip=192.198.163.17; helo=mgamail.intel.com; envelope-from=aleksander.lobakin@intel.com; receiver= Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp1.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=hU0dCrjk Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.17]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7961580889 for ; Mon, 30 Nov 2026 17:13:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1796058832; x=1827594832; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=8C4nWqgS2NM/uFe2/cYDilHnVW7tKHUeRlwquuek9PY=; b=hU0dCrjkluvnu66I57pA05xcs6N/eUGAJ0WNd5WW+aiaGBZnQVAgDIuu vyD5G/5yirl4RrgI2LH6NW1d/GFDdjl9WzELr1McBuN5ttFD/Rj/2vRjY W/bumuCwEEpVnclVZeU85wx+1GB1qhuuwlmFPY+ub04rUesQutSoUJAdY VnwjaYNeP+H5BdPYeQ/MeGxmdkbp7OHxau+p9bCp49i2unQinD9BrdLBk 2iQQ/XXFPavw/qs+SlRgM0THp/PSk/lHa7AoHG0KVGJVCV8JWeVU530XG oRqz1UgwMBiBNGkfxWoBccgSnnD9cgysePtfmMKwoxhtR7tXzUYMmc75n g==; X-CSE-ConnectionGUID: urwQSlBjRi6ZTxMU5jt3pg== X-CSE-MsgGUID: QFMWhFLPRui2OGcy0q+gRw== X-IronPort-AV: E=McAfee;i="6800,10657,11982"; a="4901028" X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208,223";a="4901028" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa111.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Nov 2026 09:13:51 -0800 X-CSE-ConnectionGUID: V28jeBhiReuPPUzKA1x1dw== X-CSE-MsgGUID: qAbedkBVSsOLv1vAMM76qg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.27,243,1787036400"; d="scan'208,223";a="13315499" Received: from newjersey.igk.intel.com ([10.102.20.203]) by fmviesa006.fm.intel.com with ESMTP; 30 Nov 2026 09:13:50 -0800 From: Alexander Lobakin To: intel-wired-lan@lists.osuosl.org Cc: Alexander Lobakin , Tony Nguyen , Przemek Kitszel Subject: [PATCH iwl-next v4 0/4] idpf: add flow-based XDP fallback for FWs without Tx FIFO support Date: Mon, 30 Nov 2026 18:11:16 +0100 Message-ID: <20261130171120.2847833-1-aleksander.lobakin@intel.com> X-Mailer: git-send-email 2.56.1 X-Archived-By: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Archive: List-Post: List-Help: List-Subscribe: , X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_NONE,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 From the first days of XDP implementation in idpf, it relied and worked solely on top of the queue-based scheduling Tx mode, which basically means simple FIFO. However, turned out not every firmware supports this mode and XDP doesn't work there at all. Start with some good Sashiko findings. One empty XDPSQE which idpf requires is always reserved only in XSk xmit code, but not in the rest of cases. XDPCQE parsing can end up with partial reads on BE systems. XDPSQ configuration code can pass out-of-bounds values to cpu_to_mem() in rare cases (nr_cpu_ids < num_xdpsq). Then, introduce the flow-based fallback for all XDP paths which is always supported by any FW. The actual implementation is selected during XDP program setup basing on the caps that the FW advertises, so that firmwares that already work correctly won't get performance regressions the fallback brings. Alexander Lobakin (4): idpf: always reserve one empty descriptor on XDPSQs idpf: enforce strict ordering on BE when reading XDPCQEs idpf: fix possible out-of-bound cpu_to_mem() when configuring XDPSQs idpf: add flow-based XDP fallback for FWs without Tx FIFO support drivers/net/ethernet/intel/idpf/idpf_txrx.h | 18 ++- drivers/net/ethernet/intel/idpf/xdp.h | 60 ++++++++ include/net/libeth/xdp.h | 13 ++ drivers/net/ethernet/intel/idpf/idpf_txrx.c | 19 ++- drivers/net/ethernet/intel/idpf/xdp.c | 155 ++++++++++++++++++-- drivers/net/ethernet/intel/idpf/xsk.c | 2 +- 6 files changed, 244 insertions(+), 23 deletions(-) --- From v3[0]: * new fix (0002): fix out-of-bound cpu_to_mem() when nr_cpu_ids is lower than the number of XDPSQs (Sashiko). From v2[1]: * new fix (0001): fix already existing issue with not reserving a required free Tx descriptor in case of XDP Tx, xmit, and XSk Tx (Sashiko); * new fix (0002): enforce strict ordering when parsing XDPCQEs on Big Endian (Intel's Sashiko); * rewrite the bitmap set-reset implementation from scratch to fix fix S/G: HW generates a completion per packet, not per descriptor (Sashiko); * fix excessive allocations, possible pointer overwrites, and corner case static key imbalance when setting up XDPSQs (Intel's Sashiko). From v1[2]: * rework static key management: move to idpf_xdpsqs_{get,put}() to avoid refcount imbalance issues as .ndo_bpf() is not always called in pairs (hardware reset etc.) (Sashiko, Intel's Sashiko); * don't zero the whole pending window but only the frames sent since the last batch to avoid missed OOO completions (Intel's Sashiko); * micro-optimize idpf_xdpsq_set_rs{,_fb}(). Sorry I've had health issues for the last year. I hope I'll be restoring my usual "usefulness" (reviews, submissions) on the LKML bit by bit. [0] https://lore.kernel.org/intel-wired-lan/20261119140938.1363722-1-aleksander.lobakin@intel.com [1] https://lore.kernel.org/intel-wired-lan/20260818155101.2416665-1-aleksander.lobakin@intel.com [2] https://lore.kernel.org/intel-wired-lan/20260708151327.1091570-1-aleksander.lobakin@intel.com -- 2.56.1