From: Howard Wang <howard_wang@realsil.com.cn>
To: <dev@dpdk.org>
Cc: <pro_nic_dpdk@realtek.com>, Howard Wang <howard_wang@realsil.com.cn>
Subject: [PATCH v1 05/12] net/r8169: adjust jumbo frame size limit for non-1G cards
Date: Mon, 9 Feb 2026 16:54:55 +0800 [thread overview]
Message-ID: <20260209085502.26722-6-howard_wang@realsil.com.cn> (raw)
In-Reply-To: <20260209085502.26722-1-howard_wang@realsil.com.cn>
For 8125A, set the max size to (16K - 1).
For other non-1G cards, set the max size to 16K.
Signed-off-by: Howard Wang <howard_wang@realsil.com.cn>
---
drivers/net/r8169/r8169_compat.h | 1 +
drivers/net/r8169/r8169_ethdev.c | 23 ++++++++++++++++++++++-
2 files changed, 23 insertions(+), 1 deletion(-)
diff --git a/drivers/net/r8169/r8169_compat.h b/drivers/net/r8169/r8169_compat.h
index d2d928cdd7..673a1ca274 100644
--- a/drivers/net/r8169/r8169_compat.h
+++ b/drivers/net/r8169/r8169_compat.h
@@ -617,6 +617,7 @@ enum RTL_chipset_name {
*/
#define RTL_ETH_OVERHEAD (RTE_ETHER_HDR_LEN + RTE_ETHER_CRC_LEN + VLAN_TAG_SIZE)
#define JUMBO_FRAME_9K (9 * 1024 - RTE_ETHER_HDR_LEN - RTE_VLAN_HLEN - RTE_ETHER_CRC_LEN)
+#define JUMBO_FRAME_16K (16 * 1024 - RTE_ETHER_HDR_LEN - RTE_VLAN_HLEN - RTE_ETHER_CRC_LEN)
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL << (n)) - 1))
diff --git a/drivers/net/r8169/r8169_ethdev.c b/drivers/net/r8169/r8169_ethdev.c
index f620154bf0..8e46ce09a1 100644
--- a/drivers/net/r8169/r8169_ethdev.c
+++ b/drivers/net/r8169/r8169_ethdev.c
@@ -412,9 +412,30 @@ rtl_dev_infos_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
struct rtl_hw *hw = &adapter->hw;
dev_info->min_rx_bufsize = 1024;
- dev_info->max_rx_pktlen = JUMBO_FRAME_9K;
dev_info->max_mac_addrs = 1;
+ switch (hw->mcfg) {
+ case CFG_METHOD_48:
+ case CFG_METHOD_49:
+ dev_info->max_rx_pktlen = JUMBO_FRAME_16K - 1;
+ break;
+ case CFG_METHOD_50:
+ case CFG_METHOD_51:
+ case CFG_METHOD_54:
+ case CFG_METHOD_55:
+ case CFG_METHOD_56:
+ case CFG_METHOD_57:
+ case CFG_METHOD_58:
+ case CFG_METHOD_70:
+ case CFG_METHOD_71:
+ case CFG_METHOD_91:
+ dev_info->max_rx_pktlen = JUMBO_FRAME_16K;
+ break;
+ default:
+ dev_info->max_rx_pktlen = JUMBO_FRAME_9K;
+ break;
+ }
+
if (hw->mcfg >= CFG_METHOD_69) {
dev_info->max_rx_queues = 4;
dev_info->max_tx_queues = 2;
--
2.34.1
next prev parent reply other threads:[~2026-02-09 8:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-09 8:54 [PATCH v1 00/12] net/r8169: update driver with new HW support and fixes Howard Wang
2026-02-09 8:54 ` [PATCH v1 01/12] net/r8169: fix NULL pointer dereference in rtl8168fp_ops Howard Wang
2026-02-09 8:54 ` [PATCH v1 02/12] net/r8169: tune RX desc fetch num for 8126 and 8127 Howard Wang
2026-02-09 8:54 ` [PATCH v1 03/12] net/r8169: add support for RTL8168KD Howard Wang
2026-02-09 8:54 ` [PATCH v1 04/12] net/r8169: update hardware configurations for 8127 Howard Wang
2026-02-09 8:54 ` Howard Wang [this message]
2026-02-09 8:54 ` [PATCH v1 06/12] net/r8169: remove support for CFG_METHOD_69 Howard Wang
2026-02-09 8:54 ` [PATCH v1 07/12] net/r8169: update hardware configurations for 8126 Howard Wang
2026-02-09 8:54 ` [PATCH v1 08/12] net/r8169: update hardware configurations for 8125 Howard Wang
2026-02-09 8:54 ` [PATCH v1 09/12] net/r8169: add support for RTL9151 Howard Wang
2026-02-09 8:55 ` [PATCH v1 10/12] net/r8169: add support for RTL8125K Howard Wang
2026-02-09 8:55 ` [PATCH v1 11/12] net/r8169: fix one bug about RTL8168KB Howard Wang
2026-02-09 8:55 ` [PATCH v1 12/12] net/r8169: ensure the old mapping is used Howard Wang
2026-02-09 19:26 ` [PATCH v1 00/12] net/r8169: update driver with new HW support and fixes Stephen Hemminger
2026-02-09 19:44 ` Stephen Hemminger
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=20260209085502.26722-6-howard_wang@realsil.com.cn \
--to=howard_wang@realsil.com.cn \
--cc=dev@dpdk.org \
--cc=pro_nic_dpdk@realtek.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