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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <5b3859d1-93c2-06e2-b2da-65a30fdd54da@linux.intel.com>
Date:   Tue, 18 Dec 2018 09:33:10 -0600
From:   Thor Thayer <thor.thayer@...ux.intel.com>
To:     dwesterg@...il.com, netdev@...r.kernel.org, dinguyen@...nel.org,
        richardcochran@...il.com, davem@...emloft.net,
        vbridger@...nsource.altera.com, robh+dt@...nel.org,
        "mark.rutland@....commark.rutland"@arm.com,
        devicetree@...r.kernel.org, hean.loong.ong@...el.com
Cc:     Dalon Westergreen <dalon.westergreen@...el.com>
Subject: Re: [PATCH v2 net-next 02/10] net: eth: altera: set rx and tx ring
 size before init_dma call

On 12/13/18 11:52 AM, dwesterg@...il.com wrote:
> From: Dalon Westergreen <dalon.westergreen@...el.com>
> 
> It is more appropriate to set the rx and tx ring size before calling
> the init function for the dma.
> 
> Signed-off-by: Dalon Westergreen <dalon.westergreen@...el.com>
> ---
>   drivers/net/ethernet/altera/altera_tse_main.c | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
> index dcb330129e23..0c0e8f9bba9b 100644
> --- a/drivers/net/ethernet/altera/altera_tse_main.c
> +++ b/drivers/net/ethernet/altera/altera_tse_main.c
> @@ -1166,6 +1166,10 @@ static int tse_open(struct net_device *dev)
>   	int i;
>   	unsigned long int flags;
>   
> +	/* set tx and rx ring size */
> +	priv->rx_ring_size = dma_rx_num;
> +	priv->tx_ring_size = dma_tx_num;
> +
>   	/* Reset and configure TSE MAC and probe associated PHY */
>   	ret = priv->dmaops->init_dma(priv);
>   	if (ret != 0) {
> @@ -1208,8 +1212,6 @@ static int tse_open(struct net_device *dev)
>   	priv->dmaops->reset_dma(priv);
>   
>   	/* Create and initialize the TX/RX descriptors chains. */
> -	priv->rx_ring_size = dma_rx_num;
> -	priv->tx_ring_size = dma_tx_num;
>   	ret = alloc_init_skbufs(priv);
>   	if (ret) {
>   		netdev_err(dev, "DMA descriptors initialization failed\n");
> 
Acked-by: Thor Thayer <thor.thayer@...ux.intel.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ