Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/811344/?format=api
{ "id": 811344, "url": "http://patchwork.ozlabs.org/api/patches/811344/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/patch/20170908070142.4440-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": "<20170908070142.4440-4-daniel.axtens@canonical.com>", "list_archive_url": null, "date": "2017-09-08T07:01:38", "name": "[SRU,Xenial,3/7] sctp: add dst_pending_confirm flag", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "2de90d2c78f17be06c7697899dd2dfc36ae32935", "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/20170908070142.4440-4-daniel.axtens@canonical.com/mbox/", "series": [ { "id": 2112, "url": "http://patchwork.ozlabs.org/api/series/2112/?format=api", "web_url": "http://patchwork.ozlabs.org/project/ubuntu-kernel/list/?series=2112", "date": "2017-09-08T07:01:35", "name": "Fixes for LP#1715812", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/2112/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/811344/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/811344/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 3xpStL4vNZz9sQl;\n\tFri, 8 Sep 2017 17:02:02 +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 1dqDId-0001FZ-R9; Fri, 08 Sep 2017 07:01:59 +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 1dqDIb-0001Dy-PY\n\tfor kernel-team@lists.canonical.com; Fri, 08 Sep 2017 07:01:57 +0000", "from mail-pf0-f200.google.com ([209.85.192.200])\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 1dqDIb-0003DS-9E\n\tfor kernel-team@lists.canonical.com; Fri, 08 Sep 2017 07:01:57 +0000", "by mail-pf0-f200.google.com with SMTP id y29so2775531pff.6\n\tfor <kernel-team@lists.canonical.com>;\n\tFri, 08 Sep 2017 00:01:57 -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\th1sm2255518pfg.153.2017.09.08.00.01.53\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:01:55 -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=S7TkYImR3/jRK1w6n/9MumM+9mN95TT0BBPc0Z6trJM=;\n\tb=kZF7LsFx44dF6CSAiJW/tReJzTla9qXUinLbM1cwC9OnHCEvjxf+VNlQNlRc4kZjM0\n\tCcaydr9MS+n+dl+m1G+jEwVfDkTciXLtmZ4tvDrD36ZC/8B2V69K3hfTICCDy2ft7FpS\n\tEt/kalq2VJSOUPzEDKENKZGJmh33tXQPUcOtSQn9B1qW0booijm2RcZCRXTHT+4DtVX0\n\tNKKxToHORLL8ruDCLfkWFLsd26lWeRX7wE1yzurLAeYzaWTJUZuoYDY+KLPp0k2Eq7+C\n\tW/K25G1lOr/prSdCvUaum8MfcTwYLm+btDYqGdaKpwfvcYL5Dqac04+A9B2j/wzhkJgT\n\tbM0w==", "X-Gm-Message-State": "AHPjjUjIG28rl6Ju1yIHzi3xdeTZu1OVC6US6ppuKMcyiPGL+o0Br741\n\tD1AgToH+Nt/MAJzljWpvJt7Rf96tYtpp74WBIzPQ3QNIMa+3fmPOLS+6i4RXU49y4Q+m9Rih4x6\n\tIRququpoNujmDPLYMaCOcMoXffAFyd3u6FLr2RnQ=", "X-Received": [ "by 10.84.141.168 with SMTP id 37mr2388277plv.140.1504854115830; \n\tFri, 08 Sep 2017 00:01:55 -0700 (PDT)", "by 10.84.141.168 with SMTP id 37mr2388262plv.140.1504854115611; \n\tFri, 08 Sep 2017 00:01:55 -0700 (PDT)" ], "X-Google-Smtp-Source": "ADKCNb532TZ97hbUm9hVAcyPaYsAKjr9zgsFtZnLFWytxMTB3f9aVdUO5TRFaPv+krlyqskxqgvoFQ==", "From": "Daniel Axtens <daniel.axtens@canonical.com>", "To": "kernel-team@lists.canonical.com", "Subject": "[SRU][Xenial][PATCH 3/7] sctp: add dst_pending_confirm flag", "Date": "Fri, 8 Sep 2017 17:01:38 +1000", "Message-Id": "<20170908070142.4440-4-daniel.axtens@canonical.com>", "X-Mailer": "git-send-email 2.11.0", "In-Reply-To": "<20170908070142.4440-1-daniel.axtens@canonical.com>", "References": "<20170908070142.4440-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(backported 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 ce13cf20f625..9e61ca2bd40e 100644\n--- a/include/net/sctp/sctp.h\n+++ b/include/net/sctp/sctp.h\n@@ -592,10 +592,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 eea9bdeecba2..422785b7a255 100644\n--- a/include/net/sctp/structs.h\n+++ b/include/net/sctp/structs.h\n@@ -830,6 +830,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@@ -966,6 +968,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 559afd0ee7de..7a0e32607c75 100644\n--- a/net/sctp/associola.c\n+++ b/net/sctp/associola.c\n@@ -810,8 +810,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 9d610eddd19e..5d06aaa270ff 100644\n--- a/net/sctp/output.c\n+++ b/net/sctp/output.c\n@@ -380,6 +380,7 @@ int sctp_packet_transmit(struct sctp_packet *packet)\n {\n \tstruct sctp_transport *tp = packet->transport;\n \tstruct sctp_association *asoc = tp->asoc;\n+\tint confirm;\n \tstruct sctphdr *sh;\n \tstruct sk_buff *nskb;\n \tstruct sctp_chunk *chunk, *tmp;\n@@ -592,7 +593,14 @@ int sctp_packet_transmit(struct sctp_packet *packet)\n \tpr_debug(\"***sctp_transmit_packet*** skb->len:%d\\n\", nskb->len);\n \n \tnskb->ignore_df = packet->ipfragok;\n-\ttp->af_specific->sctp_xmit(nskb, tp);\n+\tconfirm = tp->dst_pending_confirm;\n+\tif (confirm)\n+\t\tskb_set_dst_pending_confirm(nskb, 1);\n+\t/* neighbour should be confirmed on successful transmission or\n+\t * positive error\n+\t */\n+\tif (tp->af_specific->sctp_xmit(nskb, tp) >= 0 && confirm)\n+\t\ttp->dst_pending_confirm = 0;\n \n out:\n \tsctp_packet_reset(packet);\ndiff --git a/net/sctp/outqueue.c b/net/sctp/outqueue.c\nindex c0380cfb16ae..250159d28570 100644\n--- a/net/sctp/outqueue.c\n+++ b/net/sctp/outqueue.c\n@@ -1563,7 +1563,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 5d6a03fad378..1d79c1e48c5e 100644\n--- a/net/sctp/sm_make_chunk.c\n+++ b/net/sctp/sm_make_chunk.c\n@@ -3308,8 +3308,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@@ -3323,8 +3322,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 6098d4c42fa9..388307b5e139 100644\n--- a/net/sctp/sm_sideeffect.c\n+++ b/net/sctp/sm_sideeffect.c\n@@ -731,7 +731,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 3ebf3b652d60..88a67d2401a0 100644\n--- a/net/sctp/socket.c\n+++ b/net/sctp/socket.c\n@@ -590,7 +590,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@@ -841,7 +841,7 @@ skip_mkasconf:\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 aab9e3f29755..238dd57911fe 100644\n--- a/net/sctp/transport.c\n+++ b/net/sctp/transport.c\n@@ -222,7 +222,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@@ -654,3 +654,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", "Xenial", "3/7" ] }