Skip to content

Commit

Permalink
The function netif_receive_skb() can only be called from softirq
Browse files Browse the repository at this point in the history
context. To call it from process context, add bh_disable() around the
call.
  • Loading branch information
Mark Tomlinson authored and carlgsmith committed Oct 30, 2024
1 parent 542192c commit 606680f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions LINUX/netmap_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,9 @@ nm_os_send_up(struct ifnet *ifp, struct mbuf *m, struct mbuf *prev)

/* Process this packet now on the stack of the userspace caller (rather than
queuing on the cpu backlog and then processing later via ksoftirqd) */
local_bh_disable();
netif_receive_skb(m);
local_bh_enable();
#else
#ifdef NETMAP_LINUX_HAVE_NETIF_RX_NI
netif_rx_ni(m);
Expand Down

0 comments on commit 606680f

Please sign in to comment.