mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stanislav Fomichev <sdf.kernel@gmail.com>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
	pabeni@redhat.com, andrew+netdev@lunn.ch, edumazet@kernel.org,
	horms@kernel.org, corbet@lwn.net, skhan@linuxfoundation.org,
	rdunlap@infradead.org, michael.chan@broadcom.com,
	pavan.chebbi@broadcom.com, saeedm@nvidia.com, tariqt@nvidia.com,
	mbloch@nvidia.com, alexanderduyck@fb.com, kernel-team@meta.com,
	sdf@fomichev.me, dimitri.daskalakis1@gmail.com,
	almasrymina@google.com, dtatulea@nvidia.com,
	bobbyeshleman@meta.com, asml.silence@gmail.com,
	daniel@iogearbox.net, razor@blackwall.org, leitao@debian.org,
	linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-rdma@vger.kernel.org, linux-kselftest@vger.kernel.org,
	leon@kernel.org
Subject: [PATCH net-next v3 6/9] eth: fbnic: set the netmem TX frag size limit to 32KB
Date: Thu,  5 Nov 2026 14:20:55 -0800	[thread overview]
Message-ID: <20261105222058.944293-7-sdf@fomichev.me> (raw)
In-Reply-To: <20261105222058.944293-1-sdf@fomichev.me>

The TX descriptor length field (FBNIC_TWD_LEN_MASK) is 16 bits wide.
Set the netmem TX frag size limit to the largest power of 2 which fits,
like bnxt. With 64K pages this also lowers the PAGE_SIZE default, whose
64KB frags don't fit the length field.

Signed-off-by: Stanislav Fomichev <sdf@fomichev.me>
---
 drivers/net/ethernet/meta/fbnic/fbnic_netdev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
index 8a6703afca38..0a2b66202aec 100644
--- a/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
+++ b/drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
@@ -760,6 +760,7 @@ struct net_device *fbnic_netdev_alloc(struct fbnic_dev *fbd)
 	netdev->stat_ops = &fbnic_stat_ops;
 	netdev->queue_mgmt_ops = &fbnic_queue_mgmt_ops;
 	netdev->netmem_tx = NETMEM_TX_DMA;
+	netdev->netmem_tx_max_frag_size = SZ_32K;
 
 	fbnic_set_ethtool_ops(netdev);
 
-- 
2.53.0-Meta


  parent reply	other threads:[~2026-11-05 22:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05 22:20 [PATCH net-next v3 0/9] net: devmem: size TX net_iovs from the dmabuf layout Stanislav Fomichev
2026-11-05 22:20 ` [PATCH net-next v3 1/9] bnxt_en: let the stack segment GSO skbs with too many frags Stanislav Fomichev
2026-11-05 22:20 ` [PATCH net-next v3 2/9] net: devmem: charge the frag length to TX skb truesize Stanislav Fomichev
2026-11-05 22:20 ` [PATCH net-next v3 3/9] net: devmem: use niov_shift in net_devmem_get_niov_at() Stanislav Fomichev
2026-11-05 22:20 ` [PATCH net-next v3 4/9] net: devmem: add a per-device netmem TX frag size limit Stanislav Fomichev
2026-11-05 22:20 ` [PATCH net-next v3 5/9] bnxt_en: set the netmem TX frag size limit to 32KB Stanislav Fomichev
2026-11-05 22:20 ` Stanislav Fomichev [this message]
2026-11-05 22:20 ` [PATCH net-next v3 7/9] net/mlx5e: lift the netmem TX frag size limit Stanislav Fomichev
2026-11-05 22:20 ` [PATCH net-next v3 8/9] net: devmem: size TX net_iovs from the dmabuf sg table Stanislav Fomichev
2026-11-05 22:20 ` [PATCH net-next v3 9/9] selftests: drv-net: devmem: TX from a hugepage-backed dmabuf Stanislav Fomichev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261105222058.944293-7-sdf@fomichev.me \
    --to=sdf.kernel@gmail.com \
    --cc=alexanderduyck@fb.com \
    --cc=almasrymina@google.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=asml.silence@gmail.com \
    --cc=bobbyeshleman@meta.com \
    --cc=corbet@lwn.net \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=dimitri.daskalakis1@gmail.com \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=edumazet@kernel.org \
    --cc=horms@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuba@kernel.org \
    --cc=leitao@debian.org \
    --cc=leon@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=razor@blackwall.org \
    --cc=rdunlap@infradead.org \
    --cc=saeedm@nvidia.com \
    --cc=sdf@fomichev.me \
    --cc=skhan@linuxfoundation.org \
    --cc=tariqt@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®