Skip to content

Commit

Permalink
tun: vxlan: Use netif_rx().
Browse files Browse the repository at this point in the history
Since commit
   baebdf4 ("net: dev: Makes sure netif_rx() can be invoked in any context.")

the function netif_rx() can be used in preemptible/thread context as
well as in interrupt context.

Use netif_rx().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sebastian Andrzej Siewior authored and David S. Miller committed Mar 7, 2022
1 parent 4bcc424 commit 3d391f6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -1984,7 +1984,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
} else if (!IS_ENABLED(CONFIG_4KSTACKS)) {
tun_rx_batched(tun, tfile, skb, more);
} else {
netif_rx_ni(skb);
netif_rx(skb);
}
rcu_read_unlock();

Expand Down
4 changes: 2 additions & 2 deletions drivers/net/vxlan/vxlan_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1877,7 +1877,7 @@ static int arp_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni)
reply->ip_summed = CHECKSUM_UNNECESSARY;
reply->pkt_type = PACKET_HOST;

if (netif_rx_ni(reply) == NET_RX_DROP) {
if (netif_rx(reply) == NET_RX_DROP) {
dev->stats.rx_dropped++;
vxlan_vnifilter_count(vxlan, vni, NULL,
VXLAN_VNI_STATS_RX_DROPS, 0);
Expand Down Expand Up @@ -2036,7 +2036,7 @@ static int neigh_reduce(struct net_device *dev, struct sk_buff *skb, __be32 vni)
if (reply == NULL)
goto out;

if (netif_rx_ni(reply) == NET_RX_DROP) {
if (netif_rx(reply) == NET_RX_DROP) {
dev->stats.rx_dropped++;
vxlan_vnifilter_count(vxlan, vni, NULL,
VXLAN_VNI_STATS_RX_DROPS, 0);
Expand Down

0 comments on commit 3d391f6

Please sign in to comment.