s390/qeth: optimize MAC handling in rx_mode callback
authorLakhvich Dmitriy <ldmitriy@ru.ibm.com>
Tue, 6 Oct 2015 13:12:28 +0000 (15:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 7 Oct 2015 11:52:04 +0000 (04:52 -0700)
commitfe5c802882f2eaaf5475b072f16066038754782a
tree2f16f8c86917ab8d242100ac09720de75da6a4bc
parent9abfa8cb201b2167872654b92f567f8bff6016f4
s390/qeth: optimize MAC handling in rx_mode callback

In layer2 mode of the qeth driver, MAC address lists
from struct net_device require mapping to the OSA-card.
The existing implementation is inefficient for lists with
more than several MAC addresses, since for every
ndo_set_rx_mode callback it removes all MAC addresses first,
and then registers the current MAC address list.
This patch changes implementation of ndo_set_rx_mode callback
in qeth, only performing hardware registration/removal for
new/deleted addresses. To shorten lookup of MAC addresses
registered addresses are kept in a hashtable instead of a
linear list.

Signed-off-by: Lakhvich Dmitriy <ldmitriy@ru.ibm.com>
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com>
Reviewed-by: Eugene Crosser <Eugene.Crosser@ru.ibm.com>
Reviewed-by: Thomas Richter <tmricht@de.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_l2_main.c