{"id":2223072,"url":"http://patchwork.ozlabs.org/api/1.0/patches/2223072/?format=json","project":{"id":46,"url":"http://patchwork.ozlabs.org/api/1.0/projects/46/?format=json","name":"Intel Wired Ethernet development","link_name":"intel-wired-lan","list_id":"intel-wired-lan.osuosl.org","list_email":"intel-wired-lan@osuosl.org","web_url":"","scm_url":"","webscm_url":""},"msgid":"<20260414110006.124286-5-jtornosm@redhat.com>","date":"2026-04-14T11:00:05","name":"[net,v3,4/5] ice: skip unnecessary VF reset when setting trust","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"b59714144f6fb24820d527c1b49d3e86926cc364","submitter":{"id":93070,"url":"http://patchwork.ozlabs.org/api/1.0/people/93070/?format=json","name":"Jose Ignacio Tornos Martinez","email":"jtornosm@redhat.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260414110006.124286-5-jtornosm@redhat.com/mbox/","series":[{"id":499816,"url":"http://patchwork.ozlabs.org/api/1.0/series/499816/?format=json","date":"2026-04-14T11:00:01","name":"Fix i40e/ice/iavf VF bonding after netdev lock changes","version":3,"mbox":"http://patchwork.ozlabs.org/series/499816/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2223072/checks/","tags":{},"headers":{"Return-Path":"<intel-wired-lan-bounces@osuosl.org>","X-Original-To":["incoming@patchwork.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=uPPUfzwx;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::136; helo=smtp3.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fw1Xj1g77z1yDF\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 14 Apr 2026 21:00:53 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id A64FB61CDD;\n\tTue, 14 Apr 2026 11:00:46 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id o46hbKY74Mnh; Tue, 14 Apr 2026 11:00:46 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id DE23261CD4;\n\tTue, 14 Apr 2026 11:00:45 +0000 (UTC)","from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists1.osuosl.org (Postfix) with ESMTP id 249B8283\n for <intel-wired-lan@lists.osuosl.org>; Tue, 14 Apr 2026 11:00:45 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id 15B8761CD4\n for <intel-wired-lan@lists.osuosl.org>; Tue, 14 Apr 2026 11:00:45 +0000 (UTC)","from smtp3.osuosl.org ([127.0.0.1])\n by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id jVLbsEliDPN5 for <intel-wired-lan@lists.osuosl.org>;\n Tue, 14 Apr 2026 11:00:43 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp3.osuosl.org (Postfix) with ESMTPS id 6D0FB61CB8\n for <intel-wired-lan@lists.osuosl.org>; Tue, 14 Apr 2026 11:00:43 +0000 (UTC)","from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-173-LDUkDDjlMG2Z7qpSdvqFag-1; Tue,\n 14 Apr 2026 07:00:38 -0400","from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 4BF2819560A3; Tue, 14 Apr 2026 11:00:37 +0000 (UTC)","from fedora.redhat.com (unknown [10.44.48.43])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id EACFA3000C21; Tue, 14 Apr 2026 11:00:33 +0000 (UTC)"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp3.osuosl.org DE23261CD4","OpenDKIM Filter v2.11.0 smtp3.osuosl.org 6D0FB61CB8"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1776164445;\n\tbh=VAmbrQbBI4SBbRZx1DWmHOcKHdFiGv6B3VCsYo5YKNM=;\n\th=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id:\n\t List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe:\n\t From;\n\tb=uPPUfzwxam7YdFto2d9JGmDVMVER/MN1aLGv5e46qG3VN+hEFSJLbuBaM6N5S6InC\n\t 9PbTFrs8oifJBPgdpbLEPL4Lg0zBBKrl6U0xILUXGneJtk9EHKoBuspUmoYKbMVp8O\n\t 2K/0S0D20tZA5yXbvA5JEVFB+mht7vA/ZQCd7qL/ja32a+0sQzverqlwzCdc9YTbtS\n\t vF/2qLMMZXo6OkvvUC717STAWOaM2Aw/Unj0CzvDG8KLV5l6/U4sGoVpvyGYX5B4e5\n\t wKtcgXIdkB8KX1n+t/zdIXtDcLOURT4gCW5w4L2OKOTn9TDJMViGQESmEAT40ph3V7\n\t N5d2s8CLH1ktg==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=jtornosm@redhat.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp3.osuosl.org 6D0FB61CB8","X-MC-Unique":"LDUkDDjlMG2Z7qpSdvqFag-1","X-Mimecast-MFC-AGG-ID":"LDUkDDjlMG2Z7qpSdvqFag_1776164437","From":"Jose Ignacio Tornos Martinez <jtornosm@redhat.com>","To":"netdev@vger.kernel.org","Cc":"intel-wired-lan@lists.osuosl.org, jesse.brandeburg@intel.com,\n anthony.l.nguyen@intel.com, davem@davemloft.net, edumazet@google.com,\n kuba@kernel.org, pabeni@redhat.com,\n Jose Ignacio Tornos Martinez <jtornosm@redhat.com>","Date":"Tue, 14 Apr 2026 13:00:05 +0200","Message-ID":"<20260414110006.124286-5-jtornosm@redhat.com>","In-Reply-To":"<20260414110006.124286-1-jtornosm@redhat.com>","References":"<20260414110006.124286-1-jtornosm@redhat.com>","MIME-Version":"1.0","X-Scanned-By":"MIMEDefang 3.4.1 on 10.30.177.4","X-Mimecast-MFC-PROC-ID":"zAHQdfVg7paI1g7UMKSpVjRn7zqpEnjEqQsuxH5kCIQ_1776164437","X-Mimecast-Originator":"redhat.com","Content-Transfer-Encoding":"8bit","content-type":"text/plain; charset=\"US-ASCII\"; x-default=true","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=redhat.com;\n s=mimecast20190719; t=1776164442;\n h=from:from:reply-to:subject:subject:date:date:message-id:message-id:\n to:to:cc:cc:mime-version:mime-version:content-type:content-type:\n content-transfer-encoding:content-transfer-encoding:\n in-reply-to:in-reply-to:references:references;\n bh=VAmbrQbBI4SBbRZx1DWmHOcKHdFiGv6B3VCsYo5YKNM=;\n b=WGdNQbYY0E9HZttsnNrEtqlTMmRYMcLDq9a48AvhfJ0L/whmlk1fsD5iEVlBuLbbFCOgmW\n B9d8m/y6SgjTMn/0WPOwLAN+2htgKtV+4oQa/3ZtCyYWS11lWqHbk1rsJQAO4tTLuzSCLQ\n RfKEdYNK4DVSVIOqBcWEq5+APMXDZPA=","X-Mailman-Original-Authentication-Results":["smtp3.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","smtp3.osuosl.org;\n dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com\n header.a=rsa-sha256 header.s=mimecast20190719 header.b=WGdNQbYY"],"Subject":"[Intel-wired-lan] [PATCH net v3 4/5] ice: skip unnecessary VF reset\n when setting trust","X-BeenThere":"intel-wired-lan@osuosl.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>","List-Unsubscribe":"<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>","List-Archive":"<http://lists.osuosl.org/pipermail/intel-wired-lan/>","List-Post":"<mailto:intel-wired-lan@osuosl.org>","List-Help":"<mailto:intel-wired-lan-request@osuosl.org?subject=help>","List-Subscribe":"<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"},"content":"Similar to the i40e fix, ice_set_vf_trust() unconditionally calls\nice_reset_vf() when the trust setting changes.\n\nThe ice driver already has logic to clean up MAC LLDP filters when\nremoving trust, which is the only operation that requires filter\nsynchronization. After this cleanup, the VF reset is only necessary if\nthere were actually filters to remove.\n\nFor all other trust state changes (setting trust, or removing trust\nwhen no filters exist), the reset is unnecessary as filter\nsynchronization happens naturally through normal VF operations.\n\nFix by only triggering the VF reset when removing trust AND filters\nwere actually cleaned up (num_mac_lldp was non-zero).\n\nThis saves some time and eliminates unnecessary service disruption when\nchanging VF trust settings if not necessary.\n\nSigned-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>\n---\n drivers/net/ethernet/intel/ice/ice_sriov.c | 13 +++++++++----\n 1 file changed, 9 insertions(+), 4 deletions(-)","diff":"diff --git a/drivers/net/ethernet/intel/ice/ice_sriov.c b/drivers/net/ethernet/intel/ice/ice_sriov.c\nindex 7e00e091756d..23f692b1e86c 100644\n--- a/drivers/net/ethernet/intel/ice/ice_sriov.c\n+++ b/drivers/net/ethernet/intel/ice/ice_sriov.c\n@@ -1399,14 +1399,19 @@ int ice_set_vf_trust(struct net_device *netdev, int vf_id, bool trusted)\n \n \tmutex_lock(&vf->cfg_lock);\n \n-\twhile (!trusted && vf->num_mac_lldp)\n-\t\tice_vf_update_mac_lldp_num(vf, ice_get_vf_vsi(vf), false);\n-\n \tvf->trusted = trusted;\n-\tice_reset_vf(vf, ICE_VF_RESET_NOTIFY);\n \tdev_info(ice_pf_to_dev(pf), \"VF %u is now %strusted\\n\",\n \t\t vf_id, trusted ? \"\" : \"un\");\n \n+\t/* Only reset VF if removing trust and there are MAC LLDP filters\n+\t * to clean up. Reset is needed to ensure filter removal completes.\n+\t */\n+\tif (!trusted && vf->num_mac_lldp) {\n+\t\twhile (vf->num_mac_lldp)\n+\t\t\tice_vf_update_mac_lldp_num(vf, ice_get_vf_vsi(vf), false);\n+\t\tice_reset_vf(vf, ICE_VF_RESET_NOTIFY);\n+\t}\n+\n \tmutex_unlock(&vf->cfg_lock);\n \n out_put_vf:\n","prefixes":["net","v3","4/5"]}