[dpdk-dev] net/bnxt: remove useless copy when setting MAC address

Message ID 20180103133259.300-1-olivier.matz@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Olivier Matz Jan. 3, 2018, 1:32 p.m. UTC
  This operation is already done by the ethdev layer, it should not
be done by the driver.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Ferruh Yigit Jan. 12, 2018, 6:46 p.m. UTC | #1
On 1/3/2018 1:32 PM, Olivier Matz wrote:
> This operation is already done by the ethdev layer, it should not
> be done by the driver.
> 
> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit Jan. 12, 2018, 6:48 p.m. UTC | #2
On 1/12/2018 6:46 PM, Ferruh Yigit wrote:
> On 1/3/2018 1:32 PM, Olivier Matz wrote:
>> This operation is already done by the ethdev layer, it should not
>> be done by the driver.
>>
>> Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index 6f8a6335b..9d1ddae38 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -1397,7 +1397,6 @@  bnxt_set_default_mac_addr_op(struct rte_eth_dev *dev, struct ether_addr *addr)
 		return;
 
 	memcpy(bp->mac_addr, addr, sizeof(bp->mac_addr));
-	memcpy(&dev->data->mac_addrs[0], bp->mac_addr, ETHER_ADDR_LEN);
 
 	STAILQ_FOREACH(filter, &vnic->filter, next) {
 		/* Default Filter is at Index 0 */