[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57a9c388b925ad9ba9336a0f6dd73b5e@imap.linux.ibm.com>
Date: Tue, 31 Aug 2021 18:32:21 -0700
From: Dany Madden <drt@...ux.ibm.com>
To: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
Cc: netdev@...r.kernel.org, Brian King <brking@...ux.ibm.com>,
cforno12@...ux.ibm.com, Rick Lindsley <ricklind@...ux.ibm.com>
Subject: Re: [PATCH net-next 5/9] ibmvnic: init_tx_pools move loop-invariant
code out
On 2021-08-31 17:08, Sukadev Bhattiprolu wrote:
> In init_tx_pools() move some loop-invariant code out of the loop.
>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@...ux.ibm.com>
Reviewed-by: Dany Madden <drt@...ux.ibm.com>
> ---
> drivers/net/ethernet/ibm/ibmvnic.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/ibm/ibmvnic.c
> b/drivers/net/ethernet/ibm/ibmvnic.c
> index 4c6739b250df..8894afdb3cb3 100644
> --- a/drivers/net/ethernet/ibm/ibmvnic.c
> +++ b/drivers/net/ethernet/ibm/ibmvnic.c
> @@ -839,11 +839,10 @@ static int init_tx_pools(struct net_device
> *netdev)
> * allocation, release_tx_pools() will know how many to look for.
> */
> adapter->num_active_tx_pools = num_pools;
> + buff_size = adapter->req_mtu + VLAN_HLEN;
> + buff_size = ALIGN(buff_size, L1_CACHE_BYTES);
>
> for (i = 0; i < num_pools; i++) {
> - buff_size = adapter->req_mtu + VLAN_HLEN;
> - buff_size = ALIGN(buff_size, L1_CACHE_BYTES);
> -
> dev_dbg(dev, "Init tx pool %d [%llu, %llu]\n",
> i, adapter->req_tx_entries_per_subcrq, buff_size);
Powered by blists - more mailing lists