All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>, davem@davemloft.net
Cc: Shannon Nelson <shannon.nelson@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com
Subject: Re: [net-next 09/11] i40e: clean whole mac filter list
Date: Sat, 12 Dec 2015 18:30:47 +0300	[thread overview]
Message-ID: <566C3DA7.4040508@cogentembedded.com> (raw)
In-Reply-To: <1449909213-33795-10-git-send-email-jeffrey.t.kirsher@intel.com>

Hello.

On 12/12/2015 11:33 AM, Jeff Kirsher wrote:

> From: Shannon Nelson <shannon.nelson@intel.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@rasmusvillemoes.dk>
> Signed-off-by: Shannon Nelson <shannon.nelson@intel.com>
> Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.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

  reply	other threads:[~2015-12-12 15:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-12  8:33 [net-next 00/11][pull request] 40GbE Intel Wired LAN Driver Updates 2015-12-12 Jeff Kirsher
2015-12-12  8:33 ` [net-next 01/11] i40e: chomp the BIT(_ULL) Jeff Kirsher
2015-12-12  8:33 ` [net-next 02/11] i40e: properly delete VF MAC filters Jeff Kirsher
2015-12-12  8:33 ` [net-next 03/11] i40e: don't add zero MAC filter Jeff Kirsher
2015-12-12  8:33 ` [net-next 04/11] i40evf: check rings before freeing resources Jeff Kirsher
2015-12-12  8:33 ` [net-next 05/11] i40e: use explicit cast from u16 to u8 Jeff Kirsher
2015-12-12  8:33 ` [net-next 06/11] i40e: Opcode and structures required by OEM Post Update AQ command and add new NVM arq message Jeff Kirsher
2015-12-12  8:33 ` [net-next 07/11] i40e: hush little warnings Jeff Kirsher
2015-12-12  8:33 ` [net-next 08/11] i40e/i40evf: Add a new offload for RSS PCTYPE V2 for X722 Jeff Kirsher
2015-12-12  8:33 ` [net-next 09/11] i40e: clean whole mac filter list Jeff Kirsher
2015-12-12 15:30   ` Sergei Shtylyov [this message]
2015-12-12  8:33 ` [net-next 10/11] i40evf: change version string generation Jeff Kirsher
2015-12-12  8:33 ` [net-next 11/11] i40e/i40evf: Bump i40e to 1.4.8 and i40evf to 1.4.4 Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=566C3DA7.4040508@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=davem@davemloft.net \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    --cc=shannon.nelson@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.