From: Vladimir Oltean <olteanv@gmail.com>
To: Alexander Duyck <alexanderduyck@fb.com>
Cc: Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@nvidia.com>,
Florian Fainelli <f.fainelli@gmail.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: Possible to use both dev_mc_sync and __dev_mc_sync?
Date: Mon, 21 Mar 2022 20:42:59 +0200 [thread overview]
Message-ID: <20220321184259.dxohcx6ae2txhqiy@skbuf> (raw)
In-Reply-To: <SA1PR15MB513713A75488DB88C7222C2DBD169@SA1PR15MB5137.namprd15.prod.outlook.com>
On Mon, Mar 21, 2022 at 06:37:05PM +0000, Alexander Duyck wrote:
> > -----Original Message-----
> > From: Vladimir Oltean <olteanv@gmail.com>
> > Sent: Monday, March 21, 2022 9:32 AM
> > To: Alexander Duyck <alexanderduyck@fb.com>; Jakub Kicinski
> > <kuba@kernel.org>; Jiri Pirko <jiri@nvidia.com>; Florian Fainelli
> > <f.fainelli@gmail.com>
> > Cc: netdev@vger.kernel.org
> > Subject: Possible to use both dev_mc_sync and __dev_mc_sync?
> I hadn't intended it to work this way. The expectation was that
> __dev_mc_sync would be used by hardware devices whereas dev_mc_sync
> was used by stacked devices such as vlan or macvlan.
Understood, thanks for confirming.
> Probably the easiest way to address it is to split things up so that
> you are using __dev_mc_sync if the switch supports mc filtering and
> have your dsa_slave_sync/unsync_mc call also push it down to the lower
> device, and then call dev_mc_sync after that so that if it hasn't
> already been pushed to the lower device it gets pushed.
Yes, I have a patch with that change, just wanted to make sure I'm not
missing something. It's less efficient because now we need to check
whether dsa_switch_supports_uc_filtering() for each address, whereas
before we checked only once, before calling __dev_uc_add(). Oh well.
> The assumption is that the lower device and the hardware would be
> synced in the same way. If we can't go that route we may have to look
> at implementing a different setup in terms of the reference counting
> such as what is done in __hw_addr_sync_multiple.
So as mentioned, I haven't really understood the internals of the
reference/sync counting schemes being used here. But why are there
different implementations for dev_mc_sync() and dev_mc_sync_multiple()?
next prev parent reply other threads:[~2022-03-21 18:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-21 16:32 Possible to use both dev_mc_sync and __dev_mc_sync? Vladimir Oltean
2022-03-21 18:37 ` Alexander Duyck
2022-03-21 18:42 ` Vladimir Oltean [this message]
2022-03-21 18:45 ` Vladimir Oltean
2022-03-21 19:13 ` Alexander Duyck
2022-03-21 20:02 ` Jay Vosburgh
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=20220321184259.dxohcx6ae2txhqiy@skbuf \
--to=olteanv@gmail.com \
--cc=alexanderduyck@fb.com \
--cc=f.fainelli@gmail.com \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/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).