Skip to contentSkip to conversation

net/iavf: fix FDIR ID parsing issue after queue reconfigured

PATCH Applied Leyi Rong 3 participants 3 messages May 20, 2020 Network drivers

lore
Share & tools
lore

Leyi Rong

author
#0 lore raw

PATCH 1/1 net/iavf: fix FDIR ID parsing issue after queue reconfigured

FDIR ID parsing will not be handled correctly after queue reconfigured, enable FDIR ID parsing per Q regardless of fdir_ref_cnt to fix it.

Fixes f71dbf852d46 ("net/iavf: add flow director enabled switch value")
---
 drivers/net/iavf/iavf_rxtx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_rxtx.h +2 -2
index 73968847f..59625a979 100644
@@ -509,8 +509,8 @@ void iavf_fdir_rx_proc_enable(struct iavf_adapter *ad, bool on)
 {
 	if (on) {
 		/* enable flow director processing */
-		if (ad->fdir_ref_cnt++ == 0)
-			FDIR_PROC_ENABLE_PER_QUEUE(ad, on);
+		FDIR_PROC_ENABLE_PER_QUEUE(ad, on);
+		ad->fdir_ref_cnt++;
 	} else {
 		if (ad->fdir_ref_cnt >= 1) {
 			ad->fdir_ref_cnt--;
Signature · 1 line
2.17.1
Acked-by on v1 1/1 Applied
#1 lore raw
Quoted 28 lines · Leyi Rong

FDIR ID parsing will not be handled correctly after queue reconfigured, enable FDIR ID parsing per Q regardless of fdir_ref_cnt to fix it.

Fixes f71dbf852d46 ("net/iavf: add flow director enabled switch value")

---
drivers/net/iavf/iavf_rxtx.h | 4 ++--

1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_rxtx.h +2 -2
index 73968847f..59625a979 100644
@@ -509,8 +509,8 @@ void iavf_fdir_rx_proc_enable(struct iavf_adapter *ad, bool on)
 {
 	if (on) {
 		/* enable flow director processing */
-		if (ad->fdir_ref_cnt++ == 0)
-			FDIR_PROC_ENABLE_PER_QUEUE(ad, on);
+		FDIR_PROC_ENABLE_PER_QUEUE(ad, on);
+		ad->fdir_ref_cnt++;
 	} else {
 		if (ad->fdir_ref_cnt >= 1) {
 			ad->fdir_ref_cnt--;
Signature · 1 line
2.17.1

Applied to dpdk-next-net-intel, Thanks.

#2 lore raw
In reply to Leyi Rong

Test-by Peng, Yuan <[email protected]>

-----Original Message-----
From: dev <[email protected]> On Behalf Of Leyi Rong
Sent: Wednesday, May 20, 2020 2:40 PM
To: Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; Ye, Xiaolong <[email protected]>
Cc: [email protected]; Rong, Leyi <[email protected]>
Subject: [dpdk-dev] [PATCH] net/iavf: fix FDIR ID parsing issue after queue reconfigured

FDIR ID parsing will not be handled correctly after queue reconfigured, enable FDIR ID parsing per Q regardless of fdir_ref_cnt to fix it.

Fixes f71dbf852d46 ("net/iavf: add flow director enabled switch value")
---
 drivers/net/iavf/iavf_rxtx.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/iavf/iavf_rxtx.h +2 -3
@@ -509,8 +509,8 @@ void iavf_fdir_rx_proc_enable(struct iavf_adapter *ad, bool on)  {
 	if (on) {
 		/* enable flow director processing */
-		if (ad->fdir_ref_cnt++ == 0)
-			FDIR_PROC_ENABLE_PER_QUEUE(ad, on);
+		FDIR_PROC_ENABLE_PER_QUEUE(ad, on);
+		ad->fdir_ref_cnt++;
 	} else {
 		if (ad->fdir_ref_cnt >= 1) {
 			ad->fdir_ref_cnt--;
--

2.17.1