Hi,
On 18/08/2020 16:46, Jussi Kivilinna wrote:
batadv_bla_send_claim() gets called from worker thread context through batadv_bla_periodic_work(), thus netif_rx_ni needs to be used in that case. This fixes "NOHZ: local_softirq_pending 08" log messages seen when batman-adv is enabled.
Signed-off-by: Jussi Kivilinna jussi.kivilinna@haltian.com
net/batman-adv/bridge_loop_avoidance.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index 5c41cc52bc53..ab6cec3c7586 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c @@ -437,7 +437,10 @@ static void batadv_bla_send_claim(struct batadv_priv *bat_priv, u8 *mac, batadv_add_counter(bat_priv, BATADV_CNT_RX_BYTES, skb->len + ETH_HLEN);
- netif_rx(skb);
- if (in_interrupt())
netif_rx(skb);
- else
netif_rx_ni(skb);
What's the downside in calling netif_rx_ni() all the times? Is there any possible side effect? (consider this call is not along the fast path)
On top of that, I just checked the definition of in_interrupt() and I got this comment:
* Note: due to the BH disabled confusion: in_softirq(),in_interrupt() really * should not be used in new code.
Check https://elixir.bootlin.com/linux/latest/source/include/linux/preempt.h#L85
Is that something we should consider or is the comment bogus?
Regards,
out: if (primary_if) batadv_hardif_put(primary_if);