[Intel-wired-lan] [net-next PATCH 2/3] ixgbe: Use __dev_uc_sync and __dev_uc_unsync for unicast addresses
Alexander Duyck
alexander.duyck at gmail.com
Thu Nov 12 05:21:42 UTC 2015
On 11/11/2015 05:35 PM, Stephen Hemminger wrote:
> On Thu, 22 Oct 2015 16:26:36 -0700
> Alexander Duyck <aduyck at mirantis.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
More information about the Intel-wired-lan
mailing list