* [PATCH] net/ixgbe: fix DCB Rx buffer size on X540 and E610
@ 2026-09-27 4:59 Zhang Tengfei
2026-10-05 16:44 ` Bruce Richardson
0 siblings, 1 reply; 2+ messages in thread
From: Zhang Tengfei @ 2026-09-27 4:59 UTC (permalink / raw)
To: anatoly.burakov, vladimir.medvedkin; +Cc: dev, Zhang Tengfei, stable
DCB programs RXPBSIZE from a hardcoded total, 384 KB for X550
and 512 KB for every other MAC. The base driver records 384 KB
in hw->mac.rx_pb_size for X540, and E610 inherits that through
the X540 init ops. X540 and E610 reset also write 384 KB.
Use hw->mac.rx_pb_size for the split, including the PFC
watermarks derived from it. 82598, 82599 and X550 are unchanged.
Fixes: b7fcd13c90a3 ("ixgbe: fix X550 DCB")
Fixes: 316637762a5f ("net/ixgbe/base: enable E610 device")
Cc: stable@dpdk.org
Signed-off-by: Zhang Tengfei <zhtfdev@gmail.com>
---
drivers/net/intel/ixgbe/ixgbe_rxtx.c | 27 ++++-----------------------
1 file changed, 4 insertions(+), 23 deletions(-)
diff --git a/drivers/net/intel/ixgbe/ixgbe_rxtx.c b/drivers/net/intel/ixgbe/ixgbe_rxtx.c
index 60222693fe..890289f27f 100644
--- a/drivers/net/intel/ixgbe/ixgbe_rxtx.c
+++ b/drivers/net/intel/ixgbe/ixgbe_rxtx.c
@@ -3835,8 +3835,6 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
}
#define NUM_VFTA_REGISTERS 128
-#define NIC_RX_BUFFER_SIZE 0x200
-#define X550_RX_BUFFER_SIZE 0x180
static void
ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)
@@ -3863,18 +3861,10 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)
/*
* RXPBSIZE
- * split rx buffer up into sections, each for 1 traffic class
+ * Split the MAC Rx packet buffer equally across traffic classes.
+ * hw->mac.rx_pb_size is the total size in KB.
*/
- switch (hw->mac.type) {
- case ixgbe_mac_X550:
- case ixgbe_mac_X550EM_x:
- case ixgbe_mac_X550EM_a:
- pbsize = (uint16_t)(X550_RX_BUFFER_SIZE / nb_tcs);
- break;
- default:
- pbsize = (uint16_t)(NIC_RX_BUFFER_SIZE / nb_tcs);
- break;
- }
+ pbsize = (uint16_t)(hw->mac.rx_pb_size / nb_tcs);
for (i = 0; i < nb_tcs; i++) {
uint32_t rxpbsize = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i));
@@ -4394,16 +4384,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
}
}
- switch (hw->mac.type) {
- case ixgbe_mac_X550:
- case ixgbe_mac_X550EM_x:
- case ixgbe_mac_X550EM_a:
- rx_buffer_size = X550_RX_BUFFER_SIZE;
- break;
- default:
- rx_buffer_size = NIC_RX_BUFFER_SIZE;
- break;
- }
+ rx_buffer_size = (uint16_t)hw->mac.rx_pb_size;
if (config_dcb_rx) {
/* Set RX buffer size */
--
2.53.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] net/ixgbe: fix DCB Rx buffer size on X540 and E610
2026-09-27 4:59 [PATCH] net/ixgbe: fix DCB Rx buffer size on X540 and E610 Zhang Tengfei
@ 2026-10-05 16:44 ` Bruce Richardson
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Richardson @ 2026-10-05 16:44 UTC (permalink / raw)
To: Zhang Tengfei; +Cc: anatoly.burakov, vladimir.medvedkin, dev, stable
On Sun, Sep 27, 2026 at 12:59:43PM +0800, Zhang Tengfei wrote:
> DCB programs RXPBSIZE from a hardcoded total, 384 KB for X550
> and 512 KB for every other MAC. The base driver records 384 KB
> in hw->mac.rx_pb_size for X540, and E610 inherits that through
> the X540 init ops. X540 and E610 reset also write 384 KB.
>
> Use hw->mac.rx_pb_size for the split, including the PFC
> watermarks derived from it. 82598, 82599 and X550 are unchanged.
>
> Fixes: b7fcd13c90a3 ("ixgbe: fix X550 DCB")
> Fixes: 316637762a5f ("net/ixgbe/base: enable E610 device")
> Cc: stable@dpdk.org
>
> Signed-off-by: Zhang Tengfei <zhtfdev@gmail.com>
> ---
> drivers/net/intel/ixgbe/ixgbe_rxtx.c | 27 ++++-----------------------
> 1 file changed, 4 insertions(+), 23 deletions(-)
>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Applied to dpdk-next-net-intel. Thanks.
I've also squashed patch [1] into this commit, so that we have your name
correctly reported in .mailmap for this, and that check-git-log script
doesn't complain. Any issues with me doing so, please let me know.
Thanks,
/Bruce
[1] https://patches.dpdk.org/project/dpdk/patch/20260927035949.36887-1-zhtfdev@gmail.com/
> diff --git a/drivers/net/intel/ixgbe/ixgbe_rxtx.c b/drivers/net/intel/ixgbe/ixgbe_rxtx.c
> index 60222693fe..890289f27f 100644
> --- a/drivers/net/intel/ixgbe/ixgbe_rxtx.c
> +++ b/drivers/net/intel/ixgbe/ixgbe_rxtx.c
> @@ -3835,8 +3835,6 @@ ixgbe_rss_configure(struct rte_eth_dev *dev)
> }
>
> #define NUM_VFTA_REGISTERS 128
> -#define NIC_RX_BUFFER_SIZE 0x200
> -#define X550_RX_BUFFER_SIZE 0x180
>
> static void
> ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)
> @@ -3863,18 +3861,10 @@ ixgbe_vmdq_dcb_configure(struct rte_eth_dev *dev)
>
> /*
> * RXPBSIZE
> - * split rx buffer up into sections, each for 1 traffic class
> + * Split the MAC Rx packet buffer equally across traffic classes.
> + * hw->mac.rx_pb_size is the total size in KB.
> */
> - switch (hw->mac.type) {
> - case ixgbe_mac_X550:
> - case ixgbe_mac_X550EM_x:
> - case ixgbe_mac_X550EM_a:
> - pbsize = (uint16_t)(X550_RX_BUFFER_SIZE / nb_tcs);
> - break;
> - default:
> - pbsize = (uint16_t)(NIC_RX_BUFFER_SIZE / nb_tcs);
> - break;
> - }
> + pbsize = (uint16_t)(hw->mac.rx_pb_size / nb_tcs);
> for (i = 0; i < nb_tcs; i++) {
> uint32_t rxpbsize = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i));
>
> @@ -4394,16 +4384,7 @@ ixgbe_dcb_hw_configure(struct rte_eth_dev *dev,
> }
> }
>
> - switch (hw->mac.type) {
> - case ixgbe_mac_X550:
> - case ixgbe_mac_X550EM_x:
> - case ixgbe_mac_X550EM_a:
> - rx_buffer_size = X550_RX_BUFFER_SIZE;
> - break;
> - default:
> - rx_buffer_size = NIC_RX_BUFFER_SIZE;
> - break;
> - }
> + rx_buffer_size = (uint16_t)hw->mac.rx_pb_size;
>
> if (config_dcb_rx) {
> /* Set RX buffer size */
> --
> 2.53.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-05 16:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-27 4:59 [PATCH] net/ixgbe: fix DCB Rx buffer size on X540 and E610 Zhang Tengfei
2026-10-05 16:44 ` Bruce Richardson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox