get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2196528,
    "url": "http://patchwork.ozlabs.org/api/patches/2196528/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260214151230.18970-5-ja@ssi.bg/",
    "project": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/projects/26/?format=api",
        "name": "Netfilter Development",
        "link_name": "netfilter-devel",
        "list_id": "netfilter-devel.vger.kernel.org",
        "list_email": "netfilter-devel@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20260214151230.18970-5-ja@ssi.bg>",
    "list_archive_url": null,
    "date": "2026-02-14T15:12:28",
    "name": "[nf-next,4/6] ipvs: do not keep dest_dst after dest is removed",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "50a45accdb25586b0844187582a193c3b0ae9f6a",
    "submitter": {
        "id": 2825,
        "url": "http://patchwork.ozlabs.org/api/people/2825/?format=api",
        "name": "Julian Anastasov",
        "email": "ja@ssi.bg"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/netfilter-devel/patch/20260214151230.18970-5-ja@ssi.bg/mbox/",
    "series": [
        {
            "id": 492179,
            "url": "http://patchwork.ozlabs.org/api/series/492179/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netfilter-devel/list/?series=492179",
            "date": "2026-02-14T15:12:24",
            "name": "IPVS changes, part 2 of 4 - optimizations",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492179/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2196528/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2196528/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <netfilter-devel+bounces-10776-incoming=patchwork.ozlabs.org@vger.kernel.org>",
        "X-Original-To": [
            "incoming@patchwork.ozlabs.org",
            "netfilter-devel@vger.kernel.org"
        ],
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (4096-bit key;\n unprotected) header.d=ssi.bg header.i=@ssi.bg header.a=rsa-sha256\n header.s=ssi header.b=Qsj862sU;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.105.105.114; helo=tor.lore.kernel.org;\n envelope-from=netfilter-devel+bounces-10776-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)",
            "smtp.subspace.kernel.org;\n\tdkim=pass (4096-bit key) header.d=ssi.bg header.i=@ssi.bg header.b=\"Qsj862sU\"",
            "smtp.subspace.kernel.org;\n arc=none smtp.client-ip=193.238.174.39",
            "smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=ssi.bg",
            "smtp.subspace.kernel.org;\n spf=pass smtp.mailfrom=ssi.bg"
        ],
        "Received": [
            "from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fCt2Y600fz1xr1\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 15 Feb 2026 02:17:57 +1100 (AEDT)",
            "from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby tor.lore.kernel.org (Postfix) with ESMTP id EA32A301474B\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 14 Feb 2026 15:17:54 +0000 (UTC)",
            "from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 68E3823A562;\n\tSat, 14 Feb 2026 15:17:51 +0000 (UTC)",
            "from mx.ssi.bg (mx.ssi.bg [193.238.174.39])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id B7F3A189F43;\n\tSat, 14 Feb 2026 15:17:49 +0000 (UTC)",
            "from mx.ssi.bg (localhost [127.0.0.1])\n\tby mx.ssi.bg (Potsfix) with ESMTP id 9672A21D6C;\n\tSat, 14 Feb 2026 17:17:47 +0200 (EET)",
            "from box.ssi.bg (box.ssi.bg [193.238.174.46])\n\tby mx.ssi.bg (Potsfix) with ESMTPS;\n\tSat, 14 Feb 2026 17:17:46 +0200 (EET)",
            "from ja.ssi.bg (unknown [213.16.62.126])\n\tby box.ssi.bg (Potsfix) with ESMTPSA id B7A66609BE;\n\tSat, 14 Feb 2026 17:17:45 +0200 (EET)",
            "from ja.home.ssi.bg (localhost.localdomain [127.0.0.1])\n\tby ja.ssi.bg (8.18.1/8.18.1) with ESMTP id 61EFCvWZ019358;\n\tSat, 14 Feb 2026 17:12:57 +0200",
            "(from root@localhost)\n\tby ja.home.ssi.bg (8.18.1/8.18.1/Submit) id 61EFCvXn019357;\n\tSat, 14 Feb 2026 17:12:57 +0200"
        ],
        "ARC-Seal": "i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1771082271; cv=none;\n b=oYB7vR9cuoVhYHa5a29P080J6jH83jLQmWABiLO9Nj1M7LO7F8IzWjskhvIbPLCOIZKSkbRNoaqXwKtPRkrNK4Wx+/AA7eBm+izpZlMcddhCnSa5An7pPN1sTyeL7hwGVXLwcTQaR7w9vIkxMo3oez7IvsiEZ9edG8j6qTcz6xI=",
        "ARC-Message-Signature": "i=1; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1771082271; c=relaxed/simple;\n\tbh=54lS2NmJ84vkDa6yMrYN0idTRRdkpRJq1Ulzqs3tMPo=;\n\th=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:\n\t MIME-Version;\n b=Q3KTBtMOtc+d31IaxLoGlTA/9qmBrXfC8oVwGucXvSRlU4pEE6q3zEDZWAQxTRMHC9dA1Wsa9el4D9ZhaL4CjteTjG/l0UiBMbniTdKV+wp5ePHCqsSUKD+AfKlgTnjF7N+m6zLTivO1N3WbipiXY8VH9+8Pg5zMFtMmsRUPLnM=",
        "ARC-Authentication-Results": "i=1; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=ssi.bg;\n spf=pass smtp.mailfrom=ssi.bg;\n dkim=pass (4096-bit key) header.d=ssi.bg header.i=@ssi.bg header.b=Qsj862sU;\n arc=none smtp.client-ip=193.238.174.39",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=ssi.bg; h=cc:cc\n\t:content-transfer-encoding:date:from:from:in-reply-to:message-id\n\t:mime-version:references:reply-to:subject:subject:to:to; s=ssi;\n\t bh=XtTa0OgSPxuK9J2YweQaHlNrLxPSTRmAn1AQzekMyNc=; b=Qsj862sU8ejo\n\tI/d0kvyV4SborGReBGg8fmUpnvN7RkZyRO1MIUmbiSiPd5Zr45JjGb+lEjAMgS3E\n\te+i8mQUogfcVqhYZFGNfTxNtrLWTotdSc1W6HE9Nfo8KyMjZdo4UoB4LQlAZ3ARE\n\t8PlqyvkE+8Y9p175tctSWT0rbXUObrrZZcFW8yl2w/G/NUaxtOz0/SrqQNPmbknq\n\tGrstDcAr1OVDj0c3rD5PuD49+pq7rryhTyQO35SpPxWLS/fBdmxuyNdNuDaWXGZV\n\tyRmJ6b0XYDH6Wi7LM68GmjqIrvkmYQuzzi4vlJhMPBY5twlBBNrUrCxaRxKJoJPd\n\ti6g+DWhERzFLF5E2QAKQPPQYHapuGnig/k/B75LqdUDbUQK7ENsdPFKjoYk/S1GC\n\tvE7S3lLSLtuYuEN5wkQGzdKsKutmeHgJAQAylspS8rGXSnaP9NYIwKYP9S+Ffuvz\n\t7+kgky/GFyujMwID45rvoDf1Zr+I7yvAbmCHBCIPrwUw1xD8YLT0/vmijGOHxjBo\n\tF1Sh2DQByMQP5eqaoWY1HQp8AoS25onacmCF0BrVyV0sVVlLvfljIgK7aqDchTQZ\n\tuv684pO0wDw9/Ec3sCy12viciybvx/47LXG6HecBp7AA7FTvQzUTyywIH5NgWBAv\n\t9GfTxQ68664prJ045wFmSulQPPZuaUE=",
        "From": "Julian Anastasov <ja@ssi.bg>",
        "To": "Simon Horman <horms@verge.net.au>",
        "Cc": "Pablo Neira Ayuso <pablo@netfilter.org>, lvs-devel@vger.kernel.org,\n        netfilter-devel@vger.kernel.org, Dust Li <dust.li@linux.alibaba.com>,\n        Jiejian Wu <jiejian@linux.alibaba.com>",
        "Subject": "[PATCH nf-next 4/6] ipvs: do not keep dest_dst after dest is removed",
        "Date": "Sat, 14 Feb 2026 17:12:28 +0200",
        "Message-ID": "<20260214151230.18970-5-ja@ssi.bg>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260214151230.18970-1-ja@ssi.bg>",
        "References": "<20260214151230.18970-1-ja@ssi.bg>",
        "Precedence": "bulk",
        "X-Mailing-List": "netfilter-devel@vger.kernel.org",
        "List-Id": "<netfilter-devel.vger.kernel.org>",
        "List-Subscribe": "<mailto:netfilter-devel+subscribe@vger.kernel.org>",
        "List-Unsubscribe": "<mailto:netfilter-devel+unsubscribe@vger.kernel.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit"
    },
    "content": "Before now dest->dest_dst is not released when server is moved into\ndest_trash list after removal. As result, we can keep dst/dev\nreferences for long time without actively using them.\n\nIt is better to avoid walking the dest_trash list when\nip_vs_dst_event() receives dev events. So, make sure we do not\nhold dev references in dest_trash list. As packets can be flying\nwhile server is being removed, check the IP_VS_DEST_F_AVAILABLE\nflag in slow path to ensure we do not save new dev references to\nremoved servers.\n\nSigned-off-by: Julian Anastasov <ja@ssi.bg>\n---\n net/netfilter/ipvs/ip_vs_ctl.c  | 20 ++++++++------------\n net/netfilter/ipvs/ip_vs_xmit.c | 12 ++++++++----\n 2 files changed, 16 insertions(+), 16 deletions(-)",
    "diff": "diff --git a/net/netfilter/ipvs/ip_vs_ctl.c b/net/netfilter/ipvs/ip_vs_ctl.c\nindex 2ef1f99dada6..7c0e2d9b5b98 100644\n--- a/net/netfilter/ipvs/ip_vs_ctl.c\n+++ b/net/netfilter/ipvs/ip_vs_ctl.c\n@@ -809,7 +809,6 @@ static void ip_vs_dest_free(struct ip_vs_dest *dest)\n {\n \tstruct ip_vs_service *svc = rcu_dereference_protected(dest->svc, 1);\n \n-\t__ip_vs_dst_cache_reset(dest);\n \t__ip_vs_svc_put(svc);\n \tcall_rcu(&dest->rcu_head, ip_vs_dest_rcu_free);\n }\n@@ -1012,10 +1011,6 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest,\n \n \tdest->af = udest->af;\n \n-\tspin_lock_bh(&dest->dst_lock);\n-\t__ip_vs_dst_cache_reset(dest);\n-\tspin_unlock_bh(&dest->dst_lock);\n-\n \tif (add) {\n \t\tlist_add_rcu(&dest->n_list, &svc->destinations);\n \t\tsvc->num_dests++;\n@@ -1023,6 +1018,10 @@ __ip_vs_update_dest(struct ip_vs_service *svc, struct ip_vs_dest *dest,\n \t\tif (sched && sched->add_dest)\n \t\t\tsched->add_dest(svc, dest);\n \t} else {\n+\t\tspin_lock_bh(&dest->dst_lock);\n+\t\t__ip_vs_dst_cache_reset(dest);\n+\t\tspin_unlock_bh(&dest->dst_lock);\n+\n \t\tsched = rcu_dereference_protected(svc->scheduler, 1);\n \t\tif (sched && sched->upd_dest)\n \t\t\tsched->upd_dest(svc, dest);\n@@ -1257,6 +1256,10 @@ static void __ip_vs_unlink_dest(struct ip_vs_service *svc,\n {\n \tdest->flags &= ~IP_VS_DEST_F_AVAILABLE;\n \n+\tspin_lock_bh(&dest->dst_lock);\n+\t__ip_vs_dst_cache_reset(dest);\n+\tspin_unlock_bh(&dest->dst_lock);\n+\n \t/*\n \t *  Remove it from the d-linked destination list.\n \t */\n@@ -1747,13 +1750,6 @@ static int ip_vs_dst_event(struct notifier_block *this, unsigned long event,\n \t}\n \trcu_read_unlock();\n \n-\tmutex_lock(&ipvs->service_mutex);\n-\tspin_lock_bh(&ipvs->dest_trash_lock);\n-\tlist_for_each_entry(dest, &ipvs->dest_trash, t_list) {\n-\t\tip_vs_forget_dev(dest, dev);\n-\t}\n-\tspin_unlock_bh(&ipvs->dest_trash_lock);\n-\tmutex_unlock(&ipvs->service_mutex);\n \treturn NOTIFY_DONE;\n }\n \ndiff --git a/net/netfilter/ipvs/ip_vs_xmit.c b/net/netfilter/ipvs/ip_vs_xmit.c\nindex 4389bfe3050d..394b5b5f2ccd 100644\n--- a/net/netfilter/ipvs/ip_vs_xmit.c\n+++ b/net/netfilter/ipvs/ip_vs_xmit.c\n@@ -336,9 +336,11 @@ __ip_vs_get_out_rt(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb,\n \t\t\t\tgoto err_unreach;\n \t\t\t}\n \t\t\t/* It is forbidden to attach dest->dest_dst if\n-\t\t\t * device is going down.\n+\t\t\t * device is going down or if server is removed and\n+\t\t\t * stored in dest_trash.\n \t\t\t */\n-\t\t\tif (!rt_dev_is_down(dst_dev_rcu(&rt->dst)))\n+\t\t\tif (!rt_dev_is_down(dst_dev_rcu(&rt->dst)) &&\n+\t\t\t    dest->flags & IP_VS_DEST_F_AVAILABLE)\n \t\t\t\t__ip_vs_dst_set(dest, dest_dst, &rt->dst, 0);\n \t\t\telse\n \t\t\t\tnoref = 0;\n@@ -513,9 +515,11 @@ __ip_vs_get_out_rt_v6(struct netns_ipvs *ipvs, int skb_af, struct sk_buff *skb,\n \t\t\trt = dst_rt6_info(dst);\n \t\t\tcookie = rt6_get_cookie(rt);\n \t\t\t/* It is forbidden to attach dest->dest_dst if\n-\t\t\t * device is going down.\n+\t\t\t * device is going down or if server is removed and\n+\t\t\t * stored in dest_trash.\n \t\t\t */\n-\t\t\tif (!rt_dev_is_down(dst_dev_rcu(&rt->dst)))\n+\t\t\tif (!rt_dev_is_down(dst_dev_rcu(&rt->dst)) &&\n+\t\t\t    dest->flags & IP_VS_DEST_F_AVAILABLE)\n \t\t\t\t__ip_vs_dst_set(dest, dest_dst, &rt->dst, cookie);\n \t\t\telse\n \t\t\t\tnoref = 0;\n",
    "prefixes": [
        "nf-next",
        "4/6"
    ]
}