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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 27 Jun 2014 17:14:40 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Sathya Perla <sathya.perla@...lex.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 4/4] be2net: re-enable vlan filtering mode asap

Hello.

On 06/27/2014 03:43 PM, Sathya Perla wrote:

> From: Kalesh AP <kalesh.purayil@...lex.com>

> While adding vlans, when the HW limit of vlan filters is reached, the
> driver enables vlan promiscuous mode.
> Similarily, while removing vlans, the driver must re-enable HW filtering
> as soon as the number of vlan filters is within the HW limit.

> Signed-off-by: Kalesh AP <kalesh.purayil@...lex.com>
> Signed-off-by: Sathya Perla <sathya.perla@...lex.com>
> ---
>   drivers/net/ethernet/emulex/benet/be_main.c |    9 +++------
>   1 files changed, 3 insertions(+), 6 deletions(-)

> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c b/drivers/net/ethernet/emulex/benet/be_main.c
> index 5ac9d13..3cf490b 100644
> --- a/drivers/net/ethernet/emulex/benet/be_main.c
> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
> @@ -1176,15 +1176,12 @@ static int be_vlan_rem_vid(struct net_device *netdev, __be16 proto, u16 vid)
>
>   	/* Packets with VID 0 are always received by Lancer by default */
>   	if (lancer_chip(adapter) && vid == 0)
> -		goto ret;
> +		return status;
>
>   	clear_bit(vid, adapter->vids);
> +	adapter->vlans_added--;
> +
>   	status = be_vid_config(adapter);
> -	if (!status)
> -		adapter->vlans_added--;
> -	else
> -		set_bit(vid, adapter->vids);
> -ret:
>   	return status;

    You now can merge the above lines into:

	return be_vid_config(adapter);

WBR, 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

Powered by Openwall GNU/*/Linux Powered by OpenVZ