[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <566C3DA7.4040508@cogentembedded.com>
Date: Sat, 12 Dec 2015 18:30:47 +0300
From: Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To: Jeff Kirsher <jeffrey.t.kirsher@...el.com>, davem@...emloft.net
Cc: Shannon Nelson <shannon.nelson@...el.com>, netdev@...r.kernel.org,
nhorman@...hat.com, sassmann@...hat.com, jogreene@...hat.com
Subject: Re: [net-next 09/11] i40e: clean whole mac filter list
Hello.
On 12/12/2015 11:33 AM, Jeff Kirsher wrote:
> From: Shannon Nelson <shannon.nelson@...el.com>
>
> Clean the whole mac filter list when resetting after an intermediate
> add or delete push to the firmware. The code had evolved from using
> a list from the stack to a heap allocation, but the memset() didn't
> follow the change correctly. This now cleans the whole list rather
> that just part of the first element.
>
> Change-ID: I4cd03d5a103b7407dd8556a3a231e800f2d6f2d5
> Reported-by: Rasmus Villemoes <linux@...musvillemoes.dk>
> Signed-off-by: Shannon Nelson <shannon.nelson@...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 | 18 ++++++++++--------
> 1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
> index 35d787e..8ebf72b 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -1916,11 +1916,12 @@ int i40e_sync_vsi_filters(struct i40e_vsi *vsi)
>
> /* Now process 'del_list' outside the lock */
> if (!list_empty(&tmp_del_list)) {
> + int del_list_size;
Need empty line after declaration.
> filter_list_len = pf->hw.aq.asq_buf_size /
> sizeof(struct i40e_aqc_remove_macvlan_element_data);
> - del_list = kcalloc(filter_list_len,
> - sizeof(struct i40e_aqc_remove_macvlan_element_data),
> - GFP_KERNEL);
> + del_list_size = filter_list_len *
> + sizeof(struct i40e_aqc_remove_macvlan_element_data);
> + del_list = kzalloc(del_list_size, GFP_KERNEL);
> if (!del_list) {
> i40e_cleanup_add_list(&tmp_add_list);
>
[...]
MBR, Sergei
--
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