From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 338D03AD52D for ; Tue, 21 Apr 2026 11:12:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776769965; cv=none; b=NLXIOnnCfrhrk5uShtX18oMKOsZTbUxG+SMEhlzjVwe3C7/T1SHVBUkhnvgYqcOWzsX3FIfPRpvvhq2XosXnawjIcVLDe1QuV4JQ4w2aipse1fY8e8alAOfTtNtre+oCw93iZ9rWTjwIctKkkiEXY/RqbNnuSIxRhpK4HHUYPjE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776769965; c=relaxed/simple; bh=v1CKD6MJLRYIxsG+hMrychYrnD7rUK0JgZNM9solLq8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FxQgRA5RwsvDuEGBFufWU54esADAxk/MOAfteNzx0KFmsIFijHH0FbOSH5GSqSAPhOJRPtXEHq6d1P+EOrP1ZnDFDKcvl0ygxeI1B3vch8QT8Q6K81kT98rDctxCflI1jGthyExbMCD541WHlwsFdcjeNh7eI2Aq01KR2+r48A8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Q/tZ3WDe; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Q/tZ3WDe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776769963; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iEkfECukKbV80ZZBX+sDP9TLbBqsQA+hSKML9YufPe0=; b=Q/tZ3WDe6voQxQyE3MlmrG31kQedkm44EhtOk4v/wDA4TVm5UdSU3stKJ+qjZHoeIoSRUb xWhSuP49Rp7VtttkuqXqAoR48HwRdKzODBHVdG52NQkpHbMdOydhFPEOf0uQ1+GGIDr9va OPmIjWUC8wD4PDwexlHEGpuJ6GbQOFU= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-639-syRl3_z_M6yGUyI_u16pAw-1; Tue, 21 Apr 2026 07:12:39 -0400 X-MC-Unique: syRl3_z_M6yGUyI_u16pAw-1 X-Mimecast-MFC-AGG-ID: syRl3_z_M6yGUyI_u16pAw_1776769959 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (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-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DF5AC1800473; Tue, 21 Apr 2026 11:12:38 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.44.32.45]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9D216195608E; Tue, 21 Apr 2026 11:12:38 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 1DFEAA80C56; Tue, 21 Apr 2026 13:12:36 +0200 (CEST) From: Corinna Vinschen To: intel-wired-lan@osuosl.org, netdev@vger.kernel.org Cc: Jose Ignacio Tornos Martinez , Michal Schmidt , Corinna Vinschen , stable@vger.kernel.org Subject: [PATCH net] iavf: iavf_virtchnl_completion: drop duplicate ether_addr_equal() test Date: Tue, 21 Apr 2026 13:12:36 +0200 Message-ID: <20260421111236.875379-1-vinschen@redhat.com> In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 This is just a simple cleanup fix. Commit 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") introduced a duplicate ether_addr_equal() check, so the current code tests the new MAC twice against the former MAC. Remove the outer ether_addr_equal() test, remnant of commit c5c922b3e09b ("iavf: fix MAC address setting for VFs when filter is rejected") Signed-off-by: Corinna Vinschen Fixes: 35a2443d0910f ("iavf: Add waiting for response from PF in set mac") Reviewed-by: Aleksandr Loktionov --- Added CC: stable@vger.kernel.org drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c index a52c100dcbc5..9b8e7e4376c2 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c @@ -2579,13 +2579,11 @@ void iavf_virtchnl_completion(struct iavf_adapter *adapter, case VIRTCHNL_OP_ADD_ETH_ADDR: if (!v_retval) iavf_mac_add_ok(adapter); - if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr)) - if (!ether_addr_equal(netdev->dev_addr, - adapter->hw.mac.addr)) { - netif_addr_lock_bh(netdev); - eth_hw_addr_set(netdev, adapter->hw.mac.addr); - netif_addr_unlock_bh(netdev); - } + if (!ether_addr_equal(netdev->dev_addr, adapter->hw.mac.addr)) { + netif_addr_lock_bh(netdev); + eth_hw_addr_set(netdev, adapter->hw.mac.addr); + netif_addr_unlock_bh(netdev); + } wake_up(&adapter->vc_waitqueue); break; case VIRTCHNL_OP_GET_STATS: { -- 2.53.0