netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com>
Cc: Volodymyr Bendiuga <valdr.linuxnext@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vivien Didelot <vivien.didelot@savoirfairelinux.com>,
	netdev@vger.kernel.org,
	Volodymyr Bendiuga <volodymyr.bendiuga@westermo.se>
Subject: Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries
Date: Wed, 14 Dec 2016 11:46:14 +0100	[thread overview]
Message-ID: <20161214104614.GD27370@lunn.ch> (raw)
In-Reply-To: <CABHmqqB-6-L124hrAjNxd4kO3zYp9R=RM1X6PXyuQW6Hapiv4g@mail.gmail.com>

On Wed, Dec 14, 2016 at 11:03:14AM +0100, Volodymyr Bendiuga wrote:
> Hi,
> 
> I understand what you wrote, but we do not refresh anything
> at intervals. FDB dump works only on user request, i.e. user
> run bridge fdb dump command. What we did is just a smarter
> way of feeding the dump request with entries obtained from
> switchcore. Interesting thing is that fdb dump in switchcore
> reads all entries, and from those entries only one is returned at
> a time, others are discarded, because request comes as per port.

Ah, O.K.

> What we do is we dump entries from switchcore once, when the
> first dump request comes, save all of them in the cache, and then
> all following fdb dump requests for each port will be fed from the cache,
> so no more hardware dump operations. We set the cache to be valid for
> 2 seconds, but this could be adjusted and tweaked. So in our case
> we decrease the number of MDIO reads quite a lot.

> What we are thinking now, is that this logics could be moved
> to net/dsa layer, and maybe unified with fdb load logics, if possible.

We should check what the other switches do. Can they perform a dump
with the hardware performing the port filter? Those switches will not
benefit from such a cache. But they should also not suffer.

Combining it with load is a bigger question. Currently the drivers are
stateless. That makes the error handling very simple. We don't have to
worry about running out of memory, since we don't allocate any memory.

If we run out of memory for this dump cache, it is not serious, since
a dump does not result in state change. But if we are out of memory on
a load, we do have state changes. We have to deal with the complexity
of allocating resources in the _prepare call, and then use the
resource in the do call. I would much prefer to avoid this at first,
by optimising the atu get. If we don't see a significant speed up,
then we can consider this complex solution of a cache for load.

     Andrew

  parent reply	other threads:[~2016-12-14 10:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 13:39 [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries Volodymyr Bendiuga
2016-12-12 13:54 ` Andrew Lunn
2016-12-12 14:18 ` Andrew Lunn
2016-12-12 15:03 ` Vivien Didelot
     [not found]   ` <CAMr9Lbp5eCg1oyWGN+uiDEcF0VZuKUi87FH6JYTGj6pL82R+Mw@mail.gmail.com>
2016-12-12 16:07     ` Andrew Lunn
2016-12-12 16:37     ` Florian Fainelli
2016-12-12 17:11       ` Vivien Didelot
2016-12-12 19:09       ` Andrew Lunn
2016-12-12 20:03         ` Vivien Didelot
     [not found]         ` <CAMr9LbqyvrRYe_m34Ufzxkf2Vef3LbMQiuoiwVX0mK=hW6euyA@mail.gmail.com>
2016-12-13 15:09           ` Andrew Lunn
     [not found]             ` <CABHmqqB-6-L124hrAjNxd4kO3zYp9R=RM1X6PXyuQW6Hapiv4g@mail.gmail.com>
2016-12-14 10:46               ` Andrew Lunn [this message]
     [not found]                 ` <CABHmqqDpiN2kwkTgrM8Qu8EEx3Sjk2yVBy8QQAJppGfJ6-MV5Q@mail.gmail.com>
2016-12-15 17:21                   ` Vivien Didelot
2016-12-15 17:32                     ` Florian Fainelli
2016-12-15 17:50                       ` Vivien Didelot
     [not found]                         ` <CABHmqqCOYMPA-Py7Uu4gsQ=s8CrQd-tT4-Db+j8eJH9=2s4L2g@mail.gmail.com>
2016-12-16  9:31                           ` John Crispin
2016-12-16 10:08                           ` Andrew Lunn
     [not found]                             ` <CABHmqqAQddcQZqVBi7gTjR40cHx6+aQebmsY3BwJgeEbLsX5Yw@mail.gmail.com>
2016-12-16 11:01                               ` Andrew Lunn
2016-12-23  9:30                                 ` Volodymyr Bendiuga
2016-12-23 10:17                                   ` Andrew Lunn
2016-12-15 17:47                     ` John Crispin
2016-12-12 16:22 ` Vivien Didelot

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=20161214104614.GD27370@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=valdr.linuxnext@gmail.com \
    --cc=vivien.didelot@savoirfairelinux.com \
    --cc=volodymyr.bendiuga@gmail.com \
    --cc=volodymyr.bendiuga@westermo.se \
    /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).