[dpdk-dev,v2] net/i40e: no more initial VF MAC address

Message ID 1487717129-26021-1-git-send-email-qi.z.zhang@intel.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

Qi Zhang Feb. 21, 2017, 10:45 p.m. UTC
  During PF initialization, PF will generate an initial mac address
for VFs, the purpose is to help VF keep a constant mac address between
its startup/shutdown cycles. Now this is not necessary, since we already
provide an API to set VF's MAC address from PF side
(rte_pmd_i40e_set_vf_mac_addr).
Application can use this API to lock down VF's mac address.(of course this
should happen before VF init)
While without this patch, we still can use rte_pmd_i40e_set_vf_mac_addr
to overwrite the random one, but this patch align DPDK's default behavior
with Kernel PF driver's, and this help to give an identical experience
when work with kernel VF driver.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
v2: add more explanation in commit log

 drivers/net/i40e/i40e_pf.c | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Ferruh Yigit March 5, 2017, 10:22 p.m. UTC | #1
On 2/21/2017 10:45 PM, Qi Zhang wrote:
> During PF initialization, PF will generate an initial mac address
> for VFs, the purpose is to help VF keep a constant mac address between
> its startup/shutdown cycles. Now this is not necessary, since we already
> provide an API to set VF's MAC address from PF side
> (rte_pmd_i40e_set_vf_mac_addr).
> Application can use this API to lock down VF's mac address.(of course this
> should happen before VF init)
> While without this patch, we still can use rte_pmd_i40e_set_vf_mac_addr
> to overwrite the random one, but this patch align DPDK's default behavior
> with Kernel PF driver's, and this help to give an identical experience
> when work with kernel VF driver.
> 
> Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>

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

Patch

diff --git a/drivers/net/i40e/i40e_pf.c b/drivers/net/i40e/i40e_pf.c
index f771dfb..ffa8328 100644
--- a/drivers/net/i40e/i40e_pf.c
+++ b/drivers/net/i40e/i40e_pf.c
@@ -1349,7 +1349,6 @@  i40e_pf_host_init(struct rte_eth_dev *dev)
 		ret = i40e_pf_host_vf_reset(&pf->vfs[i], 0);
 		if (ret != I40E_SUCCESS)
 			goto fail;
-		eth_random_addr(pf->vfs[i].mac_addr.addr_bytes);
 	}
 
 	/* restore irq0 */