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] [day] [month] [year] [list]
Message-ID: <564421E6.5020600@gmail.com>
Date:	Wed, 11 Nov 2015 21:21:42 -0800
From:	Alexander Duyck <alexander.duyck@...il.com>
To:	Stephen Hemminger <stephen@...workplumber.org>,
	Alexander Duyck <aduyck@...antis.com>
Cc:	netdev@...r.kernel.org, intel-wired-lan@...ts.osuosl.org
Subject: Re: [Intel-wired-lan] [net-next PATCH 2/3] ixgbe: Use __dev_uc_sync
 and __dev_uc_unsync for unicast addresses

On 11/11/2015 05:35 PM, Stephen Hemminger wrote:
> On Thu, 22 Oct 2015 16:26:36 -0700
> Alexander Duyck <aduyck@...antis.com> wrote:
>
>> +static int ixgbe_uc_unsync(struct net_device *netdev, const unsigned char *addr)
>> +{
>> +	struct ixgbe_adapter *adapter = netdev_priv(netdev);
>> +
>> +	ixgbe_del_mac_filter(adapter, addr, VMDQ_P(0));
>> +
>> +	return 0;
> Why add an internal function that always returns 0?
> Rather than making it void.

Because the function pointer is passed to the __dev_uc_sync call and it 
requires a return value on the unsync function.  Basically if we 
returned an error it would delay flushing the address from the device 
until we could complete the call successfully, or __dev_uc_unsysnc was 
called without a function pointer.

- Alex
--
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