From: Vladimir Oltean <vladimir.oltean@nxp.com>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Vivien Didelot <vivien.didelot@gmail.com>,
"bcm-kernel-feedback-list@broadcom.com"
<bcm-kernel-feedback-list@broadcom.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [RFC PATCH net-next 3/4] net: systemport: use standard netdevice notifier to detect DSA presence
Date: Mon, 21 Dec 2020 23:06:19 +0000 [thread overview]
Message-ID: <20201221230618.4pnwuil4qppoj6f5@skbuf> (raw)
In-Reply-To: <9bc9ff1c-13c5-f01c-ede2-b5cd21c09a38@gmail.com>
On Mon, Dec 21, 2020 at 02:33:16PM -0800, Florian Fainelli wrote:
> On 12/20/2020 8:53 PM, Florian Fainelli wrote:
> > The call to netif_set_real_num_tx_queues() succeeds and
> > slave_dev->real_num_tx_queues is changed to 4 accordingly. The loop that
> > assigns the internal queue mapping (priv->ring_map) is correctly limited
> > to 4, however we get two calls per switch port instead of one. I did not
> > have much time to debug why we get called twice but I will be looking
> > into this tomorrow.
>
> There was not any bug other than there are two instances of a SYSTEMPORT
> device in my system and they both receive the same notification.
>
> So we do need to qualify which of the notifier block matches the device
> of interest, because if we do extract the private structure from the
> device being notified, it is always going to match.
>
> Incremental fixup here:
>
> https://github.com/ffainelli/linux/commit/0eea16e706a73c56a36d701df483ff73211aae7f
...duh.
And when you come to think that I had deleted that code in my patch, not
understanding what it's for... Coincidentally this is also the reason
why I got the prints twice. Sorry :(
>
> and you can add Tested-by: Florian Fainelli <f.fainelli@gmail.com> when
> you resubmit.
>
> Thanks, this is a really nice cleanup.
Thanks.
Do you think we need some getters for dp->index and dp->ds->index, to preserve
some sort of data structure encapsulation from the outside world (although it's
not as if the members of struct dsa_switch and struct dsa_port still couldn't
be accessed directly)?
But then, there's the other aspect. We would have some shiny accessors for DSA
properties, but we're resetting the net_device's number of TX queues.
So much for data encapsulation.
next prev parent reply other threads:[~2020-12-21 23:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-18 22:38 [RFC PATCH net-next 0/4] Reduce coupling between DSA and Broadcom SYSTEMPORT driver Vladimir Oltean
2020-12-18 22:38 ` [RFC PATCH net-next 1/4] net: dsa: move the Broadcom tag information in a separate header file Vladimir Oltean
2020-12-19 0:20 ` Florian Fainelli
2020-12-18 22:38 ` [RFC PATCH net-next 2/4] net: dsa: export dsa_slave_dev_check Vladimir Oltean
2020-12-19 0:20 ` Florian Fainelli
2020-12-18 22:38 ` [RFC PATCH net-next 3/4] net: systemport: use standard netdevice notifier to detect DSA presence Vladimir Oltean
2020-12-19 0:26 ` Florian Fainelli
2020-12-19 4:08 ` Florian Fainelli
2020-12-19 12:12 ` Vladimir Oltean
2020-12-21 4:53 ` Florian Fainelli
2020-12-21 22:33 ` Florian Fainelli
2020-12-21 23:06 ` Vladimir Oltean [this message]
2020-12-21 23:17 ` Florian Fainelli
2020-12-21 23:41 ` Vladimir Oltean
2020-12-18 22:38 ` [RFC PATCH net-next 4/4] net: dsa: remove the DSA specific notifiers Vladimir Oltean
2020-12-19 0:24 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201221230618.4pnwuil4qppoj6f5@skbuf \
--to=vladimir.oltean@nxp.com \
--cc=andrew@lunn.ch \
--cc=bcm-kernel-feedback-list@broadcom.com \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).