Following an upstream Linux kernel change (see link), the mac address of
a iavf port, serviced by a i40e PF driver, is reset to 0 during the
VIRTCHNL_OP_GET_VF_RESOURCES query.

The DPDK iavf driver then assigns a new random mac address.

Such sequence is triggered every time the VF is initialised which means
that, from a DPDK application point of view, the mac address gets changed
for every VF reset event. And obviously, two runs of a DPDK application
get a different mac address.

The i40e PF driver change is pretty obscure but the iavf Linux driver does
set VIRTCHNL_VF_OFFLOAD_USO.
Announcing such a capability in the DPDK driver does not seem to be an
issue, so do the same in DPDK to keep the legacy behavior of a fixed mac.

Link: 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fed0d9f13266

Cc: sta...@dpdk.org

Signed-off-by: David Marchand <david.march...@redhat.com>
---
 drivers/net/iavf/iavf_vchnl.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/iavf/iavf_vchnl.c b/drivers/net/iavf/iavf_vchnl.c
index 6d5969f084..a894a80007 100644
--- a/drivers/net/iavf/iavf_vchnl.c
+++ b/drivers/net/iavf/iavf_vchnl.c
@@ -710,6 +710,7 @@ iavf_get_vf_resource(struct iavf_adapter *adapter)
                VIRTCHNL_VF_OFFLOAD_ADV_RSS_PF |
                VIRTCHNL_VF_OFFLOAD_FSUB_PF |
                VIRTCHNL_VF_OFFLOAD_REQ_QUEUES |
+               VIRTCHNL_VF_OFFLOAD_USO |
                VIRTCHNL_VF_OFFLOAD_CRC |
                VIRTCHNL_VF_OFFLOAD_VLAN_V2 |
                VIRTCHNL_VF_LARGE_NUM_QPAIRS |
-- 
2.46.0

Reply via email to