Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-23 Thread Andrew Lunn
On Fri, Dec 23, 2016 at 10:30:27AM +0100, Volodymyr Bendiuga wrote: > Hi Andrew, > Here is the program I promised you. Hi Volodymyr Thanks for this. I will try it out beginning of January. I don't have access to the hardware at the moment. Thanks Andrew

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-23 Thread Volodymyr Bendiuga
Hi Andrew, Here is the program I promised you. There is a .c and Makefile attached to this mail. Simply type ”make” to build it. There is a dependency on libnl3, which needs to be installed. If you don’t have it Just install it: "apt-get install libnl-3-dev libnl-route-3-dev” if you use ubuntu

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-16 Thread Andrew Lunn
On Fri, Dec 16, 2016 at 11:26:01AM +0100, Volodymyr Bendiuga wrote: > Hi Andrew, > > I don't have any script right now, the code I have is a part of > the OS, but I could write simple C program which represents > what we are doing with mc entries and send it to you for profiling. It would be

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-16 Thread Andrew Lunn
On Fri, Dec 16, 2016 at 10:24:28AM +0100, Volodymyr Bendiuga wrote: > Hi all, > > Does this mean we all agree on implementing caching > mechanism in net/dsa layer? If yes, then I can start > working on it immediately. Volodymyr Could you provide us with your test script, which adds multicast

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-16 Thread John Crispin
On 16/12/2016 10:24, Volodymyr Bendiuga wrote: > Hi all, > > Does this mean we all agree on implementing caching > mechanism in net/dsa layer? If yes, then I can start > working on it immediately. > > Regards, > Volodymyr i think that the brcm approach is better as at least on QCA you can

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-15 Thread Vivien Didelot
Florian Fainelli writes: >> In all cases *if caching is really needed*, I think it won't hurt to do >> it in DSA core even if a switch support FDB dump operations on a >> per-port basis, as Andrew mentioned. > > Agreed, and there does not appear to be any need to new

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-15 Thread John Crispin
On 15/12/2016 18:21, Vivien Didelot wrote: > Hi Volodymyr, > > Volodymyr Bendiuga writes: > >> Hi Andrew, >> >> I have tested the approach you wrote in previous mails, the one >> with setting next.mac to address we are looking for -1. It seems >> to be as slow as

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-15 Thread Florian Fainelli
On 12/15/2016 09:21 AM, Vivien Didelot wrote: > Hi Volodymyr, > > Volodymyr Bendiuga writes: > >> Hi Andrew, >> >> I have tested the approach you wrote in previous mails, the one >> with setting next.mac to address we are looking for -1. It seems >> to be as slow

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-15 Thread Vivien Didelot
Hi Volodymyr, Volodymyr Bendiuga writes: > Hi Andrew, > > I have tested the approach you wrote in previous mails, the one > with setting next.mac to address we are looking for -1. It seems > to be as slow as the original implementation, unfortunately. Hum, that is

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-14 Thread Andrew Lunn
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

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-13 Thread Andrew Lunn
> Another interesting thing is that fdb dump operation is slow > too. The more entries you have the slower it gets. We have > implemented caching with timing there as well (I have not submitted > such patch yet), which makes fdb dump much more pleasant in user > space, the operation happens

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Vivien Didelot
Hi Andrew, Andrew Lunn writes: > Humm, it looks like we are doing the atu_get wrong. We are looking for > a specific MAC address. Yet we seem to be walking the whole table to > find it, rather than getting the hardware to do the search. We are not doing it wrong, the hardware

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Andrew Lunn
On Mon, Dec 12, 2016 at 08:37:50AM -0800, Florian Fainelli wrote: > On 12/12/2016 07:22 AM, Volodymyr Bendiuga wrote: > > Hi, > > > > I apologise for incorrectly formatted patch, I will fix and resend it. > > The problem with the ATU right now is that it is too slow when inserting > > entries. >

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Vivien Didelot
Hi all, Florian Fainelli writes: > Seeing such a change makes me wonder if we should not try to push some > of this hashtable abstraction (provided that we agree we want it) at a > higher layer, like net/dsa/slave.c? That is the major reason why I am reluctant to cache

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Florian Fainelli
On 12/12/2016 07:22 AM, Volodymyr Bendiuga wrote: > Hi, > > I apologise for incorrectly formatted patch, I will fix and resend it. > The problem with the ATU right now is that it is too slow when inserting > entries. > When the OS boots up, it might insert some multicast entries into the > atu

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Vivien Didelot
Hi Volodymyr, Volodymyr Bendiuga writes: > +struct pvec_tbl_entry { > +struct hlist_node entry; > +u32 key_crc32; /* key */ > +u16 pvec; > +struct pvec_tbl_key { > +u8 addr[ETH_ALEN]; > +u16 fid; > +

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Andrew Lunn
On Mon, Dec 12, 2016 at 04:22:13PM +0100, Volodymyr Bendiuga wrote: > Hi, > > I apologise for incorrectly formatted patch, I will fix and resend it. Please don't resend with just the white space fixed. The memory model is very important, using the fdb_prepare() call to allocate memory, etc.

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Vivien Didelot
Hi Volodymyr, Volodymyr Bendiuga writes: > Hashtable will make it extremely faster when inserting fdb entries > into the forwarding database. This is hard to follow. As Andrew correctly mentioned, when you have two or more patches, please format them with

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Andrew Lunn
Hi Volodymyr Any multi patch patchset should include a cover note. See git format-patch --cover. This should explain the big picture what does the patchset do, why etc. Also, David sent out an email saying net-next was closed. While it is closed, please send patches are RFC. Thanks

Re: [PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Andrew Lunn
On Mon, Dec 12, 2016 at 02:39:18PM +0100, Volodymyr Bendiuga wrote: > Hashtable will make it extremely faster when inserting fdb entries > into the forwarding database. > > Signed-off-by: Volodymyr Bendiuga > --- > drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 15

[PATCH net-next 1/3] net:dsa:mv88e6xxx: use hashtable to store multicast entries

2016-12-12 Thread Volodymyr Bendiuga
Hashtable will make it extremely faster when inserting fdb entries into the forwarding database. Signed-off-by: Volodymyr Bendiuga --- drivers/net/dsa/mv88e6xxx/mv88e6xxx.h | 15 +++ 1 file changed, 15 insertions(+) diff --git