Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/807775/?format=api
{ "id": 807775, "url": "http://patchwork.ozlabs.org/api/patches/807775/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/patch/20170830172458.18544-2-fw@strlen.de/", "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": "<20170830172458.18544-2-fw@strlen.de>", "list_archive_url": null, "date": "2017-08-30T17:24:57", "name": "[net-next,1/2] tcp: Revert \"tcp: remove CA_ACK_SLOWPATH\"", "commit_ref": null, "pull_url": null, "state": "accepted", "archived": true, "hash": "16f8c0c49dd6c83180b92110cdba494e93111b5e", "submitter": { "id": 1025, "url": "http://patchwork.ozlabs.org/api/people/1025/?format=api", "name": "Florian Westphal", "email": "fw@strlen.de" }, "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/20170830172458.18544-2-fw@strlen.de/mbox/", "series": [ { "id": 665, "url": "http://patchwork.ozlabs.org/api/series/665/?format=api", "web_url": "http://patchwork.ozlabs.org/project/netdev/list/?series=665", "date": "2017-08-30T17:24:56", "name": "tcp: re-add header prediction", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/665/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/807775/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/807775/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>)", "Received": [ "from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xjC721l1Xz9sN7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tThu, 31 Aug 2017 03:24:46 +1000 (AEST)", "(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752101AbdH3RYp (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tWed, 30 Aug 2017 13:24:45 -0400", "from Chamillionaire.breakpoint.cc ([146.0.238.67]:35760 \"EHLO\n\tChamillionaire.breakpoint.cc\" rhost-flags-OK-OK-OK-OK)\n\tby vger.kernel.org with ESMTP id S1751955AbdH3RYn (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Wed, 30 Aug 2017 13:24:43 -0400", "from fw by Chamillionaire.breakpoint.cc with local (Exim 4.84_2)\n\t(envelope-from <fw@breakpoint.cc>)\n\tid 1dn6gg-0007W9-CJ; Wed, 30 Aug 2017 19:21:58 +0200" ], "From": "Florian Westphal <fw@strlen.de>", "To": "<netdev@vger.kernel.org>", "Cc": "edumazet@google.com, Florian Westphal <fw@strlen.de>", "Subject": "[PATCH net-next 1/2] tcp: Revert \"tcp: remove CA_ACK_SLOWPATH\"", "Date": "Wed, 30 Aug 2017 19:24:57 +0200", "Message-Id": "<20170830172458.18544-2-fw@strlen.de>", "X-Mailer": "git-send-email 2.13.0", "In-Reply-To": "<20170830172458.18544-1-fw@strlen.de>", "References": "<20170830172458.18544-1-fw@strlen.de>", "Sender": "netdev-owner@vger.kernel.org", "Precedence": "bulk", "List-ID": "<netdev.vger.kernel.org>", "X-Mailing-List": "netdev@vger.kernel.org" }, "content": "This change was a followup to the header prediction removal,\nso first revert this as a prerequisite to back out hp removal.\n\nSigned-off-by: Florian Westphal <fw@strlen.de>\n---\n include/net/tcp.h | 5 +++--\n net/ipv4/tcp_input.c | 35 +++++++++++++++++++----------------\n net/ipv4/tcp_westwood.c | 31 +++++++++++++++++++++++++++----\n 3 files changed, 49 insertions(+), 22 deletions(-)", "diff": "diff --git a/include/net/tcp.h b/include/net/tcp.h\nindex c614ff135b66..c546d13ffbca 100644\n--- a/include/net/tcp.h\n+++ b/include/net/tcp.h\n@@ -910,8 +910,9 @@ enum tcp_ca_event {\n \n /* Information about inbound ACK, passed to cong_ops->in_ack_event() */\n enum tcp_ca_ack_event_flags {\n-\tCA_ACK_WIN_UPDATE\t= (1 << 0),\t/* ACK updated window */\n-\tCA_ACK_ECE\t\t= (1 << 1),\t/* ECE bit is set on ack */\n+\tCA_ACK_SLOWPATH\t\t= (1 << 0),\t/* In slow path processing */\n+\tCA_ACK_WIN_UPDATE\t= (1 << 1),\t/* ACK updated window */\n+\tCA_ACK_ECE\t\t= (1 << 2),\t/* ECE bit is set on ack */\n };\n \n /*\ndiff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c\nindex 7616cd76f6f6..a0e436366d31 100644\n--- a/net/ipv4/tcp_input.c\n+++ b/net/ipv4/tcp_input.c\n@@ -3552,7 +3552,6 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)\n \tu32 lost = tp->lost;\n \tint acked = 0; /* Number of packets newly acked */\n \tint rexmit = REXMIT_NONE; /* Flag to (re)transmit to recover losses */\n-\tu32 ack_ev_flags = 0;\n \n \tsack_state.first_sackt = 0;\n \tsack_state.rate = &rs;\n@@ -3593,26 +3592,30 @@ static int tcp_ack(struct sock *sk, const struct sk_buff *skb, int flag)\n \tif (flag & FLAG_UPDATE_TS_RECENT)\n \t\ttcp_replace_ts_recent(tp, TCP_SKB_CB(skb)->seq);\n \n-\tif (ack_seq != TCP_SKB_CB(skb)->end_seq)\n-\t\tflag |= FLAG_DATA;\n-\telse\n-\t\tNET_INC_STATS(sock_net(sk), LINUX_MIB_TCPPUREACKS);\n+\t{\n+\t\tu32 ack_ev_flags = CA_ACK_SLOWPATH;\n \n-\tflag |= tcp_ack_update_window(sk, skb, ack, ack_seq);\n+\t\tif (ack_seq != TCP_SKB_CB(skb)->end_seq)\n+\t\t\tflag |= FLAG_DATA;\n+\t\telse\n+\t\t\tNET_INC_STATS(sock_net(sk), LINUX_MIB_TCPPUREACKS);\n \n-\tif (TCP_SKB_CB(skb)->sacked)\n-\t\tflag |= tcp_sacktag_write_queue(sk, skb, prior_snd_una,\n-\t\t\t\t\t\t&sack_state);\n+\t\tflag |= tcp_ack_update_window(sk, skb, ack, ack_seq);\n \n-\tif (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb))) {\n-\t\tflag |= FLAG_ECE;\n-\t\tack_ev_flags = CA_ACK_ECE;\n-\t}\n+\t\tif (TCP_SKB_CB(skb)->sacked)\n+\t\t\tflag |= tcp_sacktag_write_queue(sk, skb, prior_snd_una,\n+\t\t\t\t\t\t\t&sack_state);\n+\n+\t\tif (tcp_ecn_rcv_ecn_echo(tp, tcp_hdr(skb))) {\n+\t\t\tflag |= FLAG_ECE;\n+\t\t\tack_ev_flags |= CA_ACK_ECE;\n+\t\t}\n \n-\tif (flag & FLAG_WIN_UPDATE)\n-\t\tack_ev_flags |= CA_ACK_WIN_UPDATE;\n+\t\tif (flag & FLAG_WIN_UPDATE)\n+\t\t\tack_ev_flags |= CA_ACK_WIN_UPDATE;\n \n-\ttcp_in_ack_event(sk, ack_ev_flags);\n+\t\ttcp_in_ack_event(sk, ack_ev_flags);\n+\t}\n \n \t/* We passed data and got it acked, remove any soft error\n \t * log. Something worked...\ndiff --git a/net/ipv4/tcp_westwood.c b/net/ipv4/tcp_westwood.c\nindex e5de84310949..bec9cafbe3f9 100644\n--- a/net/ipv4/tcp_westwood.c\n+++ b/net/ipv4/tcp_westwood.c\n@@ -154,6 +154,24 @@ static inline void update_rtt_min(struct westwood *w)\n }\n \n /*\n+ * @westwood_fast_bw\n+ * It is called when we are in fast path. In particular it is called when\n+ * header prediction is successful. In such case in fact update is\n+ * straight forward and doesn't need any particular care.\n+ */\n+static inline void westwood_fast_bw(struct sock *sk)\n+{\n+\tconst struct tcp_sock *tp = tcp_sk(sk);\n+\tstruct westwood *w = inet_csk_ca(sk);\n+\n+\twestwood_update_window(sk);\n+\n+\tw->bk += tp->snd_una - w->snd_una;\n+\tw->snd_una = tp->snd_una;\n+\tupdate_rtt_min(w);\n+}\n+\n+/*\n * @westwood_acked_count\n * This function evaluates cumul_ack for evaluating bk in case of\n * delayed or partial acks.\n@@ -205,12 +223,17 @@ static u32 tcp_westwood_bw_rttmin(const struct sock *sk)\n \n static void tcp_westwood_ack(struct sock *sk, u32 ack_flags)\n {\n-\tstruct westwood *w = inet_csk_ca(sk);\n+\tif (ack_flags & CA_ACK_SLOWPATH) {\n+\t\tstruct westwood *w = inet_csk_ca(sk);\n \n-\twestwood_update_window(sk);\n-\tw->bk += westwood_acked_count(sk);\n+\t\twestwood_update_window(sk);\n+\t\tw->bk += westwood_acked_count(sk);\n \n-\tupdate_rtt_min(w);\n+\t\tupdate_rtt_min(w);\n+\t\treturn;\n+\t}\n+\n+\twestwood_fast_bw(sk);\n }\n \n static void tcp_westwood_event(struct sock *sk, enum tcp_ca_event event)\n", "prefixes": [ "net-next", "1/2" ] }