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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 02 Jun 2014 14:51:22 +0400
From:	Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:	Sathya Perla <Sathya.Perla@...lex.Com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 1/6] be2net: skip multicast promiscuos setting
 in already set

Hello.

On 02-06-2014 8:44, Sathya Perla wrote:

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

>>> Set mc-promisc (multicast promiscuous) mode on an interface, only if it is
>>> *not already* in that mode.

>>> Also removed logs that report interface being set to multicast
>>> promiscous mode. In an earlier comment on the netdev list such log
>>> messages
>>> were deemed unnecessary as this behaviour is common across most of the
>>> ethernet drivers.

>>> Signed-off-by: Kalesh AP <kalesh.purayil@...lex.com>
>>> Signed-off-by: Sathya Perla <sathya.perla@...lex.com>

>> [...]

>>> diff --git a/drivers/net/ethernet/emulex/benet/be_main.c
>> b/drivers/net/ethernet/emulex/benet/be_main.c
>>> index e1d445d..9116d5e 100644
>>> --- a/drivers/net/ethernet/emulex/benet/be_main.c
>>> +++ b/drivers/net/ethernet/emulex/benet/be_main.c
>> [...]
>>> @@ -1244,15 +1242,22 @@ static void be_set_rx_mode(struct net_device
>> *netdev)
>>>    	}
>>>
>>>    	status = be_cmd_rx_filter(adapter, IFF_MULTICAST, ON);
>>> -
>>> -	/* Set to MCAST promisc mode if setting MULTICAST address fails */
>>> -	if (status) {
>>> -		dev_info(&adapter->pdev->dev,
>>> -			 "Exhausted multicast HW filters.\n");
>>> -		dev_info(&adapter->pdev->dev,
>>> -			 "Disabling HW multicast filtering.\n");
>>> -		be_cmd_rx_filter(adapter, IFF_ALLMULTI, ON);
>>> +	if (!status) {
>>> +		if (adapter->flags & BE_FLAGS_MCAST_PROMISC)
>>> +			adapter->flags &= ~BE_FLAGS_MCAST_PROMISC;

>>      Why not just clear it without prior check?

> Yes, can be done. But, what is wrong with clearing the flag after the check ?

    More code, and not very justified, IMHO.

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