From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DD39B459D6 for ; Thu, 19 Sep 2024 14:00:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCD6D4333E; Thu, 19 Sep 2024 14:00:53 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 370CA43338 for ; Thu, 19 Sep 2024 14:00:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726747251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCQQFBUXNciVadeMYzzvsNACIrhunm28po0eOy1pzZU=; b=Vt8ZlQ27BQJhlUfGnnCiuTR7yHEB7qIqKQORRYK8BfEPFQGYld0AAsLTzHN6T7ctSBxZEp 0rKb4UkxpG8JU6iiqecffTMZq6w0Jg35U3OnMfpK71ew7XqB93RwMO4wWQFQPHKuAkzfKx z0RDRRCKUg3iiY6GLAB64grOpswO3Nk= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-586-UlO5GoTjPJit-79NTrZECg-1; Thu, 19 Sep 2024 08:00:48 -0400 X-MC-Unique: UlO5GoTjPJit-79NTrZECg-1 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (unknown [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 390B11953950; Thu, 19 Sep 2024 12:00:47 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.36]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 612AA19560AF; Thu, 19 Sep 2024 12:00:45 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: bruce.richardson@intel.com, stable@dpdk.org, Jingjing Wu Subject: [PATCH] net/iavf: fix mac address with i40e PF Linux driver Date: Thu, 19 Sep 2024 14:00:39 +0200 Message-ID: <20240919120039.4097053-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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: stable@dpdk.org Signed-off-by: David Marchand --- 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