lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGXr9JGL535nJ9SC9iA1P_tt39zA7T672adoWd9GqaqM_jHafA@mail.gmail.com>
Date:	Tue, 7 Oct 2014 09:09:20 -0700
From:	Petri Gynther <pgynther@...gle.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, Florian Fainelli <f.fainelli@...il.com>
Subject: Re: [PATCH net-next] net: bcmgenet: fix Tx ring priority programming

Hi David,

On Mon, Oct 6, 2014 at 8:59 PM, David Miller <davem@...emloft.net> wrote:
> From: Petri Gynther <pgynther@...gle.com>
> Date: Mon,  6 Oct 2014 17:50:01 -0700 (PDT)
>
>> @@ -1731,11 +1744,12 @@ static void bcmgenet_init_multiq(struct net_device *dev)
>>       reg |= ring_cfg;
>>       bcmgenet_tdma_writel(priv, reg, DMA_RING_CFG);
>>
>> -     /* Use configured rings priority and set ring #16 priority */
>> -     reg = bcmgenet_tdma_readl(priv, DMA_RING_PRIORITY);
>> -     reg |= ((GENET_Q0_PRIORITY + priv->hw_params->tx_queues) << 20);
>> -     reg |= dma_priority;
>> -     bcmgenet_tdma_writel(priv, reg, DMA_PRIORITY);
>> +     /* Set ring 16 priority and program the hardware registers */
>> +     dma_priority[2] |=
>> +             ((GENET_Q0_PRIORITY + priv->hw_params->tx_queues) << 20);
>
> Please use "<< (16 - 12) * DMA_RING_BUF_PRIORITY_SHIFT" otherwise this
> constant is magic.
>
> You might, optionally, add macros for the subtraction adjustment each
> priority register uses (0, 6, 12, respectively).

Thanks for the comments. I'm going to simplify this with a few macros.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ