From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 68510C04AB6 for ; Tue, 28 May 2019 16:40:51 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3DDF02166E for ; Tue, 28 May 2019 16:40:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="fHOCnYOb"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="XDQ9N9RT" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3DDF02166E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lunn.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=2DCL1z47zS/pGdGiEBM9SY5d0IMfVfgx8arhjls8R/8=; b=fHOCnYObywgf/G 5vkxyc1OwdMlcDH2OuiZ+v8KTHCkyWUwv6mVMNyOiXpa744ULMv7x/XROk4TJlbT70cdYXC2vf+wL APN8BcS66GdoWT1NblUTZwutVpDtmnOXYCB3F8u8piJQVqvFUFR1vd9Al9RWoBxqFhJbaqfL2lLGb yYzo82cmy8bbC21x/QIlnjZHaV+hBc9igPxjDicQdWPyaVSpTBHztNky6SSv60Q6de0XO4Gvn1qQ3 XB6bBI1uBPH2dFzyiLg8cLCMfz0kkzaYM9SuUX9lHZu5ZRVtT2k2D0v5mbnp2DES1xVRbiCXOKKmp q6c3AMBSAeTjLFeWp3kQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVf9c-00064W-9o; Tue, 28 May 2019 16:40:48 +0000 Received: from vps0.lunn.ch ([185.16.172.187]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hVf9Y-00063Y-On; Tue, 28 May 2019 16:40:46 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=5O70O6OB10YmWngTAKAkcQIdQ8sIfTqZZD+NK309vZU=; b=XDQ9N9RTp0puDZabOwzrob//Kv y5oy66ii5xp4F7st5YdpcGsQfHk49y6kt4E3Nzy9SeaASuX4lI0LHIfxYYfomjcKTlLGyWF2elUYj DESlvmLxyQMfXIHDIaQ9P/Wb7VkStdDsD43MTeQEvS5DmeCYX7npfkM0NZCBD5mlRUME=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hVf99-0000Gw-95; Tue, 28 May 2019 18:40:19 +0200 Date: Tue, 28 May 2019 18:40:19 +0200 From: Andrew Lunn To: biao huang Subject: Re: [v3, PATCH] net: stmmac: add support for hash table size 128/256 in dwmac4 Message-ID: <20190528164019.GR18059@lunn.ch> References: <1558926867-16472-1-git-send-email-biao.huang@mediatek.com> <1558926867-16472-2-git-send-email-biao.huang@mediatek.com> <20190527.100800.1719164073038257292.davem@davemloft.net> <1559008369.24897.66.camel@mhfsdcap03> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1559008369.24897.66.camel@mhfsdcap03> User-Agent: Mutt/1.5.23 (2014-03-12) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190528_094044_962694_B8D17894 X-CRM114-Status: GOOD ( 12.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: yt.shen@mediatek.com, alexandre.torgue@st.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, boon.leong.ong@intel.com, joabreu@synopsys.com, linux-mediatek@lists.infradead.org, mcoquelin.stm32@gmail.com, jianguo.zhang@mediatek.com, peppe.cavallaro@st.com, David Miller , linux-arm-kernel@lists.infradead.org, matthias.bgg@gmail.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 > > 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel