From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934995AbdJQKKP (ORCPT ); Tue, 17 Oct 2017 06:10:15 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:44265 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934969AbdJQKKL (ORCPT ); Tue, 17 Oct 2017 06:10:11 -0400 X-Google-Smtp-Source: ABhQp+RGIc02XzTBr9IkEEMmo5cicJYepALLkvPP3gjAD4SjmZxO+JB+I9obMTRZZyy6PLFJqlkgTQ== From: Henrik Austad X-Google-Original-From: Henrik Austad To: netdev@vger.kernel.org Cc: "David S . Miller" , Eric Dumazet , Daniel Borkmann , David Ahern , Alexander Duyck , Willem de Bruijn , John Fastabend , tcharding , linux-kernel@vger.kernel.org, Henrik Austad , Jesus Sanchez-Palencia Subject: [PATCH] net: export netdev_txq_to_tc to allow sch_mqprio to compile as module Date: Tue, 17 Oct 2017 12:10:10 +0200 Message-Id: <1508235010-4056-1-git-send-email-haustad@cisco.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In commit 32302902ff09 ("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 Cc: Jesus Sanchez-Palencia Cc: David S. Miller Signed-off-by: Henrik Austad --- net/core/dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/net/core/dev.c b/net/core/dev.c index fcddccb..d2b20e7 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2040,6 +2040,7 @@ int netdev_txq_to_tc(struct net_device *dev, unsigned int txq) return 0; } +EXPORT_SYMBOL(netdev_txq_to_tc); #ifdef CONFIG_XPS static DEFINE_MUTEX(xps_map_mutex); -- 2.7.4