{"id":2220610,"url":"http://patchwork.ozlabs.org/api/1.1/covers/2220610/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/cover/20260407165206.1121317-1-jtornosm@redhat.com/","project":{"id":46,"url":"http://patchwork.ozlabs.org/api/1.1/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":"<20260407165206.1121317-1-jtornosm@redhat.com>","date":"2026-04-07T16:52:02","name":"[net,v2,0/4] Fix i40e/ice/iavf VF bonding after netdev lock changes","submitter":{"id":93070,"url":"http://patchwork.ozlabs.org/api/1.1/people/93070/?format=json","name":"Jose Ignacio Tornos Martinez","email":"jtornosm@redhat.com"},"mbox":"http://patchwork.ozlabs.org/project/intel-wired-lan/cover/20260407165206.1121317-1-jtornosm@redhat.com/mbox/","series":[{"id":499007,"url":"http://patchwork.ozlabs.org/api/1.1/series/499007/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=499007","date":"2026-04-07T16:52:02","name":"Fix i40e/ice/iavf VF bonding after netdev lock changes","version":2,"mbox":"http://patchwork.ozlabs.org/series/499007/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/2220610/comments/","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=bgTKcVy+;\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 4fqsgh4RqKz1yGM\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 08 Apr 2026 02:52:32 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 1CD9360DA9;\n\tTue,  7 Apr 2026 16:52:31 +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 zEbQWuOIkJer; Tue,  7 Apr 2026 16:52:30 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 2885C60DA0;\n\tTue,  7 Apr 2026 16:52:30 +0000 (UTC)","from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n by lists1.osuosl.org (Postfix) with ESMTP id 824562EF\n for <intel-wired-lan@lists.osuosl.org>; Tue,  7 Apr 2026 16:52:28 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp4.osuosl.org (Postfix) with ESMTP id 6876040B5E\n for <intel-wired-lan@lists.osuosl.org>; Tue,  7 Apr 2026 16:52:28 +0000 (UTC)","from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id 4eN6vVxPg9VG for <intel-wired-lan@lists.osuosl.org>;\n Tue,  7 Apr 2026 16:52:27 +0000 (UTC)","from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp4.osuosl.org (Postfix) with ESMTPS id 597A840B5D\n for <intel-wired-lan@lists.osuosl.org>; Tue,  7 Apr 2026 16:52:26 +0000 (UTC)","from mx-prod-mc-05.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-263-GUFDX4iwOiivGX4MLt0HAA-1; Tue,\n 07 Apr 2026 12:52:21 -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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 104111956094; Tue,  7 Apr 2026 16:52:20 +0000 (UTC)","from fedora.redhat.com (unknown [10.44.48.48])\n by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 9242A300019F; Tue,  7 Apr 2026 16:52:16 +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 2885C60DA0","OpenDKIM Filter v2.11.0 smtp4.osuosl.org 597A840B5D"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1775580750;\n\tbh=VeT8l2i6TVJAMB6JutKbZp1m2QbJomW0DqBNO06ssKM=;\n\th=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:From;\n\tb=bgTKcVy+BaRklzfSQ9BaPl94c1cmzBW2VxK2fT80NyCv+wKYPdIAE/O9ytYGMKe9L\n\t 9UYgoJrkC97WMwV/YlASIcB00zZbHaAEBevqTAFUP9xUCS0k/OYlYGL1Ltl/MWJciN\n\t p1ZQ7l5S4SJSj63KGwJb0BuWc2iarW6lietae6O8aFtAH7JR7xYKVxZQ0lNNiKaTYr\n\t md/y1yxLy/Zx95Wvy0oZAyBVp0kjGUJUiF97TQpmhu/0bBIt4+smSHMbrxUFrtvEk6\n\t +xYviVW5vn0e6EFNCU8vtFjak49rpGQhD1SJLpBGPn5dvR5eDdPd3GrDnGjwxR045L\n\t BWcTbEG2Aeg9Q==","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 smtp4.osuosl.org 597A840B5D","X-MC-Unique":"GUFDX4iwOiivGX4MLt0HAA-1","X-Mimecast-MFC-AGG-ID":"GUFDX4iwOiivGX4MLt0HAA_1775580740","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,  7 Apr 2026 18:52:02 +0200","Message-ID":"<20260407165206.1121317-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":"rQfDFHA10p4YLS12ofyd4bXh71iigvAy5AxlzjNZM_A_1775580740","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=1775580745;\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 bh=VeT8l2i6TVJAMB6JutKbZp1m2QbJomW0DqBNO06ssKM=;\n b=cBlHke9FxAzX35JVdzL1fMi//QcknGMTX/25+qoKqguADbRhv0hEr/iNk1cm+YKPgHRM4N\n o10EOD7kJ3G9+eClOa9wKBmIx/K0NPUfWXPH3WuNbeXfnm0zEw2/LyG2fLSpc8OzIeH1zz\n kSfORCSeihAAcafXi+r7IFH3MQh3Zqk=","X-Mailman-Original-Authentication-Results":["smtp4.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com","smtp4.osuosl.org;\n dkim=pass (1024-bit key,\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=cBlHke9F"],"Subject":"[Intel-wired-lan] [PATCH net v2 0/4] Fix i40e/ice/iavf VF bonding\n after netdev lock changes","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":"This series fixes VF bonding failures introduced by commit ad7c7b2172c3\n(\"net: hold netdev instance lock during sysfs operations\").\n\nWhen adding VFs to a bond immediately after setting trust mode, MAC\naddress changes fail with -EAGAIN, preventing bonding setup. This\naffects both i40e (700-series) and ice (800-series) Intel NICs.\n\nThe core issue is lock contention: iavf_set_mac() is now called with the\nnetdev lock held and waits for MAC change completion while holding it.\nHowever, both the watchdog task that sends the request and the adminq_task\nthat processes PF responses also need this lock, creating a deadlock where\nneither can run, causing timeouts.\n\nAdditionally, setting VF trust triggers an unnecessary ~10 second VF reset\nin i40e driver that delays bonding setup, even though filter\nsynchronization happens naturally during normal VF operation. For ice\ndriver, the delay is not so big, but in the same way the operation is not\nnecessary.\n\nThis series:\n1. Adds safety guard to prevent MAC changes during reset or early\n   initialization (before VF is ready)\n2. Eliminates unnecessary VF reset when setting trust in i40e\n3. Fixes lock contention by polling admin queue synchronously\n4. Eliminates unnecessary VF reset when setting trust in ice\n\nThe key fix (patch 3/4) implements a synchronous MAC change operation\nsimilar to the approach used for ndo_change_mtu deadlock fix:\nhttps://lore.kernel.org/intel-wired-lan/20260211191855.1532226-1-poros@redhat.com/ \nInstead of scheduling work and waiting, it:\n\n- Sends the virtchnl message directly (not via watchdog)\n- Polls the admin queue hardware directly for responses\n- Processes all messages inline (including non-MAC messages)\n- Returns when complete or times out\n\nThis allows the operation to complete synchronously while holding\nnetdev_lock, without relying on watchdog or adminq_task. A new generic\niavf_poll_virtchnl_response() function is introduced that can be reused\nfor future synchronous virtchnl operations.\n\nThe function can sleep for up to 2.5 seconds polling hardware, but this\nis acceptable since netdev_lock is per-device and only serializes\noperations on the same interface.\n\nTesting shows VF bonding now works reliably in ~5 seconds vs 15+ seconds\nbefore (i40e), without timeouts or errors (i40e and ice).\n\nTested on Intel 700-series (i40e) and 800-series (ice) dual-port NICs\nwith iavf driver.\n\nThanks to Jan Tluka <jtluka@redhat.com> and Yuying Ma <yuma@redhat.com> for\nreporting the issues.\n\nJose Ignacio Tornos Martinez (4):\n  iavf: return EBUSY if reset in progress during MAC change\n  i40e: skip unnecessary VF reset when setting trust\n  iavf: send MAC change request synchronously\n  ice: skip unnecessary VF reset when setting trust\n\n---\nv2:\n  - Patch 1: Add state check to prevent MAC changes during early\n    initialization (before __IAVF_DOWN state)\n  - Patch 3: Use synchronous polling approach instead of dropping lock,\n    following the pattern from ndo_change_mtu deadlock fix\n  - Introduce generic iavf_poll_virtchnl_response() for code reuse\n  - Add patch 4/4 to fix the same trust reset issue in ice driver\n  - Add testing confirmation for both i40e and ice hardware\n  - No changes to patch 2 from v1\nv1: https://lore.kernel.org/netdev/20260406112057.906685-1-jtornosm@redhat.com/\n\n drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 17 ++-\n drivers/net/ethernet/intel/iavf/iavf.h             |  2 +-\n drivers/net/ethernet/intel/iavf/iavf_main.c        | 98 +++++++++++++++++-\n drivers/net/ethernet/intel/iavf/iavf_virtchnl.c    | 15 +--\n drivers/net/ethernet/intel/ice/ice_sriov.c         | 15 ++-\n 5 files changed, 123 insertions(+), 24 deletions(-)\n\n--\n2.43.0"}