* Re: [PATCH] net: ifb: record drop reason when redirect device is missing
2026-02-02 19:11 [PATCH] net: ifb: record drop reason when redirect device is missing Murari Prasad Samal
@ 2026-02-03 5:50 ` kernel test robot
2026-02-03 6:04 ` [PATCH v2] " Murari Prasad Samal
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-02-03 5:50 UTC (permalink / raw)
To: Murari Prasad Samal, netdev
Cc: llvm, oe-kbuild-all, andrew+netdev, davem, edumazet, kuba, pabeni,
Murari Prasad Samal
Hi Murari,
kernel test robot noticed the following build errors:
[auto build test ERROR on net/main]
[also build test ERROR on net-next/main linus/master horms-ipvs/master v6.19-rc8 next-20260202]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Murari-Prasad-Samal/net-ifb-record-drop-reason-when-redirect-device-is-missing/20260203-031526
base: net/main
patch link: https://lore.kernel.org/r/20260202191135.7668-1-murariprasadsamal57%40gmail.com
patch subject: [PATCH] net: ifb: record drop reason when redirect device is missing
config: i386-randconfig-012-20260203 (https://download.01.org/0day-ci/archive/20260203/202602031317.D3Pw6418-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260203/202602031317.D3Pw6418-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602031317.D3Pw6418-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/ifb.c:118:26: error: use of undeclared identifier 'SKB_DROP_REASON_NO_DEV'; did you mean 'SKB_DROP_REASON_NOMEM'?
118 | kfree_skb_reason(skb, SKB_DROP_REASON_NO_DEV);
| ^~~~~~~~~~~~~~~~~~~~~~
| SKB_DROP_REASON_NOMEM
include/net/dropreason-core.h:446:2: note: 'SKB_DROP_REASON_NOMEM' declared here
446 | SKB_DROP_REASON_NOMEM,
| ^
1 error generated.
vim +118 drivers/net/ifb.c
88
89 static void ifb_ri_tasklet(struct tasklet_struct *t)
90 {
91 struct ifb_q_private *txp = from_tasklet(txp, t, ifb_tasklet);
92 struct netdev_queue *txq;
93 struct sk_buff *skb;
94
95 txq = netdev_get_tx_queue(txp->dev, txp->txqnum);
96 skb = skb_peek(&txp->tq);
97 if (!skb) {
98 if (!__netif_tx_trylock(txq))
99 goto resched;
100 skb_queue_splice_tail_init(&txp->rq, &txp->tq);
101 __netif_tx_unlock(txq);
102 }
103
104 while ((skb = __skb_dequeue(&txp->tq)) != NULL) {
105 /* Skip tc and netfilter to prevent redirection loop. */
106 skb->redirected = 0;
107 #ifdef CONFIG_NET_CLS_ACT
108 skb->tc_skip_classify = 1;
109 #endif
110 nf_skip_egress(skb, true);
111
112 ifb_update_q_stats(&txp->tx_stats, skb->len);
113
114 rcu_read_lock();
115 skb->dev = dev_get_by_index_rcu(dev_net(txp->dev), skb->skb_iif);
116 if (!skb->dev) {
117 rcu_read_unlock();
> 118 kfree_skb_reason(skb, SKB_DROP_REASON_NO_DEV);
119 txp->dev->stats.tx_dropped++;
120 if (skb_queue_len(&txp->tq) != 0)
121 goto resched;
122 break;
123 }
124 rcu_read_unlock();
125 skb->skb_iif = txp->dev->ifindex;
126
127 if (!skb->from_ingress) {
128 dev_queue_xmit(skb);
129 } else {
130 skb_pull_rcsum(skb, skb->mac_len);
131 netif_receive_skb(skb);
132 }
133 }
134
135 if (__netif_tx_trylock(txq)) {
136 skb = skb_peek(&txp->rq);
137 if (!skb) {
138 txp->tasklet_pending = 0;
139 if (netif_tx_queue_stopped(txq))
140 netif_tx_wake_queue(txq);
141 } else {
142 __netif_tx_unlock(txq);
143 goto resched;
144 }
145 __netif_tx_unlock(txq);
146 } else {
147 resched:
148 txp->tasklet_pending = 1;
149 tasklet_schedule(&txp->ifb_tasklet);
150 }
151
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2] net: ifb: record drop reason when redirect device is missing
2026-02-02 19:11 [PATCH] net: ifb: record drop reason when redirect device is missing Murari Prasad Samal
2026-02-03 5:50 ` kernel test robot
@ 2026-02-03 6:04 ` Murari Prasad Samal
2026-02-03 6:09 ` [PATCH v3] " Murari Prasad Samal
2026-02-03 11:33 ` [PATCH] " kernel test robot
3 siblings, 0 replies; 5+ messages in thread
From: Murari Prasad Samal @ 2026-02-03 6:04 UTC (permalink / raw)
To: netdev; +Cc: andrew+netdev, davem, edumazet, kuba, pabeni, Murari Prasad Samal
When redirecting packets in ifb_ri_tasklet(), the skb is dropped
if the original ingress device can no longer be found.
Use kfree_skb_reason() with SKB_DROP_REASON_DEV_DOWN so the drop
is properly attributed.
No functional change intended.
Signed-off-by: Murari Prasad Samal
---
drivers/net/ifb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index d3dc0914450a..689340ccf9c7 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -115,7 +115,7 @@ static void ifb_ri_tasklet(struct tasklet_struct *t)
skb->dev = dev_get_by_index_rcu(dev_net(txp->dev), skb->skb_iif);
if (!skb->dev) {
rcu_read_unlock();
- dev_kfree_skb(skb);
+ kfree_skb_reason(skb, SKB_DROP_REASON_NO_DEV);
txp->dev->stats.tx_dropped++;
if (skb_queue_len(&txp->tq) != 0)
goto resched;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v3] net: ifb: record drop reason when redirect device is missing
2026-02-02 19:11 [PATCH] net: ifb: record drop reason when redirect device is missing Murari Prasad Samal
2026-02-03 5:50 ` kernel test robot
2026-02-03 6:04 ` [PATCH v2] " Murari Prasad Samal
@ 2026-02-03 6:09 ` Murari Prasad Samal
2026-02-03 11:33 ` [PATCH] " kernel test robot
3 siblings, 0 replies; 5+ messages in thread
From: Murari Prasad Samal @ 2026-02-03 6:09 UTC (permalink / raw)
To: netdev; +Cc: andrew+netdev, davem, edumazet, kuba, pabeni, Murari Prasad Samal
When redirecting packets in ifb_ri_tasklet(), the skb is dropped
if the original ingress device can no longer be found.
Use kfree_skb_reason() with SKB_DROP_REASON_DEV_DOWN so the drop
is properly attributed.
No functional change intended.
Signed-off-by: Murari Prasad Samal
---
drivers/net/ifb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ifb.c b/drivers/net/ifb.c
index d3dc0914450a..689340ccf9c7 100644
--- a/drivers/net/ifb.c
+++ b/drivers/net/ifb.c
@@ -115,7 +115,7 @@ static void ifb_ri_tasklet(struct tasklet_struct *t)
skb->dev = dev_get_by_index_rcu(dev_net(txp->dev), skb->skb_iif);
if (!skb->dev) {
rcu_read_unlock();
- dev_kfree_skb(skb);
+ kfree_skb_reason(skb, SKB_DROP_REASON_NO_DEV);
txp->dev->stats.tx_dropped++;
if (skb_queue_len(&txp->tq) != 0)
goto resched;
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] net: ifb: record drop reason when redirect device is missing
2026-02-02 19:11 [PATCH] net: ifb: record drop reason when redirect device is missing Murari Prasad Samal
` (2 preceding siblings ...)
2026-02-03 6:09 ` [PATCH v3] " Murari Prasad Samal
@ 2026-02-03 11:33 ` kernel test robot
3 siblings, 0 replies; 5+ messages in thread
From: kernel test robot @ 2026-02-03 11:33 UTC (permalink / raw)
To: Murari Prasad Samal, netdev
Cc: oe-kbuild-all, andrew+netdev, davem, edumazet, kuba, pabeni,
Murari Prasad Samal
Hi Murari,
kernel test robot noticed the following build errors:
[auto build test ERROR on net/main]
[also build test ERROR on net-next/main linus/master v6.19-rc8 next-20260202]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Murari-Prasad-Samal/net-ifb-record-drop-reason-when-redirect-device-is-missing/20260203-031526
base: net/main
patch link: https://lore.kernel.org/r/20260202191135.7668-1-murariprasadsamal57%40gmail.com
patch subject: [PATCH] net: ifb: record drop reason when redirect device is missing
config: i386-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260203/202602031242.kPM0xECv-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260203/202602031242.kPM0xECv-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202602031242.kPM0xECv-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/net/ifb.c:118:26: error: use of undeclared identifier 'SKB_DROP_REASON_NO_DEV'; did you mean 'SKB_DROP_REASON_NOMEM'?
118 | kfree_skb_reason(skb, SKB_DROP_REASON_NO_DEV);
| ^~~~~~~~~~~~~~~~~~~~~~
| SKB_DROP_REASON_NOMEM
./include/net/dropreason-core.h:446:2: note: 'SKB_DROP_REASON_NOMEM' declared here
446 | SKB_DROP_REASON_NOMEM,
| ^
1 error generated.
vim +118 drivers/net/ifb.c
88
89 static void ifb_ri_tasklet(struct tasklet_struct *t)
90 {
91 struct ifb_q_private *txp = from_tasklet(txp, t, ifb_tasklet);
92 struct netdev_queue *txq;
93 struct sk_buff *skb;
94
95 txq = netdev_get_tx_queue(txp->dev, txp->txqnum);
96 skb = skb_peek(&txp->tq);
97 if (!skb) {
98 if (!__netif_tx_trylock(txq))
99 goto resched;
100 skb_queue_splice_tail_init(&txp->rq, &txp->tq);
101 __netif_tx_unlock(txq);
102 }
103
104 while ((skb = __skb_dequeue(&txp->tq)) != NULL) {
105 /* Skip tc and netfilter to prevent redirection loop. */
106 skb->redirected = 0;
107 #ifdef CONFIG_NET_CLS_ACT
108 skb->tc_skip_classify = 1;
109 #endif
110 nf_skip_egress(skb, true);
111
112 ifb_update_q_stats(&txp->tx_stats, skb->len);
113
114 rcu_read_lock();
115 skb->dev = dev_get_by_index_rcu(dev_net(txp->dev), skb->skb_iif);
116 if (!skb->dev) {
117 rcu_read_unlock();
> 118 kfree_skb_reason(skb, SKB_DROP_REASON_NO_DEV);
119 txp->dev->stats.tx_dropped++;
120 if (skb_queue_len(&txp->tq) != 0)
121 goto resched;
122 break;
123 }
124 rcu_read_unlock();
125 skb->skb_iif = txp->dev->ifindex;
126
127 if (!skb->from_ingress) {
128 dev_queue_xmit(skb);
129 } else {
130 skb_pull_rcsum(skb, skb->mac_len);
131 netif_receive_skb(skb);
132 }
133 }
134
135 if (__netif_tx_trylock(txq)) {
136 skb = skb_peek(&txp->rq);
137 if (!skb) {
138 txp->tasklet_pending = 0;
139 if (netif_tx_queue_stopped(txq))
140 netif_tx_wake_queue(txq);
141 } else {
142 __netif_tx_unlock(txq);
143 goto resched;
144 }
145 __netif_tx_unlock(txq);
146 } else {
147 resched:
148 txp->tasklet_pending = 1;
149 tasklet_schedule(&txp->ifb_tasklet);
150 }
151
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 5+ messages in thread