Re: [PATCH v2 net-next 8/9] net: mscc: ocelot: set up tag_8021q CPU ports independent of user port affinity

Colin Foster
2022-08-19T13:58:11Z

On Fri, Aug 19, 2022 at 01:48:00PM +0000, Vladimir Oltean wrote:
> On Fri, Aug 19, 2022 at 06:45:48AM -0700, Colin Foster wrote:
> > On Fri, Aug 19, 2022 at 01:39:00PM +0000, Vladimir Oltean wrote:
> > > On Fri, Aug 19, 2022 at 06:37:56AM -0700, Colin Foster wrote:
> > > > On Fri, Aug 19, 2022 at 11:06:23AM +0000, Vladimir Oltean wrote:
> > > > > On Thu, Aug 18, 2022 at 08:58:56PM -0700, Jakub Kicinski wrote:
> > > > > > ERROR: modpost: "ocelot_port_teardown_dsa_8021q_cpu" [drivers/net/dsa/ocelot/mscc_felix.ko] undefined!
> > > > > > ERROR: modpost: "ocelot_port_teardown_dsa_8021q_cpu" [drivers/net/dsa/ocelot/mscc_seville.ko] undefined!
> > > > >
> > > > > Damn, I forgot EXPORT_SYMBOL_GPL()....
> > > > > Since I see you've marked the patches as changes requested already, I'll
> > > > > go ahead and resubmit.
> > > >
> > > > Any reason not to use the _NS() variants?
> > >
> > > What's _NS() and why would I use it?
> >
> > include/linux/export.h.
> >
> > I don't know when to use one over the other. I just know it was
> > requested in my MFD set for drivers/mfd/ocelot*. Partitioning of the
> > symtab, from what I best understand.
>
> Odd. No reason given? I would understand symbol namespacing when there
> is a risk of name collision, but I fail to see such a thing when talking
> about ocelot_port_teardown_dsa_8021q_cpu().

https://patchwork.kernel.org/project/netdevbpf/patch/20220508185313.2222956-9-colin.foster@in-advantage.com/#24849610

From there:

> +EXPORT_SYMBOL(ocelot_chip_reset);

Please, switch to the namespace (_NS) variant of the exported-imported
symbols for these drivers.

I'm not sure the full motivation. But I agree, I can't imagine anyone
else randomly naming and exporting another function of that name.

Just thought I'd ask.