get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 828,
    "url": "http://patchwork.ozlabs.org/api/patches/828/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/1222068117-13401-5-git-send-email-gerrit@erg.abdn.ac.uk/",
    "project": {
        "id": 7,
        "url": "http://patchwork.ozlabs.org/api/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": "<1222068117-13401-5-git-send-email-gerrit@erg.abdn.ac.uk>",
    "list_archive_url": null,
    "date": "2008-09-22T07:21:56",
    "name": "[4/5] dccp: Per-socket initialisation of feature negotiation",
    "commit_ref": null,
    "pull_url": null,
    "state": "changes-requested",
    "archived": true,
    "hash": "113d08e52bb7569a723a59cab19de99a1f6e9440",
    "submitter": {
        "id": 386,
        "url": "http://patchwork.ozlabs.org/api/people/386/?format=api",
        "name": "Gerrit Renker",
        "email": "gerrit@erg.abdn.ac.uk"
    },
    "delegate": {
        "id": 34,
        "url": "http://patchwork.ozlabs.org/api/users/34/?format=api",
        "username": "davem",
        "first_name": "David",
        "last_name": "Miller",
        "email": "davem@davemloft.net"
    },
    "mbox": "http://patchwork.ozlabs.org/project/netdev/patch/1222068117-13401-5-git-send-email-gerrit@erg.abdn.ac.uk/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/828/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/828/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<netdev-owner@vger.kernel.org>",
        "X-Original-To": "patchwork-incoming@ozlabs.org",
        "Delivered-To": "patchwork-incoming@ozlabs.org",
        "Received": [
            "from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id DC5B5DDE28\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 22 Sep 2008 17:22:35 +1000 (EST)",
            "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1751816AbYIVHW0 (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 22 Sep 2008 03:22:26 -0400",
            "(majordomo@vger.kernel.org) by vger.kernel.org id S1751791AbYIVHWZ\n\t(ORCPT <rfc822; netdev-outgoing>); Mon, 22 Sep 2008 03:22:25 -0400",
            "from dee.erg.abdn.ac.uk ([139.133.204.82]:40415 \"EHLO\n\terg.abdn.ac.uk\"\n\trhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP\n\tid S1751753AbYIVHWV (ORCPT <rfc822;netdev@vger.kernel.org>);\n\tMon, 22 Sep 2008 03:22:21 -0400",
            "from laptev.erg.abdn.ac.uk (Debian-exim@ra-gerrit.erg.abdn.ac.uk\n\t[139.133.204.38])\n\tby erg.abdn.ac.uk (8.13.4/8.13.4) with ESMTP id m8M7Lvf0000579\n\t(version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT);\n\tMon, 22 Sep 2008 08:21:58 +0100 (BST)",
            "from root by laptev.erg.abdn.ac.uk with local (Exim 4.69)\n\t(envelope-from <root@laptev.erg.abdn.ac.uk>)\n\tid 1Khfk5-0003Un-4w; Mon, 22 Sep 2008 09:21:57 +0200"
        ],
        "From": "Gerrit Renker <gerrit@erg.abdn.ac.uk>",
        "To": "davem@davemloft.net",
        "Cc": "dccp@vger.kernel.org, netdev@vger.kernel.org,\n\tGerrit Renker <gerrit@erg.abdn.ac.uk>",
        "Subject": "[PATCH 4/5] dccp: Per-socket initialisation of feature negotiation",
        "Date": "Mon, 22 Sep 2008 09:21:56 +0200",
        "Message-Id": "<1222068117-13401-5-git-send-email-gerrit@erg.abdn.ac.uk>",
        "X-Mailer": "git-send-email 1.6.0.rc2",
        "In-Reply-To": "<1222068117-13401-4-git-send-email-gerrit@erg.abdn.ac.uk>",
        "References": "<20080921.235853.223987556.davem@davemloft.net>\n\t<1222068117-13401-1-git-send-email-gerrit@erg.abdn.ac.uk>\n\t<1222068117-13401-2-git-send-email-gerrit@erg.abdn.ac.uk>\n\t<1222068117-13401-3-git-send-email-gerrit@erg.abdn.ac.uk>\n\t<1222068117-13401-4-git-send-email-gerrit@erg.abdn.ac.uk>",
        "X-ERG-MailScanner": "Found to be clean",
        "X-ERG-MailScanner-From": "root@erg.abdn.ac.uk",
        "X-Spam-Status": "No",
        "Sender": "netdev-owner@vger.kernel.org",
        "Precedence": "bulk",
        "List-ID": "<netdev.vger.kernel.org>",
        "X-Mailing-List": "netdev@vger.kernel.org"
    },
    "content": "This provides feature-negotiation initialisation for both DCCP sockets and\nDCCP request_sockets, to support feature negotiation during connection setup.\n\nIt also resolves a FIXME regarding the congestion control initialisation.\n\nThanks to Wei Yongjun for help with the IPv6 side of this patch.\n\nSigned-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>\nAcked-by: Ian McDonald <ian.mcdonald@jandi.co.nz>\n---\n include/linux/dccp.h |    4 ++++\n net/dccp/dccp.h      |    3 ++-\n net/dccp/feat.c      |   19 +++++++++++++++++++\n net/dccp/feat.h      |    1 +\n net/dccp/input.c     |    2 --\n net/dccp/ipv4.c      |    3 ++-\n net/dccp/ipv6.c      |    3 ++-\n net/dccp/minisocks.c |    7 ++++++-\n net/dccp/proto.c     |    1 +\n 9 files changed, 37 insertions(+), 6 deletions(-)\n\n--\nTo unsubscribe from this list: send the line \"unsubscribe netdev\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html",
    "diff": "--- a/include/linux/dccp.h\n+++ b/include/linux/dccp.h\n@@ -412,6 +412,7 @@ extern void dccp_minisock_init(struct dccp_minisock *dmsk);\n  * @dreq_iss: initial sequence number sent on the Response (RFC 4340, 7.1)\n  * @dreq_isr: initial sequence number received on the Request\n  * @dreq_service: service code present on the Request (there is just one)\n+ * @dreq_featneg: feature negotiation options for this connection\n  * The following two fields are analogous to the ones in dccp_sock:\n  * @dreq_timestamp_echo: last received timestamp to echo (13.1)\n  * @dreq_timestamp_echo: the time of receiving the last @dreq_timestamp_echo\n@@ -421,6 +422,7 @@ struct dccp_request_sock {\n \t__u64\t\t\t dreq_iss;\n \t__u64\t\t\t dreq_isr;\n \t__be32\t\t\t dreq_service;\n+\tstruct list_head\t dreq_featneg;\n \t__u32\t\t\t dreq_timestamp_echo;\n \t__u32\t\t\t dreq_timestamp_time;\n };\n@@ -498,6 +500,7 @@ struct dccp_ackvec;\n  * @dccps_mss_cache - current value of MSS (path MTU minus header sizes)\n  * @dccps_rate_last - timestamp for rate-limiting DCCP-Sync (RFC 4340, 7.5.4)\n  * @dccps_minisock - associated minisock (accessed via dccp_msk)\n+ * @dccps_featneg - tracks feature-negotiation state (mostly during handshake)\n  * @dccps_hc_rx_ackvec - rx half connection ack vector\n  * @dccps_hc_rx_ccid - CCID used for the receiver (or receiving half-connection)\n  * @dccps_hc_tx_ccid - CCID used for the sender (or sending half-connection)\n@@ -535,6 +538,7 @@ struct dccp_sock {\n \t__u64\t\t\t\tdccps_ndp_count:48;\n \tunsigned long\t\t\tdccps_rate_last;\n \tstruct dccp_minisock\t\tdccps_minisock;\n+\tstruct list_head\t\tdccps_featneg;\n \tstruct dccp_ackvec\t\t*dccps_hc_rx_ackvec;\n \tstruct ccid\t\t\t*dccps_hc_rx_ccid;\n \tstruct ccid\t\t\t*dccps_hc_tx_ccid;\n--- a/net/dccp/dccp.h\n+++ b/net/dccp/dccp.h\n@@ -252,7 +252,8 @@ extern const char *dccp_state_name(const int state);\n extern void dccp_set_state(struct sock *sk, const int state);\n extern void dccp_done(struct sock *sk);\n \n-extern void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb);\n+extern int  dccp_reqsk_init(struct request_sock *rq, struct dccp_sock const *dp,\n+\t\t\t    struct sk_buff const *skb);\n \n extern int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb);\n \n--- a/net/dccp/feat.c\n+++ b/net/dccp/feat.c\n@@ -279,6 +279,25 @@ void dccp_feat_list_purge(struct list_head *fn_list)\n }\n EXPORT_SYMBOL_GPL(dccp_feat_list_purge);\n \n+/* generate @to as full clone of @from - @to must not contain any nodes */\n+int dccp_feat_clone_list(struct list_head const *from, struct list_head *to)\n+{\n+\tstruct dccp_feat_entry *entry, *new;\n+\n+\tINIT_LIST_HEAD(to);\n+\tlist_for_each_entry(entry, from, node) {\n+\t\tnew = dccp_feat_clone_entry(entry);\n+\t\tif (new == NULL)\n+\t\t\tgoto cloning_failed;\n+\t\tlist_add_tail(&new->node, to);\n+\t}\n+\treturn 0;\n+\n+cloning_failed:\n+\tdccp_feat_list_purge(to);\n+\treturn -ENOMEM;\n+}\n+\n int dccp_feat_change(struct dccp_minisock *dmsk, u8 type, u8 feature,\n \t\t     u8 *val, u8 len, gfp_t gfp)\n {\n--- a/net/dccp/feat.h\n+++ b/net/dccp/feat.h\n@@ -95,6 +95,7 @@ extern int  dccp_feat_confirm_recv(struct sock *sk, u8 type, u8 feature,\n \t\t\t\t   u8 *val, u8 len);\n extern void dccp_feat_clean(struct dccp_minisock *dmsk);\n extern int  dccp_feat_clone(struct sock *oldsk, struct sock *newsk);\n+extern int  dccp_feat_clone_list(struct list_head const *, struct list_head *);\n extern int  dccp_feat_init(struct dccp_minisock *dmsk);\n \n #endif /* _DCCP_FEAT_H */\n--- a/net/dccp/input.c\n+++ b/net/dccp/input.c\n@@ -590,8 +590,6 @@ int dccp_rcv_state_process(struct sock *sk, struct sk_buff *skb,\n \t\t\tif (inet_csk(sk)->icsk_af_ops->conn_request(sk,\n \t\t\t\t\t\t\t\t    skb) < 0)\n \t\t\t\treturn 1;\n-\n-\t\t\t/* FIXME: do congestion control initialization */\n \t\t\tgoto discard;\n \t\t}\n \t\tif (dh->dccph_type == DCCP_PKT_RESET)\n--- a/net/dccp/ipv4.c\n+++ b/net/dccp/ipv4.c\n@@ -595,7 +595,8 @@ int dccp_v4_conn_request(struct sock *sk, struct sk_buff *skb)\n \tif (req == NULL)\n \t\tgoto drop;\n \n-\tdccp_reqsk_init(req, skb);\n+\tif (dccp_reqsk_init(req, dccp_sk(sk), skb))\n+\t\tgoto drop_and_free;\n \n \tdreq = dccp_rsk(req);\n \tif (dccp_parse_options(sk, dreq, skb))\n--- a/net/dccp/ipv6.c\n+++ b/net/dccp/ipv6.c\n@@ -424,7 +424,8 @@ static int dccp_v6_conn_request(struct sock *sk, struct sk_buff *skb)\n \tif (req == NULL)\n \t\tgoto drop;\n \n-\tdccp_reqsk_init(req, skb);\n+\tif (dccp_reqsk_init(req, dccp_sk(sk), skb))\n+\t\tgoto drop_and_free;\n \n \tdreq = dccp_rsk(req);\n \tif (dccp_parse_options(sk, dreq, skb))\n--- a/net/dccp/minisocks.c\n+++ b/net/dccp/minisocks.c\n@@ -125,6 +125,7 @@ struct sock *dccp_create_openreq_child(struct sock *sk,\n \t\tnewdp->dccps_timestamp_time = dreq->dreq_timestamp_time;\n \t\tnewicsk->icsk_rto\t    = DCCP_TIMEOUT_INIT;\n \n+\t\tINIT_LIST_HEAD(&newdp->dccps_featneg);\n \t\tif (dccp_feat_clone(sk, newsk))\n \t\t\tgoto out_free;\n \n@@ -304,7 +305,8 @@ void dccp_reqsk_send_ack(struct sock *sk, struct sk_buff *skb,\n \n EXPORT_SYMBOL_GPL(dccp_reqsk_send_ack);\n \n-void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb)\n+int dccp_reqsk_init(struct request_sock *req,\n+\t\t    struct dccp_sock const *dp, struct sk_buff const *skb)\n {\n \tstruct dccp_request_sock *dreq = dccp_rsk(req);\n \n@@ -312,6 +314,9 @@ void dccp_reqsk_init(struct request_sock *req, struct sk_buff *skb)\n \tinet_rsk(req)->acked\t  = 0;\n \treq->rcv_wnd\t\t  = sysctl_dccp_feat_sequence_window;\n \tdreq->dreq_timestamp_echo = 0;\n+\n+\t/* inherit feature negotiation options from listening socket */\n+\treturn dccp_feat_clone_list(&dp->dccps_featneg, &dreq->dreq_featneg);\n }\n \n EXPORT_SYMBOL_GPL(dccp_reqsk_init);\n--- a/net/dccp/proto.c\n+++ b/net/dccp/proto.c\n@@ -193,6 +193,7 @@ int dccp_init_sock(struct sock *sk, const __u8 ctl_sock_initialized)\n \n \tdccp_init_xmit_timers(sk);\n \n+\tINIT_LIST_HEAD(&dp->dccps_featneg);\n \t/*\n \t * FIXME: We're hardcoding the CCID, and doing this at this point makes\n \t * the listening (master) sock get CCID control blocks, which is not\n",
    "prefixes": [
        "4/5"
    ]
}