Skip to content

Commit

Permalink
net: Provide stub for __netif_set_xps_queue if there is no CONFIG_XPS
Browse files Browse the repository at this point in the history
Building virtio_net driver without CONFIG_XPS fails with:

    drivers/net/virtio_net.c: In function ‘virtnet_set_affinity’:
    drivers/net/virtio_net.c:1910:3: error: implicit declaration of function ‘__netif_set_xps_queue’ [-Werror=implicit-function-declaration]
       __netif_set_xps_queue(vi->dev, mask, i, false);
       ^
Fixes: 4d99f66 ("net: allow to call netif_reset_xps_queues() under cpus_read_lock")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Krzysztof Kozlowski authored and David S. Miller committed Aug 10, 2018
1 parent 36d2f76 commit c9fbb2d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/linux/netdevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -3412,6 +3412,13 @@ static inline int netif_set_xps_queue(struct net_device *dev,
{
return 0;
}

static inline int __netif_set_xps_queue(struct net_device *dev,
const unsigned long *mask,
u16 index, bool is_rxqs_map)
{
return 0;
}
#endif

/**
Expand Down

0 comments on commit c9fbb2d

Please sign in to comment.