get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 825818,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/825818/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20171014114714.3694-4-natale.patriciello@gmail.com/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/7/?format=api",
        "name": "Linux network development",
        "link_name": "netdev",
        "list_id": "netdev.vger.kernel.org",
        "list_email": "netdev@vger.kernel.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20171014114714.3694-4-natale.patriciello@gmail.com>",
    "list_archive_url": null,
    "date": "2017-10-14T11:47:12",
    "name": "[RFC,v2,3/5] tcp: added get_segs_per_round",
    "commit_ref": null,
    "pull_url": null,
    "state": "rfc",
    "archived": true,
    "hash": "6545bb51144ae33f9edfdeb54c2c9f621ae5feae",
    "submitter": {
        "id": 72063,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/72063/?format=api",
        "name": "Natale Patriciello",
        "email": "natale.patriciello@gmail.com"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/1.2/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/20171014114714.3694-4-natale.patriciello@gmail.com/mbox/",
    "series": [
        {
            "id": 8182,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/8182/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=8182",
            "date": "2017-10-14T11:47:09",
            "name": "TCP Wave",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/8182/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/825818/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/825818/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"THm70yrV\"; dkim-atps=neutral"
        ],
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yDjZC5kFTz9sNx\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 14 Oct 2017 22:50:11 +1100 (AEDT)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753560AbdJNLuK (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 14 Oct 2017 07:50:10 -0400",
            "from mail-wr0-f196.google.com ([209.85.128.196]:38289 \"EHLO\n\tmail-wr0-f196.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753178AbdJNLtv (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sat, 14 Oct 2017 07:49:51 -0400",
            "by mail-wr0-f196.google.com with SMTP id v91so1264534wrc.5\n\tfor <netdev@vger.kernel.org>; Sat, 14 Oct 2017 04:49:50 -0700 (PDT)",
            "from localhost.localdomain (62.57.152.197.dyn.user.ono.com.\n\t[62.57.152.197])\n\tby smtp.gmail.com with ESMTPSA id 4sm4560337wmm.1.2017.10.14.04.49.49\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 14 Oct 2017 04:49:49 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=fmP5OYCSwoD0qGeXJR9IqgmqYbohp73or1wfF5Cxqm8=;\n\tb=THm70yrVrH8KaGHSzTyJBKYjNIWnMXBbVHgiXZzS0D/lYgY6xd8HlF9XGU4X82R42z\n\tNpa+PzP/DHr+19lwGlfv5GuVpX2JUlhpX81MkxHcv02N4s1vESpCFNW33UAIsxMfmVhH\n\tnZZDkxSDPlvQS3GUkYuuA8MdihiouIanycatBrS5Srg9J7x0vYjoTGbmbGiCAnSGWilW\n\tYWMoACmifZ4TvehWJziI5O4Aemvn1FkrY6QqUDi1kKRN4l+dKmfz3mldKQ4unSwTPIR/\n\tcAGNuXsO+kS34tafsVLcQOWLPDBfgfXqY+0cRwZGRKe7BViOxMPz6Vu6DlcStlxv/xFB\n\tfV9g==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=fmP5OYCSwoD0qGeXJR9IqgmqYbohp73or1wfF5Cxqm8=;\n\tb=XT8YUpgUhGdcLkkL1A7ZGkdZsXQRF9vu5ADberqWhrzBTJiptSD7z6aJiMpB7+wh9/\n\tgmxcvy4PnPdfAn5hgUpAa1M5TVwIyVth9OBfjZMQpbPQmX6zJnRsTYyx9Fu8g3ucmIKo\n\t1jNb4OKPRWopiRhLcVKFCnjLFg7UbVDILuUODA3N14DKnLGSQw+z2VP8uVW5v4DgFovC\n\tIyHQTrAjJWaaZVM0yH0w16v7214FqpqC3nlb+SS70mEbwN0m8NccpyFvkXqKqg/X9qD4\n\tX/nqQL/VYK6cP3cU6nCI9wYmiYu3xNi4vFWdwPZK3diryz5ovFPvQvGbFUoJVIPk0Az4\n\t2o2g==",
        "X-Gm-Message-State": "AMCzsaUT9F22U2GrgdEv8jxZ6N6z/emOOoLmTBztI5wSVL7J1z1ZGcxH\n\tsVWhQF/60nk43gERbi+9z5k=",
        "X-Google-Smtp-Source": "AOwi7QDRmWQIfV2AN3pTln68EG0geXFoUCzJgNzWnGSHBjS0n4waRKOv+7zQTb7TX9BxRpi5b0DZbw==",
        "X-Received": "by 10.223.197.69 with SMTP id s5mr4069925wrf.120.1507981790341; \n\tSat, 14 Oct 2017 04:49:50 -0700 (PDT)",
        "From": "Natale Patriciello <natale.patriciello@gmail.com>",
        "To": "\"David S . Miller\" <davem@davemloft.net>,\n\tEric Dumazet <eric.dumazet@gmail.com>",
        "Cc": "netdev <netdev@vger.kernel.org>, Ahmed Said <ahmed.said@uniroma2.it>,\n\tNatale Patriciello <natale.patriciello@gmail.com>,\n\tFrancesco Zampognaro <zampognaro@ing.uniroma2.it>,\n\tCesare Roseti <roseti@ing.uniroma2.it>",
        "Subject": "[RFC PATCH v2 3/5] tcp: added get_segs_per_round",
        "Date": "Sat, 14 Oct 2017 13:47:12 +0200",
        "Message-Id": "<20171014114714.3694-4-natale.patriciello@gmail.com>",
        "X-Mailer": "git-send-email 2.14.2",
        "In-Reply-To": "<20171014114714.3694-1-natale.patriciello@gmail.com>",
        "References": "<20171014114714.3694-1-natale.patriciello@gmail.com>",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "Usually, the pacing time is provided per-segment. In some occasion, this\ntime refers to the time between a group of segments. With this commit, add\nthe possibility for the congestion control module to tell the TCP socket\nhow many segments can be sent out before pausing and setting a pacing\ntimer.\n\nSigned-off-by: Natale Patriciello <natale.patriciello@gmail.com>\n---\n include/net/tcp.h     |  2 ++\n net/ipv4/tcp_output.c | 13 +++++++++----\n 2 files changed, 11 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/include/net/tcp.h b/include/net/tcp.h\nindex e817f0669d0e..3561eca5a61f 100644\n--- a/include/net/tcp.h\n+++ b/include/net/tcp.h\n@@ -1019,6 +1019,8 @@ struct tcp_congestion_ops {\n \tu64 (*get_pacing_time)(struct sock *sk);\n \t/* the pacing timer is expired (optional) */\n \tvoid (*pacing_timer_expired)(struct sock *sk);\n+\t/* get the # segs to send out when the timer expires (optional) */\n+\tu32 (*get_segs_per_round)(struct sock *sk);\n \n \tchar \t\tname[TCP_CA_NAME_MAX];\n \tstruct module \t*owner;\ndiff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c\nindex 25b4cf0802f2..e37941e4328b 100644\n--- a/net/ipv4/tcp_output.c\n+++ b/net/ipv4/tcp_output.c\n@@ -2249,6 +2249,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,\n \tint result;\n \tbool is_cwnd_limited = false, is_rwnd_limited = false;\n \tu32 max_segs;\n+\tu32 pacing_allowed_segs = 0;\n \n \tsent_pkts = 0;\n \n@@ -2265,14 +2266,18 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,\n \tmax_segs = tcp_tso_segs(sk, mss_now);\n \ttcp_mstamp_refresh(tp);\n \n-\tif (!tcp_pacing_timer_check(sk) &&\n-\t    ca_ops && ca_ops->pacing_timer_expired)\n-\t\tca_ops->pacing_timer_expired(sk);\n+\tif (!tcp_pacing_timer_check(sk)) {\n+\t\tpacing_allowed_segs = 1;\n+\t\tif (ca_ops && ca_ops->pacing_timer_expired)\n+\t\t\tca_ops->pacing_timer_expired(sk);\n+\t\tif (ca_ops && ca_ops->get_segs_per_round)\n+\t\t\tpacing_allowed_segs = ca_ops->get_segs_per_round(sk);\n+\t}\n \n \twhile ((skb = tcp_send_head(sk))) {\n \t\tunsigned int limit;\n \n-\t\tif (tcp_pacing_check(sk))\n+\t\tif (sent_pkts >= pacing_allowed_segs)\n \t\t\tbreak;\n \n \t\ttso_segs = tcp_init_tso_segs(skb, mss_now);\n",
    "prefixes": [
        "RFC",
        "v2",
        "3/5"
    ]
}