Skip to content

Commit 8a5f216

Browse files
henrikaudavem330
authored andcommitted
net: export netdev_txq_to_tc to allow sch_mqprio to compile as module
In commit 3230290 ("mqprio: Reserve last 32 classid values for HW traffic classes and misc IDs") sch_mqprio started using netdev_txq_to_tc to find the correct tc instead of dev->tc_to_txq[] However, when mqprio is compiled as a module, it cannot resolve the symbol, leading to this error: ERROR: "netdev_txq_to_tc" [net/sched/sch_mqprio.ko] undefined! This adds an EXPORT_SYMBOL() since the other user in the kernel (netif_set_xps_queue) is also EXPORT_SYMBOL() (and not _GPL) or in a sysfs-callback. Cc: Alexander Duyck <[email protected]> Cc: Jesus Sanchez-Palencia <[email protected]> Cc: David S. Miller <[email protected]> Signed-off-by: Henrik Austad <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Acked-by: Alexander Duyck <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent e4467f2 commit 8a5f216

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/core/dev.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,7 @@ int netdev_txq_to_tc(struct net_device *dev, unsigned int txq)
20402040

20412041
return 0;
20422042
}
2043+
EXPORT_SYMBOL(netdev_txq_to_tc);
20432044

20442045
#ifdef CONFIG_XPS
20452046
static DEFINE_MUTEX(xps_map_mutex);

0 commit comments

Comments
 (0)