From nobody Thu Apr 2 17:36:32 2026 Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AF2673595D for ; Thu, 12 Feb 2026 01:01:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858110; cv=none; b=YCNLEwo62UQgyJlzVwp5W7gJPJCo+Lij94lAz8SDjbPDAtoLy0rQDLAkapJH4Z6TQ1lZ4xKig304ZYLWV//WdK2AB3MKtvAqDAQihFGldDSYMI+26yg2At6iWjZc20z2fwqSc9ShuA9EwIJ/P/nQJyde89mZIPP48TqkHBQW89w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858110; c=relaxed/simple; bh=Mjn2rwH82IJpmlJxfXR9v1Sk/LuhHoeUzV8gbCAibkA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=O9JmihIWK2km7rN1e8G20APmRb9QjFC7uSY7qdZYdlikZXOdXtxkdkv3hwoI2ONG/mHLQdsDndZ1JYuLNPscQC8QaNEjydcapauSyzEeGdaqwM7UmTd9agQq74xdBm2yvyu4H4iYrp9yi6zOsVmm5FaIznQz1MDMDOEAYwVbuEI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=X7dU3k2W; arc=none smtp.client-ip=209.85.128.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="X7dU3k2W" Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-796d68083cdso12102947b3.1 for ; Wed, 11 Feb 2026 17:01:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770858109; x=1771462909; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=1R06yw6EKxaPJEYAiD/GC4GWXLKfIpFl/ud9jyPw8/Y=; b=X7dU3k2WcYUkgJLhVzbY2udeBLv97xg/YP0NtrmwUiGb/GSwVtIiF1i7+jzabHjnHw Bttk9SO1BRd6sH6f2SymOjJhnRQpkNBwrVbL/1HyNDTpRR1jWTYmZn3Xe6iHaAeJT1eQ LlC3crS47iWNwNcdRNtcVo/ecPtWgPfCawpoWLZXohUETlt4H89WGIedm7y6wNdxnY6x EelmpMLNWuk3g6Tm4HH2of0Brk6UL6tlPxIUOCqgT81ezlKG+eer/hg9IrfPi/fzEEx3 NJIFnEmwDaB57ixctX84JKPDD1ebKaC2r4qSlc1CUF3cfVzMHT9HJfiWjELr/VV1gym2 EouQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770858109; x=1771462909; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=1R06yw6EKxaPJEYAiD/GC4GWXLKfIpFl/ud9jyPw8/Y=; b=niDMg0XRe6Zb/HXt/MvreOuvY6GwusRjnWZKzs7/gAUdr1EaY1OroYrg93j148/Abl A9e7FWh/RG3MYHsFveqWy3twzE7Djz9LIJf3Dr6wam3S4Cc3TnrRyyvT1CzDFb+JIvaq Ey0TsDJCZ4CweWAWeAdxqf0LcWHfwb1MzRu/sGh1YJG/VLxcy9xZUFAjyJZL+nJgIkdu Q7GJgI880DD+ofwgb1leOvcpIidUKwyLnnqbX4m/lbreRQYyossYYjosR8H0BE4Y6qnp vni08XQXgDAWy2l81cygqa+nhN/mmK4Zwmvf2fAjvnFUD+GFctjq5/H4iR4OA97RZv3c dlvA== X-Forwarded-Encrypted: i=1; AJvYcCUrmJnMnsQ/3MP3hxPxgtsV8vfRo5hcl5HvcadDXwonMRavDKxKCvoEBzfnsk1D5aEO8RJpatsuk8BScdY=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5hdOsJ2KvVLYiCnDNT/82Y8ah4QDd6Z0n1rw8vkgLp0glzy3z x2SyDDUw5Suz7OkQgKGxOCuoqMwovKQzApIunej0NEN911VaIw5JgwAc X-Gm-Gg: AZuq6aLzei/XPsTdpdzvK4bqQCHnuBF/Mlb3LzF4f7pIdEcTd999rorGGIVCeT5StcB 4DYKFFn9CMa7WJjl87pzc902AKWukRKufMJciB9TefPBRt8stByvrFGmhJn/f84GT1hgaQNIKmU gfj0NOR4mPwYdIFuJfGKefkH/CWai8QB+H3llRn+Oop6lvPBm/0JIopRCdWlgW8arX7j6fd73ho qj8EF22RzouX5u3QaWhkH9pTC8UQR9gzHBvBMmuxWmgHKaI+W7GDnSGymy1Vvi1VSVH8ObvuRMp rIDJDu0NO0culupB9eKiGMzCUQ6H2Icv/P3IaxwwiqTT8/R8TlajXYBrcYQ+OBr9vV4LUvsvWtt cdmek4vtsNpLr28oZ0l3fpNKUmXyE7iwwWoK28C28L70tc3URllHwIdmTC1pDC5uM+v/lzHdIxb Q461+ksUh6lxYeytOt561/urMcEw8aFRoW X-Received: by 2002:a05:690c:802:b0:796:3e25:3e95 with SMTP id 00721157ae682-7977171b436mr6476207b3.18.1770858108692; Wed, 11 Feb 2026 17:01:48 -0800 (PST) Received: from localhost ([2a03:2880:25ff:4a::]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7966c254d1esm32678167b3.41.2026.02.11.17.01.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 17:01:48 -0800 (PST) From: Bobby Eshleman Date: Wed, 11 Feb 2026 17:00:41 -0800 Subject: [PATCH net 1/4] eth: fbnic: set FBNIC_QUEUE_RDE_CTL0_EN_HDR_SPLIT on RDE_CTL0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260211-fbnic-tcp-hds-fixes-v1-1-55d050e6f606@meta.com> References: <20260211-fbnic-tcp-hds-fixes-v1-0-55d050e6f606@meta.com> In-Reply-To: <20260211-fbnic-tcp-hds-fixes-v1-0-55d050e6f606@meta.com> To: Alexander Duyck , Jakub Kicinski , kernel-team@meta.com, Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Mohsin Bashir , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Bobby Eshleman X-Mailer: b4 0.14.3 From: Bobby Eshleman Fix EN_HDR_SPLIT configuration by writing the field to RDE_CTL0 instead of RDE_CTL1. Because drop mode configuration and header splitting enablement both use RDE_CTL0, we consolidate these configurations into the single function fbnic_config_drop_mode. Fixes: 2b30fc01a6c7 ("eth: fbnic: Add support for HDS configuration") Signed-off-by: Bobby Eshleman Acked-by: Mohsin Bashir --- drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c b/drivers/net/eth= ernet/meta/fbnic/fbnic_txrx.c index 13d508ce637f..e119526fce14 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.c @@ -2575,7 +2575,8 @@ static void fbnic_enable_bdq(struct fbnic_ring *hpq, = struct fbnic_ring *ppq) } =20 static void fbnic_config_drop_mode_rcq(struct fbnic_napi_vector *nv, - struct fbnic_ring *rcq, bool tx_pause) + struct fbnic_ring *rcq, bool tx_pause, + bool hdr_split) { struct fbnic_net *fbn =3D netdev_priv(nv->napi.dev); u32 drop_mode, rcq_ctl; @@ -2588,22 +2589,26 @@ static void fbnic_config_drop_mode_rcq(struct fbnic= _napi_vector *nv, /* Specify packet layout */ rcq_ctl =3D FIELD_PREP(FBNIC_QUEUE_RDE_CTL0_DROP_MODE_MASK, drop_mode) | FIELD_PREP(FBNIC_QUEUE_RDE_CTL0_MIN_HROOM_MASK, FBNIC_RX_HROOM) | - FIELD_PREP(FBNIC_QUEUE_RDE_CTL0_MIN_TROOM_MASK, FBNIC_RX_TROOM); + FIELD_PREP(FBNIC_QUEUE_RDE_CTL0_MIN_TROOM_MASK, FBNIC_RX_TROOM) | + FIELD_PREP(FBNIC_QUEUE_RDE_CTL0_EN_HDR_SPLIT, hdr_split); =20 fbnic_ring_wr32(rcq, FBNIC_QUEUE_RDE_CTL0, rcq_ctl); } =20 -void fbnic_config_drop_mode(struct fbnic_net *fbn, bool tx_pause) +void fbnic_config_drop_mode(struct fbnic_net *fbn, bool txp) { + bool hds; int i, t; =20 + hds =3D fbn->hds_thresh < FBNIC_HDR_BYTES_MIN; + for (i =3D 0; i < fbn->num_napi; i++) { struct fbnic_napi_vector *nv =3D fbn->napi[i]; =20 for (t =3D 0; t < nv->rxt_count; t++) { struct fbnic_q_triad *qt =3D &nv->qt[nv->txt_count + t]; =20 - fbnic_config_drop_mode_rcq(nv, &qt->cmpl, tx_pause); + fbnic_config_drop_mode_rcq(nv, &qt->cmpl, txp, hds); } } } @@ -2654,20 +2659,18 @@ static void fbnic_enable_rcq(struct fbnic_napi_vect= or *nv, { struct fbnic_net *fbn =3D netdev_priv(nv->napi.dev); u32 log_size =3D fls(rcq->size_mask); - u32 hds_thresh =3D fbn->hds_thresh; u32 rcq_ctl =3D 0; - - fbnic_config_drop_mode_rcq(nv, rcq, fbn->tx_pause); + bool hdr_split; + u32 hds_thresh; =20 /* Force lower bound on MAX_HEADER_BYTES. Below this, all frames should * be split at L4. It would also result in the frames being split at * L2/L3 depending on the frame size. */ - if (fbn->hds_thresh < FBNIC_HDR_BYTES_MIN) { - rcq_ctl =3D FBNIC_QUEUE_RDE_CTL0_EN_HDR_SPLIT; - hds_thresh =3D FBNIC_HDR_BYTES_MIN; - } + hdr_split =3D fbn->hds_thresh < FBNIC_HDR_BYTES_MIN; + fbnic_config_drop_mode_rcq(nv, rcq, fbn->tx_pause, hdr_split); =20 + hds_thresh =3D max(fbn->hds_thresh, FBNIC_HDR_BYTES_MIN); rcq_ctl |=3D FIELD_PREP(FBNIC_QUEUE_RDE_CTL1_PADLEN_MASK, FBNIC_RX_PAD) | FIELD_PREP(FBNIC_QUEUE_RDE_CTL1_MAX_HDR_MASK, hds_thresh) | FIELD_PREP(FBNIC_QUEUE_RDE_CTL1_PAYLD_OFF_MASK, --=20 2.47.3 From nobody Thu Apr 2 17:36:32 2026 Received: from mail-yw1-f173.google.com (mail-yw1-f173.google.com [209.85.128.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9255D1A9B24 for ; Thu, 12 Feb 2026 01:01:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.173 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858111; cv=none; b=tBBOA0KCalbsF/bUjcmK2IxJZYi1tJnjoEGjFYEFve2stBoOsKZnR6XEerkQm0KPYKVY90/hisqgBE8tsd32xgn2AcDHP92hzLrd+vHdWPijGr8CTRrkfkOZD6796IScW8AlKWqD9kZYP7+Q69yRDEP6ZhkpJHkRj2cSOJG2c9M= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858111; c=relaxed/simple; bh=DhtLQdLk4//tf3IWa0sFbqjSiWxG7QTlVQuS6MoOfc4=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kgYsH/kDAz9qvkZ+MKBO7LUIx3tgNYhe7rB1HLby32h2rN4Exn/Usj/eZnIZ/fSwaPCTPdPor80qH1WCn8OAK0XrUK4ntyivhuzYCtI6HnxhhZ/UL50zItQMtLyaxo9hp3bP02O7Fyp7O2yPDdzr826f5bWclTz9G6v7oSvuWnI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=DElgZIuR; arc=none smtp.client-ip=209.85.128.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DElgZIuR" Received: by mail-yw1-f173.google.com with SMTP id 00721157ae682-79639c2d2b5so48151077b3.2 for ; Wed, 11 Feb 2026 17:01:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770858109; x=1771462909; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=HaO2rgLLeJsYAQ1JVqZj/x1A/K/JlZAmp0S9Yly7UAI=; b=DElgZIuRwrVqzcIquXrLXlvujcgifCyWFirZ2r7wQrvjBZyqVT2ZWd7S5Slcw1uxHg PK/E0bF7p4DYE/2cO3M3o4dZQhl0U2kwCv2i/VOyyp/9i3YMQawosLBeQz+9aBvHAiuk EhNrocWhmVn5khubTjAXqk58R8KKIFiuvmVTP9Gw8tg746VsBcTWW0/EvUjLEr7U2srV +/4hg+RKLtSE+5N/pqrvemAdpWhitKuQhFN/9tOOSoLFgJOZkYP1zaNtfsEZZ5oi8dM7 E4KkJSwyo3lZ2erwJX4VoWrHdDGzVRm0ZOo/mfPh7G5j/IuGkIkHAAZPOVZljuXDb8mr HCEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770858109; x=1771462909; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=HaO2rgLLeJsYAQ1JVqZj/x1A/K/JlZAmp0S9Yly7UAI=; b=FPS+JGLKkgYb8YxvBbfdSiq+JQJNQOkj0zpyYirjh4dsXqenxWCiw08m8EYEyBsyvW cz00Ogf7ztabWOqtm10tAQdBNBbpn0/1eQetyvwWeCfhnc0frrPzLvfPu/lelY68gy25 nMS3PgCe3EEbMeLl1I17una0Ru3qeH9OM3A5oBHYpvjeu8FrsTXVhZw3kI8PeTtqttBY jXJ1w0KwQ4NpB8NBfPBQFluetbp1wlLYdB+2aYu641L1SWhsHzSHnvtL2DU9DgBqKyOa wf/fSIuLxTetU+dYYvuhBi7ysgzYg5YaTBbV7MZ5wDGyc8WH6jXO5joKavWuCPYFDWIC cgfQ== X-Forwarded-Encrypted: i=1; AJvYcCXpRvuOKmfK7gHH5/lwo+VXPktbe7KHH3kCUy7sHnoxkcnlnXnrByC2WalCRktpJFRyJuD4Wk6VlYdFMwg=@vger.kernel.org X-Gm-Message-State: AOJu0Yxrl+cMjHnn/sQSDOiN5K6STS6Nz4qkRe2OzmqARnds1qeTL4mx ybhuWxUEGN0BNQLmuCt+mCt95XbT8pHbIuP2cLMWHNhHS8JNBOSN8MmX X-Gm-Gg: AZuq6aI8LSD1EVJEYpsLLSG8LIpKe4EH2bSmwHY/qS8bl8ZVP/ZG1UIv81RadSD6Gdo jxkjg/hIdsGqc0vaANjQh9bdAxDoMW0ou/QiUfFIeV+xdS+ZZFtP6LQ13oRubLXmeBmBktTL+2k 98sbAreAZ6Wb2AEMTl3z1ZxFsm0nsjrfcuN6khnHKGAhHSKNIf1Bgl/Oqnlt34CyZ5pdNoxCAkZ zI7F6oL30iJb/OoKNRDVqxw5iOoK9xPaJEvLaxRDnfYC5g8Lb7LFafejsh7apOI4cu41ve6WOnX 6RjFGKuasnBkLgQ/2rJsHY5ld+0OK/ygrNiMLPvJ/66EZORpUyDYk/p9e+fduNpHyKc9gHevJzm 1HNirHU03eUEXfWfvTM5eS7AJgUPzGe1Qozr8JXRcRiySLMDa+/nOs2Uw1PvqUi+D9WCMarrPGR 4QwjzgQchTfhjKfxfCARX2 X-Received: by 2002:a05:690c:829:b0:78f:a5c4:791f with SMTP id 00721157ae682-79737673ad3mr10749977b3.54.1770858109608; Wed, 11 Feb 2026 17:01:49 -0800 (PST) Received: from localhost ([2a03:2880:25ff:1::]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7966c18b464sm33329567b3.13.2026.02.11.17.01.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 17:01:49 -0800 (PST) From: Bobby Eshleman Date: Wed, 11 Feb 2026 17:00:42 -0800 Subject: [PATCH net 2/4] eth: fbnic: increase FBNIC_HDR_BYTES_MIN from 128 to 256 bytes Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260211-fbnic-tcp-hds-fixes-v1-2-55d050e6f606@meta.com> References: <20260211-fbnic-tcp-hds-fixes-v1-0-55d050e6f606@meta.com> In-Reply-To: <20260211-fbnic-tcp-hds-fixes-v1-0-55d050e6f606@meta.com> To: Alexander Duyck , Jakub Kicinski , kernel-team@meta.com, Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Mohsin Bashir , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Bobby Eshleman X-Mailer: b4 0.14.3 From: Bobby Eshleman Increase FBNIC_HDR_BYTES_MIN from 128 to 256 bytes. The previous minimum was too small to guarantee that very long L2+L3+L4 headers always fit within the header buffer. When EN_HDR_SPLIT is disabled and a packet exceeds MAX_HEADER_BYTES, splitting occurs at that byte offset instead of the header boundary, resulting in some of the header landing in the payload page. The increased minimum ensures headers always fit with the MAX_HEADER_BYTES cut off and land in the header page. Fixes: 2b30fc01a6c7 ("eth: fbnic: Add support for HDS configuration") Signed-off-by: Bobby Eshleman Acked-by: Mohsin Bashir --- drivers/net/ethernet/meta/fbnic/fbnic_txrx.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.h b/drivers/net/eth= ernet/meta/fbnic/fbnic_txrx.h index 27776e844e29..51a98f27d5d9 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_txrx.h +++ b/drivers/net/ethernet/meta/fbnic/fbnic_txrx.h @@ -66,7 +66,7 @@ struct fbnic_net; (4096 - FBNIC_RX_HROOM - FBNIC_RX_TROOM - FBNIC_RX_PAD) #define FBNIC_HDS_THRESH_DEFAULT \ (1536 - FBNIC_RX_PAD) -#define FBNIC_HDR_BYTES_MIN 128 +#define FBNIC_HDR_BYTES_MIN 256 =20 struct fbnic_pkt_buff { struct xdp_buff buff; --=20 2.47.3 From nobody Thu Apr 2 17:36:32 2026 Received: from mail-yw1-f180.google.com (mail-yw1-f180.google.com [209.85.128.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F217C1E98EF for ; Thu, 12 Feb 2026 01:01:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858115; cv=none; b=SMvPi7++J2/CemCxYQVz+eP2HKsy3bDxzXRTvN4mfm2BIlxo3XBMU75BMSHS1bnvquaeA+Bls25YnOqM+pqOlZyq878gas696pfrMdLWqtpTbSllSq5LYNztPKJEF5LHq3gR5zkaJ4QgBNs/esUpR28Hc5eLfKF5ml556hIBAIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858115; c=relaxed/simple; bh=zktDEYYU3DDBRPUPo4PVQU/HdJL8/6FwLa6TYkRnm1s=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oeGXnEPL47cdvfsJeQjhLWovDdJ7ZQdkJ2BKmEhIoJKxpGbL9b72v5/PwHWxkhAC6wtPSQGI4n2wYo6rBLRPrw6TVxfaI4ALxV+hvx+tBo3jZe14gSfdpFqvb6DIK6gSZ/TfZz3GQqnHPCX4ehJSGBJNJWMGaZvA0Be8mi+NbWE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=XH2OgMbu; arc=none smtp.client-ip=209.85.128.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="XH2OgMbu" Received: by mail-yw1-f180.google.com with SMTP id 00721157ae682-7974d908318so5340107b3.1 for ; Wed, 11 Feb 2026 17:01:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770858111; x=1771462911; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=YeC44Eh/w10HWx6k5aqFmc4ViuCuD52xfeamBzvXwS4=; b=XH2OgMbujxDgCk98940EQ07oa9zNBVng00frwNtKeCOraNUCUBtL73i20O036f2/Fn hK7p7jWU6OnfkEVj4VfryhyaprlBjWFzZMr4fLzA68fNaaSJoKvVKuFsLQcmcmVk4fCM qqKhYeyvDmk9CBfp4jO2irJYwT3XmUZkp0j1jGASA3/a4v4rOW6vXxzFJoqR0Bm6LkY2 hvgk8UcQTwZQ3puvVgMINmju9SWCoQBorUWQrnsNy67DId5WrfI3fEXNqlqlXvQDfnea KN02R9IcEPfFJYY3zvhRYuPD1cGex96fmQI4QEXxtKsea5g3tBTqY9nIa0Fd6C+PWrTs I0tA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770858111; x=1771462911; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=YeC44Eh/w10HWx6k5aqFmc4ViuCuD52xfeamBzvXwS4=; b=Db6x+1U5DTYvfLuVkm3kiaAQ1AKnk2Q58KvmZBi/a/suNMb+A0Kg8SDkLVb1iTR70C A8q755apkm3hqwryQfoJ6OzS6iA+EdU0ewXG0A0Sw61xlxvi3sYpEoA5Zt+w1oIHnhRK 6U2GgHQOhoxYRcpp6uWYEbASoxa8TvmQuDw925zC6EwgLIixAmxvViV6R4YrxDNAmx1y oUx1Z1r6vdzlM/Z8dQWZEEekAHpMP+jCHJshoM1jvLcz39T+jRtA7rLgAds0U/6S0QWt /lKLJgWXO2sNp1A0kOISga2sEOlg+6dvn44U8dDB0xQn3EnaGjBSR06/SFgJHmdT5CSC rVTA== X-Forwarded-Encrypted: i=1; AJvYcCUzX6HDuQr/ZBY5Huz5+TqLq8dNK68/EhUflxApVXWeMWSOdp+vZH0yE0XtYMOZRYmmsz1YGsW+E+faXVI=@vger.kernel.org X-Gm-Message-State: AOJu0YyZGuhAU27wf2TNPB9oSpy58meYW9Ltyuik9LLEj1YlJHDkdcQN nwsTVLn9Raym5dU3L1hjM9R2yeBQvFGtrpw9F4kUURgIOLhfLbQgdlwjG93Lrw== X-Gm-Gg: AZuq6aKIdnmwqsYOUwrQ7Pwd67Acr88SOvS6UahcPjaHib0Gwdo4rs63Xu0yJyBq9bM 42ROxPyaITlHhr/rOTpmRFg+nE597WsyVXG4vyF3zHBMzncIxSben+Q0uCwBy2ygtlb+bUyVHhG nGt+/ZGNdDvuhRz1t+rToENK25lduNh3p1sAt4qzRxQPeWn/7JXWqfCJz5b0MUoI0WbeAXqLKSG hGE6/1PU9GLTZt/24swZtNMonUfvpQtNcW8TIb00ms68t8Zx+yLW8Tkco0wQqduprNrFfZw10ze mrE0Ppl2xfIeTjqh7Tca7M3esKlWfCMsx1B48HsW72bwlAQN0Z7HiSdUgkh1MvJ/2ePXPw/0+Pi BM09EkE5pAcIEOUv2mfLW4EkQ3QNQT2QyVe7C9Ur0+bH+lnYDj2wYE/LCQnqEtiNbwP3OvKeG4m +dU+2OfssmC3w6FAH4aWF4jw== X-Received: by 2002:a05:690c:a053:b0:788:247f:3648 with SMTP id 00721157ae682-7973768d21fmr11485697b3.66.1770858110863; Wed, 11 Feb 2026 17:01:50 -0800 (PST) Received: from localhost ([2a03:2880:25ff:71::]) by smtp.gmail.com with ESMTPSA id 00721157ae682-7966c16f201sm32051927b3.10.2026.02.11.17.01.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 17:01:50 -0800 (PST) From: Bobby Eshleman Date: Wed, 11 Feb 2026 17:00:43 -0800 Subject: [PATCH net 3/4] eth: fbnic: set DMA_HINT_L4 for all flows Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260211-fbnic-tcp-hds-fixes-v1-3-55d050e6f606@meta.com> References: <20260211-fbnic-tcp-hds-fixes-v1-0-55d050e6f606@meta.com> In-Reply-To: <20260211-fbnic-tcp-hds-fixes-v1-0-55d050e6f606@meta.com> To: Alexander Duyck , Jakub Kicinski , kernel-team@meta.com, Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Mohsin Bashir , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Bobby Eshleman X-Mailer: b4 0.14.3 From: Bobby Eshleman fbnic always advertises ETHTOOL_TCP_DATA_SPLIT_ENABLED via ethtool .get_ringparam. To enable proper splitting for all flow types, even for IP/Ethernet flows, this patch sets DMA_HINT_L4 unconditionally for all RSS and NFC flow steering rules. According to the spec, L4 falls back to L3 if no valid L4 is found, and L3 falls back to L2 if no L3 is found. This makes sure that the correct header boundary is used regardless of traffic type. This is important for zero-copy use cases where we must ensure that all ZC packets are split correctly. Fixes: 2b30fc01a6c7 ("eth: fbnic: Add support for HDS configuration") Signed-off-by: Bobby Eshleman --- drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c | 3 +++ drivers/net/ethernet/meta/fbnic/fbnic_rpc.c | 5 ++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c b/drivers/net/= ethernet/meta/fbnic/fbnic_ethtool.c index 693ebdf38705..5edc28ba2955 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_ethtool.c @@ -1142,6 +1142,9 @@ static int fbnic_set_cls_rule_ins(struct fbnic_net *f= bn, return -EINVAL; } =20 + dest |=3D FIELD_PREP(FBNIC_RPC_ACT_TBL0_DMA_HINT, + FBNIC_RCD_HDR_AL_DMA_HINT_L4); + /* Write action table values */ act_tcam->dest =3D dest; act_tcam->rss_en_mask =3D fbnic_flow_hash_2_rss_en_mask(fbn, hash_idx); diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_rpc.c b/drivers/net/ethe= rnet/meta/fbnic/fbnic_rpc.c index 7f31e890031c..42a186db43ea 100644 --- a/drivers/net/ethernet/meta/fbnic/fbnic_rpc.c +++ b/drivers/net/ethernet/meta/fbnic/fbnic_rpc.c @@ -338,9 +338,8 @@ void fbnic_rss_reinit(struct fbnic_dev *fbd, struct fbn= ic_net *fbn) else if (tstamp_mask & (1u << flow_type)) dest |=3D FBNIC_RPC_ACT_TBL0_TS_ENA; =20 - if (act1_value[flow_type] & FBNIC_RPC_TCAM_ACT1_L4_VALID) - dest |=3D FIELD_PREP(FBNIC_RPC_ACT_TBL0_DMA_HINT, - FBNIC_RCD_HDR_AL_DMA_HINT_L4); + dest |=3D FIELD_PREP(FBNIC_RPC_ACT_TBL0_DMA_HINT, + FBNIC_RCD_HDR_AL_DMA_HINT_L4); =20 rss_en_mask =3D fbnic_flow_hash_2_rss_en_mask(fbn, flow_type); =20 --=20 2.47.3 From nobody Thu Apr 2 17:36:32 2026 Received: from mail-yw1-f174.google.com (mail-yw1-f174.google.com [209.85.128.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D7E4B1FE47C for ; Thu, 12 Feb 2026 01:01:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858114; cv=none; b=B3YltRV79a4/Uis1H3e70PWDgpLSXVaey3TEh0NuydhAMf6jljbVkXNU1BX5ymLnikU74KnG3WH83LXzvh05cyAZdm1ZUWKowdAlK5WcJUaqLksckZetYi2XVCeU2xqov50z42l0Xq7V2UYicjSIr1V90v9kqUMHR8o4t5I3aZc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770858114; c=relaxed/simple; bh=5sBl97i+inRS8PFAXGy2J3iA+JTLwGT6khnA0yINGz0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=WEnlwu6MLw1v2PX6FgzUOUNhiWLbWbBXFz86VHm3FtScceDFXecQXm8vSs69ves90ZIeIwhxaYmRJ2pwXQBWyNecSSRrSpBdb/vgwyP+ToajiF4Zg33ptYAKOh4JnWlVV7dY0qrxhNKyBnJ6/wnPzQwC0yRhWF0VNTH+6un9d8o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WPwvH9bh; arc=none smtp.client-ip=209.85.128.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WPwvH9bh" Received: by mail-yw1-f174.google.com with SMTP id 00721157ae682-790992528f6so27296467b3.1 for ; Wed, 11 Feb 2026 17:01:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770858112; x=1771462912; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=7H7SmwrPwDgMoAqOWKw9ZmCtrgHBYE/GNb30EsZTC2I=; b=WPwvH9bh3wW+CzErInz2IZrqECwVTK6EopC/48V1Vhgv1CldpbgqZsiD+Vgrlouvuv tEFFGjbkz1uEsXvUrqa6acbZanU/vA9l0cFs8sYtWziF6qtxXHrGOEKZOKOjzf4omqcI CgMfq9NC0Y1xozlPdtkfAxhs8OxIuWbISwZQmRFIJblajO1UrLiD7GIw4o40B73ZGeOL ZD//45MKleAKrMhk401zPE9buJZySS6n+FAK3U5rFe6uyx7L1TleklXa5khhRUY1iP18 FouyMzDQZA/u4CkqdexRF1aom9rXo6A98gKmakON19mmEVjqgLevSXH6XyZKcuFwVdqJ +UmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770858112; x=1771462912; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=7H7SmwrPwDgMoAqOWKw9ZmCtrgHBYE/GNb30EsZTC2I=; b=G4HFQgx5m+OWsenUMZ1vYp6o57+PN+pyqbjK4GhtQliwDyL7Kt/jrrCdzIbyN241Mh EI2+448SzJDx5TX9RYjACIvus9yt+zYfU1nMMnQL5atHEFRJ53VR8zt3flwwk99LTqLJ 8+uR6ZJlHn3wxprKvDkAgeaB1dZgtQOU3bwIuVYrUdjeKN6A6e9EdcFLtKEBzM1EM5V+ cCGwuMfxj5JBBMurk4ZXYGQWYLl1ZgviZrCVL/cUiNNCaDfRxCyr5bGBsXj/cC8tNUYG xgd8mfAThYuoNHVriAYm9y5rc3xCACpGEGRDBv0J2UQ4HEK6aGTdMXw57/hleM1+g8lV EXlQ== X-Forwarded-Encrypted: i=1; AJvYcCWFjqdKtIPePqBOVPqTV1G5yU+r/Skm4jOf2NG0rqBQDDdAG0INq/qudqpWVWeTzUAEfVN0E27JVRT+jEs=@vger.kernel.org X-Gm-Message-State: AOJu0Yw5WfXgjQKITlVvq6CiZZ+mfr8xkRd9KQbRgZx1OPeZ19+/Mr6K n6hg8IjpQ2YDWOdambZoYpmBUCx+M6H5nnoR1hnUpImYlEuKeyz/IagL X-Gm-Gg: AZuq6aJZ7KbEkioOMpeGGpvEu41xRHEuUM7XwjMcNMlhwsCBsEz92Qly/DKtX41RQ5Z dfvesYdbf4lcUMMSzkACESIQZIOKDHGodYCjnSgJNriIksSlbyBdgw8CRquYAVbSvpEd6JOsE1G 5CNTuEQsEGpT5cOozhLdVi6x5QrQZM+fWhwNevOkbWYB+jk8IaK7ObkVpHjyQEt6YGc+ns3IjBB t5M2huRasP2s6dqUGqjJNjQv8ixO5TIJfdN7Z+ALHzr3sgIGtNfFdrHH3b1eY9cMtpYYnAPvmvB 6munw/S0iaygZzKKHVqbL5ovH3t52Pd9Zzy+XM/058+rEYsoaAC2RtgB/VvEQlcUzSf+jEYmpmC UWfU9wkv0ncKOWEz5DiwvJ2qdLRA9pNokQc6MSsHwuQ6rwUM3RVIDVIbaAU30KSm3IcgWzmNq2U 59coupW9YMGrGJNSaOJD96Ew== X-Received: by 2002:a05:690e:14c7:b0:64a:db39:f002 with SMTP id 956f58d0204a3-64c080bf02fmr436658d50.0.1770858111903; Wed, 11 Feb 2026 17:01:51 -0800 (PST) Received: from localhost ([2a03:2880:25ff:45::]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-64afc98833bsm3543989d50.17.2026.02.11.17.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 17:01:51 -0800 (PST) From: Bobby Eshleman Date: Wed, 11 Feb 2026 17:00:44 -0800 Subject: [PATCH net 4/4] selftests: drv-net: add HDS payload sweep test for devmem TCP Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260211-fbnic-tcp-hds-fixes-v1-4-55d050e6f606@meta.com> References: <20260211-fbnic-tcp-hds-fixes-v1-0-55d050e6f606@meta.com> In-Reply-To: <20260211-fbnic-tcp-hds-fixes-v1-0-55d050e6f606@meta.com> To: Alexander Duyck , Jakub Kicinski , kernel-team@meta.com, Andrew Lunn , "David S. Miller" , Eric Dumazet , Paolo Abeni , Mohsin Bashir , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Bobby Eshleman X-Mailer: b4 0.14.3 From: Bobby Eshleman Add check_rx_hds test that verifies header/data split works across payload sizes. The test sweeps payload sizes from 1 byte to 8KB, if any data propagates up to userspace as SCM_DEVMEM_LINEAR, then the test fails. This shows that regardless of payload size, ncdevmem's configuration of hds-thresh to 0 is respected. Add -L (--fail-on-linear) flag to ncdevmem that causes the receiver to fail if any SCM_DEVMEM_LINEAR cmsg is received. Use socat option for fixed block sizing and tcp nodelay to disable nagle's algo to avoid buffering. Signed-off-by: Bobby Eshleman --- tools/testing/selftests/drivers/net/hw/devmem.py | 19 ++++++++++++++++++- tools/testing/selftests/drivers/net/hw/ncdevmem.c | 11 ++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/drivers/net/hw/devmem.py b/tools/testi= ng/selftests/drivers/net/hw/devmem.py index 45c2d49d55b6..ee863e90d1e0 100755 --- a/tools/testing/selftests/drivers/net/hw/devmem.py +++ b/tools/testing/selftests/drivers/net/hw/devmem.py @@ -63,12 +63,29 @@ def check_tx_chunks(cfg) -> None: ksft_eq(socat.stdout.strip(), "hello\nworld") =20 =20 +def check_rx_hds(cfg) -> None: + """Test HDS splitting across payload sizes.""" + require_devmem(cfg) + + for size in [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192]: + port =3D rand_port() + listen_cmd =3D f"{cfg.bin_local} -L -l -f {cfg.ifname} -s {cfg.add= r} -p {port}" + + with bkg(listen_cmd, exit_wait=3DTrue) as ncdevmem: + wait_port_listen(port) + cmd(f"dd if=3D/dev/zero bs=3D{size} count=3D1 2>/dev/null | " + + f"socat -b {size} -u - TCP{cfg.addr_ipver}:{cfg.baddr}:{po= rt},nodelay", + host=3Dcfg.remote, shell=3DTrue) + + ksft_eq(ncdevmem.ret, 0, f"HDS failed for payload size {size}") + + def main() -> None: with NetDrvEpEnv(__file__) as cfg: cfg.bin_local =3D path.abspath(path.dirname(__file__) + "/ncdevmem= ") cfg.bin_remote =3D cfg.remote.deploy(cfg.bin_local) =20 - ksft_run([check_rx, check_tx, check_tx_chunks], + ksft_run([check_rx, check_tx, check_tx_chunks, check_rx_hds], args=3D(cfg, )) ksft_exit() =20 diff --git a/tools/testing/selftests/drivers/net/hw/ncdevmem.c b/tools/test= ing/selftests/drivers/net/hw/ncdevmem.c index 3288ed04ce08..adc89591c834 100644 --- a/tools/testing/selftests/drivers/net/hw/ncdevmem.c +++ b/tools/testing/selftests/drivers/net/hw/ncdevmem.c @@ -97,6 +97,7 @@ static unsigned int ifindex; static unsigned int dmabuf_id; static uint32_t tx_dmabuf_id; static int waittime_ms =3D 500; +static bool fail_on_linear; =20 /* System state loaded by current_config_load() */ #define MAX_FLOWS 8 @@ -974,6 +975,11 @@ static int do_server(struct memory_buffer *mem) "SCM_DEVMEM_LINEAR. dmabuf_cmsg->frag_size=3D%u\n", dmabuf_cmsg->frag_size); =20 + if (fail_on_linear) { + pr_err("received SCM_DEVMEM_LINEAR but --fail-on-linear (-L) set"); + goto err_close_client; + } + continue; } =20 @@ -1397,8 +1403,11 @@ int main(int argc, char *argv[]) int is_server =3D 0, opt; int ret, err =3D 1; =20 - while ((opt =3D getopt(argc, argv, "ls:c:p:v:q:t:f:z:")) !=3D -1) { + while ((opt =3D getopt(argc, argv, "Lls:c:p:v:q:t:f:z:")) !=3D -1) { switch (opt) { + case 'L': + fail_on_linear =3D true; + break; case 'l': is_server =3D 1; break; --=20 2.47.3