git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
793f6dc
)
net/sfc: avoid unnecessary actions on dummy default MAC set
author
Andrew Rybchenko
<arybchenko@solarflare.com>
Tue, 21 Jul 2020 08:58:45 +0000
(09:58 +0100)
committer
Ferruh Yigit
<ferruh.yigit@intel.com>
Tue, 21 Jul 2020 16:13:45 +0000
(18:13 +0200)
Just an optimization to avoid extra reconfiguration when it
is not actually required.
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
drivers/net/sfc/sfc_ethdev.c
patch
|
blob
|
history
diff --git
a/drivers/net/sfc/sfc_ethdev.c
b/drivers/net/sfc/sfc_ethdev.c
index
6b3c49a
..
acee3e4
100644
(file)
--- a/
drivers/net/sfc/sfc_ethdev.c
+++ b/
drivers/net/sfc/sfc_ethdev.c
@@
-1030,6
+1030,9
@@
sfc_mac_addr_set(struct rte_eth_dev *dev, struct rte_ether_addr *mac_addr)
sfc_adapter_lock(sa);
+ if (rte_is_same_ether_addr(mac_addr, &port->default_mac_addr))
+ goto unlock;
+
/*
* Copy the address to the device private data so that
* it could be recalled in the case of adapter restart.