lkml.org 
[lkml]   [2019]   [May]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [v3, PATCH] net: stmmac: add support for hash table size 128/256 in dwmac4
On Tue, May 28, 2019 at 09:52:49AM +0800, biao huang wrote:
> Dear David,
>
> On Mon, 2019-05-27 at 10:08 -0700, David Miller wrote:
> > From: Biao Huang <biao.huang@mediatek.com>
> > Date: Mon, 27 May 2019 11:14:27 +0800
> >
> > > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
> > > index 5e98da4..029a3db 100644
> > > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
> > > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c
> > > @@ -403,41 +403,50 @@ static void dwmac4_set_filter(struct mac_device_info *hw,
> > > struct net_device *dev)
> > > {
> > > void __iomem *ioaddr = (void __iomem *)dev->base_addr;
> > > - unsigned int value = 0;
> > > + unsigned int value;
> > > + int numhashregs = (hw->multicast_filter_bins >> 5);
> > > + int mcbitslog2 = hw->mcast_bits_log2;
> > > + int i;
> >
> > Please retain the reverse christmas tree ordering here.
> I'm a little confused about the reverse xmas tree ordering.
>
> should I reorder them only according to the total length like this:
>
> void __iomem *ioaddr = (void __iomem *)dev->base_addr;
> int numhashregs = (hw->multicast_filter_bins >> 5);
> int mcbitslog2 = hw->mcast_bits_log2;
> unsigned int value;
> int i;

Yes.
Andrew

\
 
 \ /
  Last update: 2019-05-28 18:41    [W:0.036 / U:0.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site