DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/sfc: avoid unnecessary actions on dummy default MAC set
@ 2020-07-21  8:58 Andrew Rybchenko
  2020-07-21 16:37 ` Ferruh Yigit
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Rybchenko @ 2020-07-21  8:58 UTC (permalink / raw)
  To: dev

Just an optimization to avoid extra reconfiguration when it
is not not actually required.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 6b3c49a284..acee3e48e4 100644
--- 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.
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH] net/sfc: avoid unnecessary actions on dummy default MAC set
  2020-07-21  8:58 [dpdk-dev] [PATCH] net/sfc: avoid unnecessary actions on dummy default MAC set Andrew Rybchenko
@ 2020-07-21 16:37 ` Ferruh Yigit
  0 siblings, 0 replies; 2+ messages in thread
From: Ferruh Yigit @ 2020-07-21 16:37 UTC (permalink / raw)
  To: Andrew Rybchenko, dev

On 7/21/2020 9:58 AM, Andrew Rybchenko wrote:
> Just an optimization to avoid extra reconfiguration when it
> is not not actually required.
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-07-21 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-21  8:58 [dpdk-dev] [PATCH] net/sfc: avoid unnecessary actions on dummy default MAC set Andrew Rybchenko
2020-07-21 16:37 ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).