Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811336/?format=api
{ "id": 811336, "url": "http://patchwork.ozlabs.org/api/patches/811336/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20170908070018.4141-4-daniel.axtens@canonical.com/", "project": { "id": 15, "url": "http://patchwork.ozlabs.org/api/projects/15/?format=api", "name": "Ubuntu Kernel", "link_name": "ubuntu-kernel", "list_id": "kernel-team.lists.ubuntu.com", "list_email": "kernel-team@lists.ubuntu.com", "web_url": null, "scm_url": null, "webscm_url": null, "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20170908070018.4141-4-daniel.axtens@canonical.com>", "list_archive_url": null, "date": "2017-09-08T07:00:14", "name": "[SRU,Zesty,3/7] sctp: add dst_pending_confirm flag", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "ba1a1aa0e3e5ef34a8554d693e88abc13a13fb3e", "submitter": { "id": 71548, "url": "http://patchwork.ozlabs.org/api/people/71548/?format=api", "name": "Daniel Axtens", "email": "daniel.axtens@canonical.com" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20170908070018.4141-4-daniel.axtens@canonical.com/mbox/", "series": [ { "id": 2111, "url": "http://patchwork.ozlabs.org/api/series/2111/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=2111", "date": "2017-09-08T07:00:11", "name": "Fixes for LP#1715812", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2111/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811336/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811336/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<kernel-team-bounces@lists.ubuntu.com>", "X-Original-To": "incoming@patchwork.ozlabs.org", "Delivered-To": "patchwork-incoming@bilbo.ozlabs.org", "Authentication-Results": "ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com\n\t(client-ip=91.189.94.19; helo=huckleberry.canonical.com;\n\tenvelope-from=kernel-team-bounces@lists.ubuntu.com;\n\treceiver=<UNKNOWN>)", "Received": [ "from huckleberry.canonical.com (huckleberry.canonical.com\n\t[91.189.94.19])\n\tby ozlabs.org (Postfix) with ESMTP id 3xpSrm6Zb8z9t2M;\n\tFri, 8 Sep 2017 17:00:40 +1000 (AEST)", "from localhost ([127.0.0.1] helo=huckleberry.canonical.com)\n\tby huckleberry.canonical.com with esmtp (Exim 4.86_2)\n\t(envelope-from <kernel-team-bounces@lists.ubuntu.com>)\n\tid 1dqDHK-0000nc-1V; Fri, 08 Sep 2017 07:00:38 +0000", "from youngberry.canonical.com ([91.189.89.112])\n\tby huckleberry.canonical.com with esmtps\n\t(TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128)\n\t(Exim 4.86_2) (envelope-from <daniel.axtens@canonical.com>)\n\tid 1dqDHI-0000mA-A2\n\tfor kernel-team@lists.canonical.com; Fri, 08 Sep 2017 07:00:36 +0000", "from mail-pg0-f70.google.com ([74.125.83.70])\n\tby youngberry.canonical.com with esmtps\n\t(TLS1.0:RSA_AES_128_CBC_SHA1:16)\n\t(Exim 4.76) (envelope-from <daniel.axtens@canonical.com>)\n\tid 1dqDHH-00039Z-UB\n\tfor kernel-team@lists.canonical.com; Fri, 08 Sep 2017 07:00:36 +0000", "by mail-pg0-f70.google.com with SMTP id 188so3653804pgb.3\n\tfor <kernel-team@lists.canonical.com>;\n\tFri, 08 Sep 2017 00:00:35 -0700 (PDT)", "from localhost.localdomain (124-171-202-56.dyn.iinet.net.au.\n\t[124.171.202.56]) by smtp.gmail.com with ESMTPSA id\n\t125sm2138129pff.5.2017.09.08.00.00.32\n\tfor <kernel-team@lists.canonical.com>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 00:00:33 -0700 (PDT)" ], "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:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=2VLXzo8ZwYtDHgvTOcwrdW4K32TsYVZVOSSCDSTFO1o=;\n\tb=nGpHu+GkFTJKSyA1b4jEEqYfDz8GegPFxEIkF1FQ7r9a1o5pn8Esg43SQqrgqtvgsc\n\tOLJciCZLtableY9aWn7wWhqmS17CrTUnn+EyfIFu3FOBzudR6w+bWGFl8VAWcj1gkxC0\n\tLvlKqdkweVUowjsRveVd4dBjVJIXk5kzHK3HhLE5tym3wpMuClWG7Ii2WYykbkXpRSYG\n\tMQ5j0u2i7cfqE3b3nEUrEJHonQR65yKVhtGrikaPR8lhfLlXi042VKHbmRvKxiMSRU51\n\t7zYNZ7jqiUX0+Xc2Vt7cUiQSsyoyIaKtkUDDA+Y/BmT7FnsK0KWNf2YG3OuFuGOj7cIN\n\t0C5Q==", "X-Gm-Message-State": "AHPjjUinVfj7cztDIy65uRCvkebtpESK9h159U8CCW0dqKsbO65jDj3P\n\tX59UyNgPVSfwLmQ//KKG1cFNGEECVfvsY5mhJuE1B9iqRWlzHeGHTMc+H9HSaCwHR6OY403CS1J\n\tSCXtjSAR73YA04lybtDXB5eFxXoS9Ba95m1H6Kc4=", "X-Received": [ "by 10.84.141.168 with SMTP id 37mr2383301plv.140.1504854034445; \n\tFri, 08 Sep 2017 00:00:34 -0700 (PDT)", "by 10.84.141.168 with SMTP id 37mr2383288plv.140.1504854034177; \n\tFri, 08 Sep 2017 00:00:34 -0700 (PDT)" ], "X-Google-Smtp-Source": "ADKCNb4dNtCSVzIaR7MSQd4uJ374xlj/K3KnBYbYq66AUZzYvpzjB2Dq0QlEpoDlmEAnp8ap+bUlJQ==", "From": "Daniel Axtens <daniel.axtens@canonical.com>", "To": "kernel-team@lists.canonical.com", "Subject": "[SRU][Zesty][PATCH 3/7] sctp: add dst_pending_confirm flag", "Date": "Fri, 8 Sep 2017 17:00:14 +1000", "Message-Id": "<20170908070018.4141-4-daniel.axtens@canonical.com>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20170908070018.4141-1-daniel.axtens@canonical.com>", "References": "<20170908070018.4141-1-daniel.axtens@canonical.com>", "X-BeenThere": "kernel-team@lists.ubuntu.com", "X-Mailman-Version": "2.1.20", "Precedence": "list", "List-Id": "Kernel team discussions <kernel-team.lists.ubuntu.com>", "List-Unsubscribe": "<https://lists.ubuntu.com/mailman/options/kernel-team>,\n\t<mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe>", "List-Archive": "<https://lists.ubuntu.com/archives/kernel-team>", "List-Post": "<mailto:kernel-team@lists.ubuntu.com>", "List-Help": "<mailto:kernel-team-request@lists.ubuntu.com?subject=help>", "List-Subscribe": "<https://lists.ubuntu.com/mailman/listinfo/kernel-team>,\n\t<mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=\"utf-8\"", "Content-Transfer-Encoding": "base64", "Errors-To": "kernel-team-bounces@lists.ubuntu.com", "Sender": "\"kernel-team\" <kernel-team-bounces@lists.ubuntu.com>" }, "content": "From: Julian Anastasov <ja@ssi.bg>\n\nBugLink: https://bugs.launchpad.net/bugs/1715812\n\nAdd new transport flag to allow sockets to confirm neighbour.\nWhen same struct dst_entry can be used for many different\nneighbours we can not use it for pending confirmations.\nThe flag is propagated from transport to every packet.\nIt is reset when cached dst is reset.\n\nReported-by: YueHaibing <yuehaibing@huawei.com>\nFixes: 5110effee8fd (\"net: Do delayed neigh confirmation.\")\nFixes: f2bb4bedf35d (\"ipv4: Cache output routes in fib_info nexthops.\")\nSigned-off-by: Julian Anastasov <ja@ssi.bg>\nAcked-by: Eric Dumazet <edumazet@google.com>\nAcked-by: Neil Horman <nhorman@tuxdriver.com>\nSigned-off-by: David S. Miller <davem@davemloft.net>\n(cherry picked from commit c86a773c78025f5b825bacd7b846f4fa60dc0317)\nSigned-off-by: Daniel Axtens <daniel.axtens@canonical.com>\n---\n include/net/sctp/sctp.h | 6 ++----\n include/net/sctp/structs.h | 4 ++++\n net/sctp/associola.c | 3 +--\n net/sctp/output.c | 10 +++++++++-\n net/sctp/outqueue.c | 2 +-\n net/sctp/sm_make_chunk.c | 6 ++----\n net/sctp/sm_sideeffect.c | 2 +-\n net/sctp/socket.c | 4 ++--\n net/sctp/transport.c | 16 +++++++++++++++-\n 9 files changed, 37 insertions(+), 16 deletions(-)", "diff": "diff --git a/include/net/sctp/sctp.h b/include/net/sctp/sctp.h\nindex d8833a86cd7e..897f6365d98d 100644\n--- a/include/net/sctp/sctp.h\n+++ b/include/net/sctp/sctp.h\n@@ -586,10 +586,8 @@ static inline void sctp_v4_map_v6(union sctp_addr *addr)\n */\n static inline struct dst_entry *sctp_transport_dst_check(struct sctp_transport *t)\n {\n-\tif (t->dst && !dst_check(t->dst, t->dst_cookie)) {\n-\t\tdst_release(t->dst);\n-\t\tt->dst = NULL;\n-\t}\n+\tif (t->dst && !dst_check(t->dst, t->dst_cookie))\n+\t\tsctp_transport_dst_release(t);\n \n \treturn t->dst;\n }\ndiff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h\nindex 92daabdc007d..e842e84816f7 100644\n--- a/include/net/sctp/structs.h\n+++ b/include/net/sctp/structs.h\n@@ -838,6 +838,8 @@ struct sctp_transport {\n \n \t__u32 burst_limited;\t/* Holds old cwnd when max.burst is applied */\n \n+\t__u32 dst_pending_confirm;\t/* need to confirm neighbour */\n+\n \t/* Destination */\n \tstruct dst_entry *dst;\n \t/* Source address. */\n@@ -980,6 +982,8 @@ unsigned long sctp_transport_timeout(struct sctp_transport *);\n void sctp_transport_reset(struct sctp_transport *);\n void sctp_transport_update_pmtu(struct sock *, struct sctp_transport *, u32);\n void sctp_transport_immediate_rtx(struct sctp_transport *);\n+void sctp_transport_dst_release(struct sctp_transport *t);\n+void sctp_transport_dst_confirm(struct sctp_transport *t);\n \n \n /* This is the structure we use to queue packets as they come into\ndiff --git a/net/sctp/associola.c b/net/sctp/associola.c\nindex d3cc30c25c41..56a8c7df0f95 100644\n--- a/net/sctp/associola.c\n+++ b/net/sctp/associola.c\n@@ -820,8 +820,7 @@ void sctp_assoc_control_transport(struct sctp_association *asoc,\n \t\tif (transport->state != SCTP_UNCONFIRMED)\n \t\t\ttransport->state = SCTP_INACTIVE;\n \t\telse {\n-\t\t\tdst_release(transport->dst);\n-\t\t\ttransport->dst = NULL;\n+\t\t\tsctp_transport_dst_release(transport);\n \t\t\tulp_notify = false;\n \t\t}\n \ndiff --git a/net/sctp/output.c b/net/sctp/output.c\nindex f5320a87341e..116488a2b574 100644\n--- a/net/sctp/output.c\n+++ b/net/sctp/output.c\n@@ -550,6 +550,7 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp)\n \tstruct sctp_association *asoc = tp->asoc;\n \tstruct sctp_chunk *chunk, *tmp;\n \tint pkt_count, gso = 0;\n+\tint confirm;\n \tstruct dst_entry *dst;\n \tstruct sk_buff *head;\n \tstruct sctphdr *sh;\n@@ -628,7 +629,14 @@ int sctp_packet_transmit(struct sctp_packet *packet, gfp_t gfp)\n \t\t\tasoc->peer.last_sent_to = tp;\n \t}\n \thead->ignore_df = packet->ipfragok;\n-\ttp->af_specific->sctp_xmit(head, tp);\n+\tconfirm = tp->dst_pending_confirm;\n+\tif (confirm)\n+\t\tskb_set_dst_pending_confirm(head, 1);\n+\t/* neighbour should be confirmed on successful transmission or\n+\t * positive error\n+\t */\n+\tif (tp->af_specific->sctp_xmit(head, tp) >= 0 && confirm)\n+\t\ttp->dst_pending_confirm = 0;\n \n out:\n \tlist_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) {\ndiff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c\nindex 34efaa4ef2f6..e4a940efc4a5 100644\n--- a/net/sctp/outqueue.c\n+++ b/net/sctp/outqueue.c\n@@ -1641,7 +1641,7 @@ static void sctp_check_transmitted(struct sctp_outq *q,\n \n \t\tif (forward_progress) {\n \t\t\tif (transport->dst)\n-\t\t\t\tdst_confirm(transport->dst);\n+\t\t\t\tsctp_transport_dst_confirm(transport);\n \t\t}\n \t}\n \ndiff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c\nindex 9e9690b7afe1..6fb15bf5387d 100644\n--- a/net/sctp/sm_make_chunk.c\n+++ b/net/sctp/sm_make_chunk.c\n@@ -3317,8 +3317,7 @@ static void sctp_asconf_param_success(struct sctp_association *asoc,\n \t\tlocal_bh_enable();\n \t\tlist_for_each_entry(transport, &asoc->peer.transport_addr_list,\n \t\t\t\ttransports) {\n-\t\t\tdst_release(transport->dst);\n-\t\t\ttransport->dst = NULL;\n+\t\t\tsctp_transport_dst_release(transport);\n \t\t}\n \t\tbreak;\n \tcase SCTP_PARAM_DEL_IP:\n@@ -3332,8 +3331,7 @@ static void sctp_asconf_param_success(struct sctp_association *asoc,\n \t\tlocal_bh_enable();\n \t\tlist_for_each_entry(transport, &asoc->peer.transport_addr_list,\n \t\t\t\ttransports) {\n-\t\t\tdst_release(transport->dst);\n-\t\t\ttransport->dst = NULL;\n+\t\t\tsctp_transport_dst_release(transport);\n \t\t}\n \t\tbreak;\n \tdefault:\ndiff --git a/net/sctp/sm_sideeffect.c b/net/sctp/sm_sideeffect.c\nindex c345bf153bed..9255b291ebfd 100644\n--- a/net/sctp/sm_sideeffect.c\n+++ b/net/sctp/sm_sideeffect.c\n@@ -723,7 +723,7 @@ static void sctp_cmd_transport_on(sctp_cmd_seq_t *cmds,\n \t * forward progress.\n \t */\n \tif (t->dst)\n-\t\tdst_confirm(t->dst);\n+\t\tsctp_transport_dst_confirm(t);\n \n \t/* The receiver of the HEARTBEAT ACK should also perform an\n \t * RTT measurement for that destination transport address\ndiff --git a/net/sctp/socket.c b/net/sctp/socket.c\nindex 6932cf34fea8..02de002ed7c5 100644\n--- a/net/sctp/socket.c\n+++ b/net/sctp/socket.c\n@@ -592,7 +592,7 @@ static int sctp_send_asconf_add_ip(struct sock\t\t*sk,\n \t\t\tlist_for_each_entry(trans,\n \t\t\t &asoc->peer.transport_addr_list, transports) {\n \t\t\t\t/* Clear the source and route cache */\n-\t\t\t\tdst_release(trans->dst);\n+\t\t\t\tsctp_transport_dst_release(trans);\n \t\t\t\ttrans->cwnd = min(4*asoc->pathmtu, max_t(__u32,\n \t\t\t\t 2*asoc->pathmtu, 4380));\n \t\t\t\ttrans->ssthresh = asoc->peer.i.a_rwnd;\n@@ -843,7 +843,7 @@ static int sctp_send_asconf_del_ip(struct sock\t\t*sk,\n \t\t */\n \t\tlist_for_each_entry(transport, &asoc->peer.transport_addr_list,\n \t\t\t\t\ttransports) {\n-\t\t\tdst_release(transport->dst);\n+\t\t\tsctp_transport_dst_release(transport);\n \t\t\tsctp_transport_route(transport, NULL,\n \t\t\t\t\t sctp_sk(asoc->base.sk));\n \t\t}\ndiff --git a/net/sctp/transport.c b/net/sctp/transport.c\nindex a1652ab63918..cd52f161ebd1 100644\n--- a/net/sctp/transport.c\n+++ b/net/sctp/transport.c\n@@ -227,7 +227,7 @@ void sctp_transport_pmtu(struct sctp_transport *transport, struct sock *sk)\n {\n \t/* If we don't have a fresh route, look one up */\n \tif (!transport->dst || transport->dst->obsolete) {\n-\t\tdst_release(transport->dst);\n+\t\tsctp_transport_dst_release(transport);\n \t\ttransport->af_specific->get_dst(transport, &transport->saddr,\n \t\t\t\t\t\t&transport->fl, sk);\n \t}\n@@ -659,3 +659,17 @@ void sctp_transport_immediate_rtx(struct sctp_transport *t)\n \t\t\tsctp_transport_hold(t);\n \t}\n }\n+\n+/* Drop dst */\n+void sctp_transport_dst_release(struct sctp_transport *t)\n+{\n+\tdst_release(t->dst);\n+\tt->dst = NULL;\n+\tt->dst_pending_confirm = 0;\n+}\n+\n+/* Schedule neighbour confirm */\n+void sctp_transport_dst_confirm(struct sctp_transport *t)\n+{\n+\tt->dst_pending_confirm = 1;\n+}\n", "prefixes": [ "SRU", "Zesty", "3/7" ] }