* [PATCH] net: export netdev_txq_to_tc to allow sch_mqprio to compile as module
@ 2017-10-17 10:10 Henrik Austad
2017-10-17 11:21 ` Eric Dumazet
2017-10-17 16:00 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Henrik Austad @ 2017-10-17 10:10 UTC (permalink / raw)
To: netdev
Cc: David S . Miller, Eric Dumazet, Daniel Borkmann, David Ahern,
Alexander Duyck, Willem de Bruijn, John Fastabend, tcharding,
linux-kernel, Henrik Austad, Jesus Sanchez-Palencia
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 <alexander.h.duyck@intel.com>
Cc: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Henrik Austad <haustad@cisco.com>
---
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] net: export netdev_txq_to_tc to allow sch_mqprio to compile as module
2017-10-17 10:10 [PATCH] net: export netdev_txq_to_tc to allow sch_mqprio to compile as module Henrik Austad
@ 2017-10-17 11:21 ` Eric Dumazet
2017-10-17 14:31 ` Duyck, Alexander H
2017-10-17 16:00 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2017-10-17 11:21 UTC (permalink / raw)
To: Henrik Austad
Cc: netdev, David S . Miller, Daniel Borkmann, David Ahern,
Alexander Duyck, Willem de Bruijn, John Fastabend, tcharding,
LKML, Henrik Austad, Jesus Sanchez-Palencia
On Tue, Oct 17, 2017 at 3:10 AM, Henrik Austad <henrik@austad.us> wrote:
> 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 <alexander.h.duyck@intel.com>
> Cc: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Henrik Austad <haustad@cisco.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] net: export netdev_txq_to_tc to allow sch_mqprio to compile as module
2017-10-17 11:21 ` Eric Dumazet
@ 2017-10-17 14:31 ` Duyck, Alexander H
0 siblings, 0 replies; 4+ messages in thread
From: Duyck, Alexander H @ 2017-10-17 14:31 UTC (permalink / raw)
To: Eric Dumazet, Henrik Austad
Cc: netdev, David S . Miller, Daniel Borkmann, David Ahern,
Willem de Bruijn, John Fastabend, tcharding, LKML, Henrik Austad,
Sanchez-Palencia, Jesus
> -----Original Message-----
> From: Eric Dumazet [mailto:edumazet@google.com]
> Sent: Tuesday, October 17, 2017 4:21 AM
> To: Henrik Austad <henrik@austad.us>
> Cc: netdev <netdev@vger.kernel.org>; David S . Miller
> <davem@davemloft.net>; Daniel Borkmann <daniel@iogearbox.net>; David
> Ahern <dsahern@gmail.com>; Duyck, Alexander H
> <alexander.h.duyck@intel.com>; Willem de Bruijn <willemb@google.com>;
> John Fastabend <john.fastabend@gmail.com>; tcharding <me@tobin.cc>; LKML
> <linux-kernel@vger.kernel.org>; Henrik Austad <haustad@cisco.com>; Sanchez-
> Palencia, Jesus <jesus.sanchez-palencia@intel.com>
> Subject: Re: [PATCH] net: export netdev_txq_to_tc to allow sch_mqprio to
> compile as module
>
> On Tue, Oct 17, 2017 at 3:10 AM, Henrik Austad <henrik@austad.us> wrote:
> > 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 <alexander.h.duyck@intel.com>
> > Cc: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
> > Cc: David S. Miller <davem@davemloft.net>
> > Signed-off-by: Henrik Austad <haustad@cisco.com>
>
>
> Reviewed-by: Eric Dumazet <edumazet@google.com>
This is identical to a patch I submitted yesterday when I got the report from the kbuild robot. I would say your description looks much better than mine though so I would be good with dropping my patch in favor of this one.
Acked-by: Alexander Duyck <alexander.h.duyck@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] net: export netdev_txq_to_tc to allow sch_mqprio to compile as module
2017-10-17 10:10 [PATCH] net: export netdev_txq_to_tc to allow sch_mqprio to compile as module Henrik Austad
2017-10-17 11:21 ` Eric Dumazet
@ 2017-10-17 16:00 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2017-10-17 16:00 UTC (permalink / raw)
To: henrik
Cc: netdev, edumazet, daniel, dsahern, alexander.h.duyck, willemb,
john.fastabend, me, linux-kernel, haustad, jesus.sanchez-palencia
From: Henrik Austad <henrik@austad.us>
Date: Tue, 17 Oct 2017 12:10:10 +0200
> 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 <alexander.h.duyck@intel.com>
> Cc: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Henrik Austad <haustad@cisco.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-10-17 16:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17 10:10 [PATCH] net: export netdev_txq_to_tc to allow sch_mqprio to compile as module Henrik Austad
2017-10-17 11:21 ` Eric Dumazet
2017-10-17 14:31 ` Duyck, Alexander H
2017-10-17 16:00 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).