[PATCH net-next] xdp: Remove redundant warning

Subsystems: networking [general], the rest, xdp (express data path)

STALE1774d LANDED

Landed in mainline as b859a360d88d on 2021-10-28.

3 messages, 3 authors, 2021-10-28 · open the first message on its own page

[PATCH net-next] xdp: Remove redundant warning

From: Yajun Deng <hidden>
Date: 2021-10-27 01:39:14

There is a warning in xdp_rxq_info_unreg_mem_model() when reg_state isn't
equal to REG_STATE_REGISTERED, so the warning in xdp_rxq_info_unreg() is
redundant.

Signed-off-by: Yajun Deng <redacted>
---
 net/core/xdp.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/net/core/xdp.c b/net/core/xdp.c
index cc92ccb38432..5ddc29f29bad 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -143,8 +143,6 @@ void xdp_rxq_info_unreg(struct xdp_rxq_info *xdp_rxq)
 	if (xdp_rxq->reg_state == REG_STATE_UNUSED)
 		return;
 
-	WARN(!(xdp_rxq->reg_state == REG_STATE_REGISTERED), "Driver BUG");
-
 	xdp_rxq_info_unreg_mem_model(xdp_rxq);
 
 	xdp_rxq->reg_state = REG_STATE_UNREGISTERED;
-- 
2.32.0

Re: [PATCH net-next] xdp: Remove redundant warning

From: Jesper Dangaard Brouer <hidden>
Date: 2021-10-27 06:21:03

On 27/10/2021 03.38, Yajun Deng wrote:
There is a warning in xdp_rxq_info_unreg_mem_model() when reg_state isn't
equal to REG_STATE_REGISTERED, so the warning in xdp_rxq_info_unreg() is
redundant.
 >
Signed-off-by: Yajun Deng <redacted>
Acked-by: Jesper Dangaard Brouer <redacted>

I guess/wonder if we should mark this as a fix for:

Fixes: dce5bd6140a4 ("xdp: export xdp_rxq_info_unreg_mem_model")
quoted hunk
---
  net/core/xdp.c | 2 --
  1 file changed, 2 deletions(-)
diff --git a/net/core/xdp.c b/net/core/xdp.c
index cc92ccb38432..5ddc29f29bad 100644
--- a/net/core/xdp.c
+++ b/net/core/xdp.c
@@ -143,8 +143,6 @@ void xdp_rxq_info_unreg(struct xdp_rxq_info *xdp_rxq)
  	if (xdp_rxq->reg_state == REG_STATE_UNUSED)
  		return;
  
-	WARN(!(xdp_rxq->reg_state == REG_STATE_REGISTERED), "Driver BUG");
-
  	xdp_rxq_info_unreg_mem_model(xdp_rxq);
  
  	xdp_rxq->reg_state = REG_STATE_UNREGISTERED;

Re: [PATCH net-next] xdp: Remove redundant warning

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-10-28 02:00:20

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski [off-list ref]:

On Wed, 27 Oct 2021 09:38:56 +0800 you wrote:
There is a warning in xdp_rxq_info_unreg_mem_model() when reg_state isn't
equal to REG_STATE_REGISTERED, so the warning in xdp_rxq_info_unreg() is
redundant.

Signed-off-by: Yajun Deng <redacted>
---
 net/core/xdp.c | 2 --
 1 file changed, 2 deletions(-)
Here is the summary with links:
  - [net-next] xdp: Remove redundant warning
    https://git.kernel.org/netdev/net-next/c/b859a360d88d

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help