get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2230138/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2230138,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2230138/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260429102426.210750-5-jtornosm@redhat.com/",
    "project": {
        "id": 46,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/46/?format=api",
        "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": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260429102426.210750-5-jtornosm@redhat.com>",
    "list_archive_url": null,
    "date": "2026-04-29T10:24:26",
    "name": "[net,v5,4/4] ice: skip unnecessary VF reset when setting trust",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "a48efcebbfaa0165307b549bd84301efbcc8f4fd",
    "submitter": {
        "id": 93070,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/93070/?format=api",
        "name": "Jose Ignacio Tornos Martinez",
        "email": "jtornosm@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260429102426.210750-5-jtornosm@redhat.com/mbox/",
    "series": [
        {
            "id": 502034,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/502034/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=502034",
            "date": "2026-04-29T10:24:22",
            "name": "Fix i40e/ice/iavf VF bonding after netdev lock changes",
            "version": 5,
            "mbox": "http://patchwork.ozlabs.org/series/502034/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230138/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230138/checks/",
    "tags": {},
    "related": [],
    "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=79+kvdQA;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=140.211.166.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 [140.211.166.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 4g5D2t1Trvz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 20:25:26 +1000 (AEST)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 5FF7061113;\n\tWed, 29 Apr 2026 10:25:24 +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 BDChPEP7a7NF; Wed, 29 Apr 2026 10:25:23 +0000 (UTC)",
            "from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 8766A61193;\n\tWed, 29 Apr 2026 10:25:23 +0000 (UTC)",
            "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n by lists1.osuosl.org (Postfix) with ESMTP id 6AF5F231\n for <intel-wired-lan@lists.osuosl.org>; Wed, 29 Apr 2026 10:25:22 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id 5CCAB42031\n for <intel-wired-lan@lists.osuosl.org>; Wed, 29 Apr 2026 10:25:22 +0000 (UTC)",
            "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id Hzm0IaLUVMnk for <intel-wired-lan@lists.osuosl.org>;\n Wed, 29 Apr 2026 10:25:21 +0000 (UTC)",
            "from us-smtp-delivery-124.mimecast.com\n (us-smtp-delivery-124.mimecast.com [170.10.129.124])\n by smtp2.osuosl.org (Postfix) with ESMTPS id 50FBB4202D\n for <intel-wired-lan@lists.osuosl.org>; Wed, 29 Apr 2026 10:25:21 +0000 (UTC)",
            "from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com\n (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by\n relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3,\n cipher=TLS_AES_256_GCM_SHA384) id us-mta-133-Jg18yUZpOsORwEPjjFjR5w-1; Wed,\n 29 Apr 2026 06:25:16 -0400",
            "from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com\n (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111])\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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id C2C381800366; Wed, 29 Apr 2026 10:25:14 +0000 (UTC)",
            "from fedora.redhat.com (unknown [10.44.32.45])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 421881800446; Wed, 29 Apr 2026 10:25:09 +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 8766A61193",
            "OpenDKIM Filter v2.11.0 smtp2.osuosl.org 50FBB4202D"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1777458323;\n\tbh=wFXSuTbArLWA6KgK84tVAXunsrSDHkBByEg9Ue3Lwfs=;\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=79+kvdQAoQUNCJWLTqmH1o2CynAemkvnt3IUmPMxPQ+Gp04F1yZoSG6NLcDTSbB0Y\n\t Dj7JFroJE6erQ70TL1n2nd1lJLjaeOX3k5ZDiAaZRjs7wzQ6MzUTapRBCvSEOo8z4i\n\t RfiF9ob5Lhn4BNN54z2PzJxrm77sH2id65Q7PjPIn6YWlyo196giSObHFRl596zc77\n\t d+BK5wHhPoU+Aj/Sa49N37XgYu9i2V+pTdGzrf4QhWQ7g28YQ23V3wennQFOxhZ96/\n\t k5XMXnL8CqnOfSAGOFg6KBVH8IZCXbPCSIB0eunuAj+eJ7lH2EAz1jHqAlGj33zb/3\n\t hhXrA/jem5bzQ==",
        "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 smtp2.osuosl.org 50FBB4202D",
        "X-MC-Unique": "Jg18yUZpOsORwEPjjFjR5w-1",
        "X-Mimecast-MFC-AGG-ID": "Jg18yUZpOsORwEPjjFjR5w_1777458314",
        "From": "Jose Ignacio Tornos Martinez <jtornosm@redhat.com>",
        "To": "netdev@vger.kernel.org",
        "Cc": "intel-wired-lan@lists.osuosl.org, przemyslaw.kitszel@intel.com,\n aleksandr.loktionov@intel.com, jacob.e.keller@intel.com, horms@kernel.org,\n jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,\n davem@davemloft.net, edumazet@google.com, kuba@kernel.org,\n pabeni@redhat.com, Jose Ignacio Tornos Martinez <jtornosm@redhat.com>",
        "Date": "Wed, 29 Apr 2026 12:24:26 +0200",
        "Message-ID": "<20260429102426.210750-5-jtornosm@redhat.com>",
        "In-Reply-To": "<20260429102426.210750-1-jtornosm@redhat.com>",
        "References": "<20260429102426.210750-1-jtornosm@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111",
        "X-Mimecast-MFC-PROC-ID": "h2IKjYliYAMhDoBdBlA20gyZSu1qVZ7wj9aBy105ReA_1777458314",
        "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=1777458320;\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=wFXSuTbArLWA6KgK84tVAXunsrSDHkBByEg9Ue3Lwfs=;\n b=fGIk0aY7JlyGgocQBwmZHSUx12ova1Wi1sI/V3gXa7VhWoZy0gS92TYyyfmEUlREitOXFy\n PPisRoSOIAlti3TdvwPwkD2wkeGux+MgycLaTjo69E2i+mIX+W6qVIUueioy2mV04XbrTv\n W69/luIoXpAEwd39ITVvz2pysHKGyM8=",
        "X-Mailman-Original-Authentication-Results": [
            "smtp2.osuosl.org;\n dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com",
            "smtp2.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=fGIk0aY7"
        ],
        "Subject": "[Intel-wired-lan] [PATCH net v5 4/4] 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. While the delay is smaller\nthan i40e this reset is still unnecessary in most cases.\n\nAdditionally, the original code has a race condition: it deletes MAC LLDP\nfilters BEFORE resetting the VF. During this deletion, the VF is still\nACTIVE and can add new MAC LLDP filters concurrently, potentially\ncorrupting the filter list.\n\nWhen granting trust, no reset is needed - we can just set the capability\nflag to allow privileged operations.\n\nWhen revoking trust, we only need to reset (conservative approach) if\nthe VF has actually configured advanced features that require cleanup\n(MAC LLDP filters, promiscuous mode). For VFs in a clean state, we can\nsafely change the trust setting without the disruptive reset.\n\nWhen we do reset (MAC LLDP case), we fix the race condition by resetting\nfirst to clear VF state (which blocks new MAC LLDP filter additions), then\ndelete existing filters safely. During cleanup, vf->trusted remains true so\nice_vf_is_lldp_ena() works properly. Only after cleanup do we set\nvf->trusted = false.\n\nWhen we don't reset, we manually handle capability flag via helper\nfunction, eliminating the delay.\n\nFixes: 2296345416b0 (\"ice: receive LLDP on trusted VFs\")\nSigned-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>\n---\nv5 Address the comments from Aleksandr Loktionov:\n   - Error handling when ice_setup_vf_trust is called is not necessary\n     because ice_vf_clear_all_promisc_modes is not used due to the\n     conservative approach to solve AI tool review concerns \n   - kdoc should end with '*/' not '**/' (new function)\n   Address AI review (sashiko.dev) from Simon Horman:\n   - Adopt a conservative approach checking multiple conditions before\n     skipping reset: MAC LLDP filters, promiscuous mode\n   - Simplify helper function to only handle capability flag\n   - No need to export ice_vf_clear_all_promisc_modes\nv4: https://lore.kernel.org/all/20260423130405.139568-5-jtornosm@redhat.com/\n\n drivers/net/ethernet/intel/ice/ice_sriov.c | 33 +++++++++++++++++++---\n 1 file changed, 29 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..3c64ed1b41a8 100644\n--- a/drivers/net/ethernet/intel/ice/ice_sriov.c\n+++ b/drivers/net/ethernet/intel/ice/ice_sriov.c\n@@ -1364,6 +1364,23 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)\n \treturn __ice_set_vf_mac(ice_netdev_to_pf(netdev), vf_id, mac);\n }\n \n+/**\n+ * ice_setup_vf_trust - Enable/disable VF trust mode without reset\n+ * @vf: VF to configure\n+ * @setting: trust setting\n+ *\n+ * Update VF flags when changing trust without performing a VF reset.\n+ * This is only called when it's safe to skip the reset (VF has no advanced\n+ * features configured that need cleanup).\n+ */\n+static void ice_setup_vf_trust(struct ice_vf *vf, bool setting)\n+{\n+\tif (setting)\n+\t\tset_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);\n+\telse\n+\t\tclear_bit(ICE_VIRTCHNL_VF_CAP_PRIVILEGE, &vf->vf_caps);\n+}\n+\n /**\n  * ice_set_vf_trust\n  * @netdev: network interface device structure\n@@ -1399,11 +1416,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+\t/* Reset only if revoking trust and VF has advanced features configured */\n+\tif (!trusted &&\n+\t    (vf->num_mac_lldp > 0 ||\n+\t     test_bit(ICE_VF_STATE_UC_PROMISC, vf->vf_states) ||\n+\t     test_bit(ICE_VF_STATE_MC_PROMISC, vf->vf_states))) {\n+\t\tice_reset_vf(vf, ICE_VF_RESET_NOTIFY);\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} else {\n+\t\tice_setup_vf_trust(vf, trusted);\n+\t}\n \tvf->trusted = trusted;\n-\tice_reset_vf(vf, ICE_VF_RESET_NOTIFY);\n+\n \tdev_info(ice_pf_to_dev(pf), \"VF %u is now %strusted\\n\",\n \t\t vf_id, trusted ? \"\" : \"un\");\n \n",
    "prefixes": [
        "net",
        "v5",
        "4/4"
    ]
}