[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <063D6719AE5E284EB5DD2968C1650D6D5F4E73F2@AcuExch.aculab.com>
Date: Wed, 29 Jun 2016 13:00:39 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Jeff Kirsher' <jeffrey.t.kirsher@...el.com>,
"davem@...emloft.net" <davem@...emloft.net>
CC: Mitch Williams <mitch.a.williams@...el.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"nhorman@...hat.com" <nhorman@...hat.com>,
"sassmann@...hat.com" <sassmann@...hat.com>,
"jogreene@...hat.com" <jogreene@...hat.com>
Subject: RE: [net-next 02/16] i40e: add hw struct local variable
From: Jeff Kirsher
> Sent: 29 June 2016 05:41
> From: Mitch Williams <mitch.a.williams@...el.com>
>
> This function uses the i40e_hw struct all over the place, so why doesn't
> it keep a pointer to the struct? Add this pointer as a local variable
> and use it consistently throughout the function.
>
> Change-ID: I10eb688fe40909433fcb8ac7ac891cef67445d72
> Signed-off-by: Mitch Williams <mitch.a.williams@...el.com>
> Tested-by: Andrew Bowers <andrewx.bowers@...el.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> ---
> drivers/net/ethernet/intel/i40e/i40e_main.c | 79 +++++++++++++++--------------
> 1 file changed, 41 insertions(+), 38 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 734cba6..9a26ecc 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -1840,6 +1840,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
> {
> struct list_head tmp_del_list, tmp_add_list;
> struct i40e_mac_filter *f, *ftmp, *fclone;
> + struct i40e_hw *hw = &vsi->back->hw;
> bool promisc_forced_on = false;
> bool add_happened = false;
> int filter_list_len = 0;
> @@ -1920,7 +1921,7 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
> if (!list_empty(&tmp_del_list)) {
> int del_list_size;
>
> - filter_list_len = pf->hw.aq.asq_buf_size /
> + filter_list_len = hw->aq.asq_buf_size /
...
I suspect you've just made the compiler use separate registers for
pf and hw.
This could easily cause additional register spills to/from stack.
David
Powered by blists - more mailing lists