get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2195119,
    "url": "http://patchwork.ozlabs.org/api/patches/2195119/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260210133856.705109-1-amorenoz@redhat.com/",
    "project": {
        "id": 47,
        "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api",
        "name": "Open vSwitch",
        "link_name": "openvswitch",
        "list_id": "ovs-dev.openvswitch.org",
        "list_email": "ovs-dev@openvswitch.org",
        "web_url": "http://openvswitch.org/",
        "scm_url": "git@github.com:openvswitch/ovs.git",
        "webscm_url": "https://github.com/openvswitch/ovs",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260210133856.705109-1-amorenoz@redhat.com>",
    "list_archive_url": null,
    "date": "2026-02-10T13:38:56",
    "name": "[ovs-dev,v3] bond: Fix next_rebalance offset calculation.",
    "commit_ref": "d71ee9ed43fed156f0421fb9ff91f835715ced6f",
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "cbbdc4b8fd5bb91197824cc60ded2d5cbd4cc2b2",
    "submitter": {
        "id": 77477,
        "url": "http://patchwork.ozlabs.org/api/people/77477/?format=api",
        "name": "Adrian Moreno",
        "email": "amorenoz@redhat.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260210133856.705109-1-amorenoz@redhat.com/mbox/",
    "series": [
        {
            "id": 491675,
            "url": "http://patchwork.ozlabs.org/api/series/491675/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=491675",
            "date": "2026-02-10T13:38:56",
            "name": "[ovs-dev,v3] bond: Fix next_rebalance offset calculation.",
            "version": 3,
            "mbox": "http://patchwork.ozlabs.org/series/491675/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2195119/comments/",
    "check": "success",
    "checks": "http://patchwork.ozlabs.org/api/patches/2195119/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<ovs-dev-bounces@openvswitch.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "dev@openvswitch.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@legolas.ozlabs.org",
            "ovs-dev@lists.linuxfoundation.org"
        ],
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=ErptR/+a;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=140.211.166.136; helo=smtp3.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)",
            "smtp3.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key)\n header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256\n header.s=mimecast20190719 header.b=ErptR/+a",
            "smtp3.osuosl.org; dmarc=pass (p=quarantine dis=none)\n header.from=redhat.com"
        ],
        "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 4f9N2Q6FLrz1xtV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 11 Feb 2026 00:39:10 +1100 (AEDT)",
            "from localhost (localhost [127.0.0.1])\n\tby smtp3.osuosl.org (Postfix) with ESMTP id 52BCF608B2;\n\tTue, 10 Feb 2026 13:39:08 +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 ksx8DtX45eib; Tue, 10 Feb 2026 13:39:07 +0000 (UTC)",
            "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp3.osuosl.org (Postfix) with ESMTPS id 653DC6088D;\n\tTue, 10 Feb 2026 13:39:07 +0000 (UTC)",
            "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 1C279C077F;\n\tTue, 10 Feb 2026 13:39:07 +0000 (UTC)",
            "from smtp3.osuosl.org (smtp3.osuosl.org [IPv6:2605:bc80:3010::136])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 0ED71C077E\n for <dev@openvswitch.org>; Tue, 10 Feb 2026 13:39:06 +0000 (UTC)",
            "from localhost (localhost [127.0.0.1])\n by smtp3.osuosl.org (Postfix) with ESMTP id E1CAB608B2\n for <dev@openvswitch.org>; Tue, 10 Feb 2026 13:39:05 +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 tsg8mzCXrw85 for <dev@openvswitch.org>;\n Tue, 10 Feb 2026 13:39:05 +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 D3C046088D\n for <dev@openvswitch.org>; Tue, 10 Feb 2026 13:39:04 +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-637-e7N4ix9pN-iEXcbhkda5ZQ-1; Tue,\n 10 Feb 2026 08:39:01 -0500",
            "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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS\n id 1297F19560A2\n for <dev@openvswitch.org>; Tue, 10 Feb 2026 13:39:01 +0000 (UTC)",
            "from antares.redhat.com (unknown [10.45.226.126])\n by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP\n id 8F74D18003F6; Tue, 10 Feb 2026 13:38:59 +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.9.56;\n helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ",
        "DKIM-Filter": [
            "OpenDKIM Filter v2.11.0 smtp3.osuosl.org 653DC6088D",
            "OpenDKIM Filter v2.11.0 smtp3.osuosl.org D3C046088D"
        ],
        "Received-SPF": "Pass (mailfrom) identity=mailfrom; client-ip=170.10.129.124;\n helo=us-smtp-delivery-124.mimecast.com; envelope-from=amorenoz@redhat.com;\n receiver=<UNKNOWN>",
        "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp3.osuosl.org D3C046088D",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;\n s=mimecast20190719; t=1770730743;\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=BS4XZucOBgkS+M7D/CSFr4T7o2kIjEh7n7iEcennxoA=;\n b=ErptR/+aPrptECaKNF0L1I4HlJfxOAC9Wx50ZqKsbx+rw9VhMhKeUvHQpziXLL85OP5+u9\n AzGsfvZMyHYLh9MYQGMITiGnXzmG7A9YwCAP9zS/pj2sdgqPCWbUTaVMMpapjuQcdl6qje\n pYdEdtcmC4MS8G7SGWhGyBn1ilg4orU=",
        "X-MC-Unique": "e7N4ix9pN-iEXcbhkda5ZQ-1",
        "X-Mimecast-MFC-AGG-ID": "e7N4ix9pN-iEXcbhkda5ZQ_1770730741",
        "To": "dev@openvswitch.org",
        "Date": "Tue, 10 Feb 2026 14:38:56 +0100",
        "Message-ID": "<20260210133856.705109-1-amorenoz@redhat.com>",
        "MIME-Version": "1.0",
        "X-Scanned-By": "MIMEDefang 3.4.1 on 10.30.177.111",
        "X-Mimecast-Spam-Score": "0",
        "X-Mimecast-MFC-PROC-ID": "7aMgNiFAro6WD5Psuumw2d56ofcXPxdHMMeq5g7oAmU_1770730741",
        "X-Mimecast-Originator": "redhat.com",
        "Subject": "[ovs-dev] [PATCH v3] bond: Fix next_rebalance offset calculation.",
        "X-BeenThere": "ovs-dev@openvswitch.org",
        "X-Mailman-Version": "2.1.30",
        "Precedence": "list",
        "List-Id": "<ovs-dev.openvswitch.org>",
        "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>",
        "List-Archive": "<http://mail.openvswitch.org/pipermail/ovs-dev/>",
        "List-Post": "<mailto:ovs-dev@openvswitch.org>",
        "List-Help": "<mailto:ovs-dev-request@openvswitch.org?subject=help>",
        "List-Subscribe": "<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>",
        "From": "Adrian Moreno via dev <ovs-dev@openvswitch.org>",
        "Reply-To": "Adrian Moreno <amorenoz@redhat.com>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Errors-To": "ovs-dev-bounces@openvswitch.org",
        "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>"
    },
    "content": "The current way of calculating \"next_rebalance\" when there is a change\nin the bond rebalance period applies the current rebalance interval\n(again) and subtracts the new one.\n\nThis yields an unexpected new value for \"next_rebalance\": say the\ncurrent interval is 60s and we reduce it to 10s (and rebalancing has\njust occurred), the current logic will set the next rebalancing in 110s\nwhich is probably not what the user expects.\n\nSwap current and new rebalance intervals in the offset calculation\nlogic.\n\nFixes: 9a2169a3f7bb (\"bond: Do not flag a revalidation when adjusting time.\")\nReported-by: Minxi Hou <mhou@redhat.com>\nSigned-off-by: Adrian Moreno <amorenoz@redhat.com>\n---\n ofproto/bond.c        |  4 ++--\n tests/ofproto-dpif.at | 39 +++++++++++++++++++++++++++++++++++++++\n 2 files changed, 41 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/ofproto/bond.c b/ofproto/bond.c\nindex 584c38f07..ef481a360 100644\n--- a/ofproto/bond.c\n+++ b/ofproto/bond.c\n@@ -468,9 +468,9 @@ bond_reconfigure(struct bond *bond, const struct bond_settings *s)\n              * we can skip triggering the rest of the port reconfiguration. */\n             if (bond->next_rebalance) {\n                 long long int old_start_time =\n-                    bond->next_rebalance - s->rebalance_interval;\n+                    bond->next_rebalance - bond->rebalance_interval;\n                 bond->next_rebalance =\n-                    old_start_time + bond->rebalance_interval;\n+                    old_start_time + s->rebalance_interval;\n             }\n         } else {\n             /* When the bond is doing a disable/enable of the rebalance\ndiff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at\nindex 15dbfd60c..10782337e 100644\n--- a/tests/ofproto-dpif.at\n+++ b/tests/ofproto-dpif.at\n@@ -10551,6 +10551,45 @@ recirc_id(0),in_port(7),packet_type(ns=0,id=0),eth(src=50:54:00:00:00:0b,dst=50:\n OVS_VSWITCHD_STOP\n AT_CLEANUP\n \n+AT_SETUP([ofproto-dpif - bond rebalance interval reconfiguration])\n+OVS_VSWITCHD_START\n+\n+AT_CHECK([ovs-appctl time/stop])\n+AT_CHECK([ovs-vsctl add-bond br0 bond0 p1 p2 bond_mode=balance-slb \\\n+          other-config:bond-rebalance-interval=60000 -- \\\n+          set interface p1 type=dummy ofport_request=1 -- \\\n+          set interface p2 type=dummy ofport_request=2])\n+\n+# TEST_NEXT_REBALANCE([num])\n+# Test the next rebalance value is equal to a number.\n+m4_define([TEST_NEXT_REBALANCE_EQ], [\n+  AT_CHECK([ovs-appctl bond/show bond0 | grep 'next rebalance:'], [0], [stdout])\n+  AT_CHECK([cat stdout], [0], [next rebalance: $1 ms\n+])])\n+\n+\n+TEST_NEXT_REBALANCE_EQ([60000])\n+AT_CHECK([ovs-appctl time/warp 50000], [0], [ignore])\n+TEST_NEXT_REBALANCE_EQ([10000])\n+\n+# Decreasing the rebalance interval to something lower than the\n+# already-consumed interval should make the next rebalance value negative,\n+# i.e: balance will happen ASAP.\n+AT_CHECK([ovs-vsctl set Port bond0 other-config:bond-rebalance-interval=10000])\n+TEST_NEXT_REBALANCE_EQ([-40000])\n+AT_CHECK([ovs-appctl time/warp 1], [0], [ignore])\n+TEST_NEXT_REBALANCE_EQ([10000])\n+\n+AT_CHECK([ovs-appctl time/warp 5000], [0], [ignore])\n+TEST_NEXT_REBALANCE_EQ([5000])\n+\n+# Increasing the rebalance interval should offset the already consumed\n+# interval.\n+AT_CHECK([ovs-vsctl set Port bond0 other-config:bond-rebalance-interval=60000])\n+TEST_NEXT_REBALANCE_EQ([55000])\n+OVS_VSWITCHD_STOP\n+AT_CLEANUP\n+\n AT_SETUP([ofproto-dpif megaflow - resubmit port action])\n OVS_VSWITCHD_START\n AT_CHECK([ovs-appctl vlog/set dpif:dbg dpif_netdev:dbg])\n",
    "prefixes": [
        "ovs-dev",
        "v3"
    ]
}