From: Zhang Tengfei <zhtfdev@gmail.com>
To: dev@dpdk.org
Cc: Zhang Tengfei <zhtfdev@gmail.com>,
jiawenwu@trustnetic.com, zaiyuwang@trustnetic.com,
stephen@networkplumber.org, stable@dpdk.org
Subject: [PATCH v2 1/3] net/txgbe: fix Rx packet buffer size with flow director
Date: Thu, 15 Oct 2026 00:39:22 +0800 [thread overview]
Message-ID: <5ae97e7c44c3c9272417ecfd838154188cd616d4.1791995192.git.zhtfdev@gmail.com> (raw)
In-Reply-To: <cover.1791995192.git.zhtfdev@gmail.com>
Enabling Flow Director reduces PBRXSIZE(0) to reserve packet buffer
memory for the filter table. The new size was computed from the
current register value, but the FDIR mode is reset to none when the
last rule is destroyed, on flush, or when enabling FDIR fails, without
restoring the buffer. The next FDIR rule created or validated then
enabled FDIR again and reduced the buffer a second time, until the
size underflowed.
Compute PBRXSIZE(0) from the default packet buffer size instead.
Fixes: ea230dda16ad ("net/txgbe: configure flow director filter")
Cc: stable@dpdk.org
Signed-off-by: Zhang Tengfei <zhtfdev@gmail.com>
---
drivers/net/txgbe/txgbe_fdir.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/txgbe/txgbe_fdir.c b/drivers/net/txgbe/txgbe_fdir.c
index 67f586ffc7..cee38a42b8 100644
--- a/drivers/net/txgbe/txgbe_fdir.c
+++ b/drivers/net/txgbe/txgbe_fdir.c
@@ -390,11 +390,10 @@ txgbe_fdir_configure(struct rte_eth_dev *dev)
/*
* Before enabling Flow Director, the Rx Packet Buffer size
- * must be reduced. The new value is the current size minus
+ * must be reduced. The new value is the default size minus
* flow director memory usage size.
*/
- pbsize = rd32(hw, TXGBE_PBRXSIZE(0));
- pbsize -= TXGBD_FDIRCTL_BUF_BYTE(fdirctrl);
+ pbsize = (hw->mac.rx_pb_size << 10) - TXGBD_FDIRCTL_BUF_BYTE(fdirctrl);
wr32(hw, TXGBE_PBRXSIZE(0), pbsize);
/*
--
2.53.0
next prev parent reply other threads:[~2026-10-14 16:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 14:00 [PATCH 0/3] net/txgbe: fix FDIR Rx packet buffer handling Zhang Tengfei
2026-10-13 14:00 ` [PATCH 1/3] net/txgbe: fix Rx packet buffer size with flow director Zhang Tengfei
2026-10-13 14:00 ` [PATCH 2/3] net/txgbe: do not enable flow director on flow validate Zhang Tengfei
2026-10-13 14:00 ` [PATCH 3/3] net/txgbe: disable flow director when no rule is left Zhang Tengfei
2026-10-13 14:45 ` [PATCH 0/3] net/txgbe: fix FDIR Rx packet buffer handling Stephen Hemminger
2026-10-14 16:45 ` Zhang Tengfei
2026-10-14 1:39 ` Jiawen Wu
2026-10-14 16:47 ` Zhang Tengfei
2026-10-14 16:39 ` [PATCH v2 " Zhang Tengfei
2026-10-14 16:39 ` Zhang Tengfei [this message]
2026-10-14 16:39 ` [PATCH v2 2/3] net/txgbe: do not enable flow director on flow validate Zhang Tengfei
2026-10-14 16:39 ` [PATCH v2 3/3] net/txgbe: disable flow director when no rule is left Zhang Tengfei
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=5ae97e7c44c3c9272417ecfd838154188cd616d4.1791995192.git.zhtfdev@gmail.com \
--to=zhtfdev@gmail.com \
--cc=dev@dpdk.org \
--cc=jiawenwu@trustnetic.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
--cc=zaiyuwang@trustnetic.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