{"id":830852,"url":"http://patchwork.ozlabs.org/api/1.2/patches/830852/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/patch/20171026181038.23929-1-cpaasch@apple.com/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/1.2/projects/7/?format=json","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":"<20171026181038.23929-1-cpaasch@apple.com>","list_archive_url":null,"date":"2017-10-26T18:10:38","name":"[iproute2] ip: add fastopen_no_cookie option to ip route","commit_ref":null,"pull_url":null,"state":"changes-requested","archived":true,"hash":"30eaf7bae692ef64100bae986176b9144db725a6","submitter":{"id":66660,"url":"http://patchwork.ozlabs.org/api/1.2/people/66660/?format=json","name":"Christoph Paasch","email":"cpaasch@apple.com"},"delegate":{"id":389,"url":"http://patchwork.ozlabs.org/api/1.2/users/389/?format=json","username":"shemminger","first_name":"stephen","last_name":"hemminger","email":"shemminger@vyatta.com"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/20171026181038.23929-1-cpaasch@apple.com/mbox/","series":[{"id":10411,"url":"http://patchwork.ozlabs.org/api/1.2/series/10411/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=10411","date":"2017-10-26T18:10:38","name":"[iproute2] ip: add fastopen_no_cookie option to ip route","version":1,"mbox":"http://patchwork.ozlabs.org/series/10411/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/830852/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/830852/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;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=apple.com header.i=@apple.com\n\theader.b=\"MwJnoLX4\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yNFRp2546z9t2h\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri, 27 Oct 2017 05:10:45 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S932375AbdJZSKl (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tThu, 26 Oct 2017 14:10:41 -0400","from mail-out7.apple.com ([17.151.62.29]:51167 \"EHLO\n\tmail-in7.apple.com\" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org\n\twith ESMTP id S932332AbdJZSKk (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Thu, 26 Oct 2017 14:10:40 -0400","from relay3.apple.com (relay3.apple.com [17.128.113.83])\n\t(using TLS with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(Client did not present a certificate)\n\tby mail-in7.apple.com (Apple Secure Mail Relay) with SMTP id\n\t58.1E.31255.02522F95; Thu, 26 Oct 2017 11:10:40 -0700 (PDT)","from nwk-mmpp-sz09.apple.com (nwk-mmpp-sz09.apple.com\n\t[17.128.115.80]) by relay3.apple.com (Apple SCV relay) with SMTP id\n\tDC.E7.23978.F1522F95; Thu, 26 Oct 2017 11:10:39 -0700 (PDT)","from localhost ([17.226.23.227]) by nwk-mmpp-sz09.apple.com\n\t(Oracle Communications Messaging Server 8.0.1.3.20170825 64bit (built\n\tAug 25\n\t2017)) with ESMTPSA id <0OYF0092HZTRWQ10@nwk-mmpp-sz09.apple.com>;\n\tThu, 26 Oct 2017 11:10:39 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; d=apple.com; s=mailout2048s;\n\tc=relaxed/simple; q=dns/txt; i=@apple.com; t=1509041440;\n\th=From:Sender:Reply-To:Subject:Date:Message-id:To:Cc:MIME-Version:Content-Type:\n\tContent-transfer-encoding:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:\n\tList-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive;\n\tbh=Kklp/0Gib3GmVdlmkfz7pGXOMKyyKTssqYRjaEdpiaQ=;\n\tb=MwJnoLX4AVSXUDPfMKXIFI94i7Emdli9qu9ahUzyEu1ksEv3dWrrXlnTR4G444Y8\n\tYSxuRSItCKG7mouUvpvKlZalotQqsWmT5AT9AW7BI82/dS04TAseW3iuU0DF2BcT\n\tNDChKrQU3ngZ750apvvFYl4vxANVCwYGSJYpTG4gpj9W9mVAFfvgAMgdHt/Pnqq4\n\tekTbTOCeXCd1qAJkinsZxya0X3oBK09Z7WSMQp9PIbORMYAhUD4L05xiDROY3oVc\n\tfUXDF2TWCl+ptaRmjuqGD4ofHB74E6y949HMDwOg1YAkPIBtYOXbo/s4eL/McJmj\n\tAMCDSrUc+5fTjl7kLiFPEA==;","X-AuditID":"11973e16-c0fdc9c000007a17-00-59f225207270","Content-transfer-encoding":"7BIT","From":"Christoph Paasch <cpaasch@apple.com>","To":"Stephen Hemminger <stephen@networkplumber.org>","Cc":"netdev@vger.kernel.org, Yuchung Cheng <ycheng@google.com>,\n\tEric Dumazet <edumazet@google.com>","Subject":"[PATCH iproute2] ip: add fastopen_no_cookie option to ip route","Date":"Thu, 26 Oct 2017 11:10:38 -0700","Message-id":"<20171026181038.23929-1-cpaasch@apple.com>","X-Mailer":"git-send-email 2.14.1","X-Brightmail-Tracker":["H4sIAAAAAAAAA+NgFvrNJMWRmVeSWpSXmKPExsUi2FAYrKug+inSYOIqJounxx6xWxxbIGax\n\t+I6cxZfHV9kcWDwWbCr16Dk5j8nj8ya5AOYoLpuU1JzMstQifbsEroy1az6zFfxWrH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4w+QCdMZJYSTc4Hhn1eSbyhsYWxpYmF\n\tgYGJpZkJDmElcd5TIh8jhQTSE0tSs1NTC1KLYMYxcXBKNTBqLDBzP/UvX/mNtavbfYHHx98U\n\txt1ufnp83Yr5Ooa7+KcGHbqbblS7cVmxl5b5g6ttzFenqvg8f1L+4nx5tfRrX8mP8x91MnFq\n\tXZG+2jd94SWr14cmrFkzf+PXcO8vKoWv9lukZ62sVO19GueTNKth3nLv6uuHNWtzc5us1e+b\n\t3hJKWRA9Y8MxJRZg5BtqMRcVJwIAnkKsT1oCAAA="],"Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"This patch adds fastopen_no_cookie option to enable/disable TCP fastopen\nwithout a cookie on a per-route basis.\n\nSupport in Linux was added with 71c02379c762 (tcp: Configure TFO without\ncookie per socket and/or per route).\n\nCc: Stephen Hemminger <stephen@networkplumber.org>\nSigned-off-by: Christoph Paasch <cpaasch@apple.com>\n---\n include/uapi/linux/rtnetlink.h |  2 ++\n ip/iproute.c                   | 42 ++++++++++++++++++++++++++----------------\n man/man8/ip-route.8.in         |  6 ++++++\n 3 files changed, 34 insertions(+), 16 deletions(-)","diff":"diff --git a/include/uapi/linux/rtnetlink.h b/include/uapi/linux/rtnetlink.h\nindex 813e9e0767d3..ff0eec7329c6 100644\n--- a/include/uapi/linux/rtnetlink.h\n+++ b/include/uapi/linux/rtnetlink.h\n@@ -430,6 +430,8 @@ enum {\n #define RTAX_QUICKACK RTAX_QUICKACK\n \tRTAX_CC_ALGO,\n #define RTAX_CC_ALGO RTAX_CC_ALGO\n+\tRTAX_FASTOPEN_NO_COOKIE,\n+#define RTAX_FASTOPEN_NO_COOKIE RTAX_FASTOPEN_NO_COOKIE\n \t__RTAX_MAX\n };\n \ndiff --git a/ip/iproute.c b/ip/iproute.c\nindex e81bc05ec16c..eadf0394de7f 100644\n--- a/ip/iproute.c\n+++ b/ip/iproute.c\n@@ -41,21 +41,22 @@ enum list_action {\n \tIPROUTE_SAVE,\n };\n static const char *mx_names[RTAX_MAX+1] = {\n-\t[RTAX_MTU]\t= \"mtu\",\n-\t[RTAX_WINDOW]\t= \"window\",\n-\t[RTAX_RTT]\t= \"rtt\",\n-\t[RTAX_RTTVAR]\t= \"rttvar\",\n-\t[RTAX_SSTHRESH] = \"ssthresh\",\n-\t[RTAX_CWND]\t= \"cwnd\",\n-\t[RTAX_ADVMSS]\t= \"advmss\",\n-\t[RTAX_REORDERING] = \"reordering\",\n-\t[RTAX_HOPLIMIT] = \"hoplimit\",\n-\t[RTAX_INITCWND] = \"initcwnd\",\n-\t[RTAX_FEATURES] = \"features\",\n-\t[RTAX_RTO_MIN]\t= \"rto_min\",\n-\t[RTAX_INITRWND]\t= \"initrwnd\",\n-\t[RTAX_QUICKACK]\t= \"quickack\",\n-\t[RTAX_CC_ALGO]\t= \"congctl\",\n+\t[RTAX_MTU]\t\t\t= \"mtu\",\n+\t[RTAX_WINDOW]\t\t\t= \"window\",\n+\t[RTAX_RTT]\t\t\t= \"rtt\",\n+\t[RTAX_RTTVAR]\t\t\t= \"rttvar\",\n+\t[RTAX_SSTHRESH]\t\t\t= \"ssthresh\",\n+\t[RTAX_CWND]\t\t\t= \"cwnd\",\n+\t[RTAX_ADVMSS]\t\t\t= \"advmss\",\n+\t[RTAX_REORDERING]\t\t= \"reordering\",\n+\t[RTAX_HOPLIMIT]\t\t\t= \"hoplimit\",\n+\t[RTAX_INITCWND]\t\t\t= \"initcwnd\",\n+\t[RTAX_FEATURES]\t\t\t= \"features\",\n+\t[RTAX_RTO_MIN]\t\t\t= \"rto_min\",\n+\t[RTAX_INITRWND]\t\t\t= \"initrwnd\",\n+\t[RTAX_QUICKACK]\t\t\t= \"quickack\",\n+\t[RTAX_CC_ALGO]\t\t\t= \"congctl\",\n+\t[RTAX_FASTOPEN_NO_COOKIE]\t= \"fastopen_no_cookie\"\n };\n static void usage(void) __attribute__((noreturn));\n \n@@ -89,7 +90,7 @@ static void usage(void)\n \tfprintf(stderr, \"           [ ssthresh NUMBER ] [ realms REALM ] [ src ADDRESS ]\\n\");\n \tfprintf(stderr, \"           [ rto_min TIME ] [ hoplimit NUMBER ] [ initrwnd NUMBER ]\\n\");\n \tfprintf(stderr, \"           [ features FEATURES ] [ quickack BOOL ] [ congctl NAME ]\\n\");\n-\tfprintf(stderr, \"           [ pref PREF ] [ expires TIME ]\\n\");\n+\tfprintf(stderr, \"           [ pref PREF ] [ expires TIME ] [ fastopen_no_cookie BOOL ]\\n\");\n \tfprintf(stderr, \"TYPE := { unicast | local | broadcast | multicast | throw |\\n\");\n \tfprintf(stderr, \"          unreachable | prohibit | blackhole | nat }\\n\");\n \tfprintf(stderr, \"TABLE_ID := [ local | main | default | all | NUMBER ]\\n\");\n@@ -1216,6 +1217,15 @@ static int iproute_modify(int cmd, unsigned int flags, int argc, char **argv)\n \n \t\t\taddattr8(&req.n, sizeof(req), RTA_TTL_PROPAGATE,\n \t\t\t\t ttl_prop);\n+\t\t} else if (matches(*argv, \"fastopen_no_cookie\") == 0) {\n+\t\t\tunsigned int fastopen_no_cookie;\n+\n+\t\t\tNEXT_ARG();\n+\t\t\tif (get_unsigned(&fastopen_no_cookie, *argv, 0))\n+\t\t\t\tinvarg(\"\\\"fastopen_no_cookie\\\" value is invalid\\n\", *argv);\n+\t\t\tif (fastopen_no_cookie != 1 && fastopen_no_cookie != 0)\n+\t\t\t\tinvarg(\"\\\"fastopen_no_cookie\\\" value should be 0 or 1\\n\", *argv);\n+\t\t\trta_addattr32(mxrta, sizeof(mxbuf), RTAX_FASTOPEN_NO_COOKIE, fastopen_no_cookie);\n \t\t} else {\n \t\t\tint type;\n \t\t\tinet_prefix dst;\ndiff --git a/man/man8/ip-route.8.in b/man/man8/ip-route.8.in\nindex 705ceb2054dc..a863769526f3 100644\n--- a/man/man8/ip-route.8.in\n+++ b/man/man8/ip-route.8.in\n@@ -142,6 +142,8 @@ replace \" } \"\n .IR PREF \" ] [ \"\n .B  expires\n .IR TIME \" ]\"\n+.B  fastopen_no_cookie\n+.IR BOOL \" ] [ \"\n \n .ti -8\n .IR TYPE \" := [ \"\n@@ -524,6 +526,10 @@ sysctl is set to 0.\n .BI quickack \" BOOL \" \"(3.11+ only)\"\n Enable or disable quick ack for connections to this destination.\n \n+.TP\n+.BI fastopen_no_cookie \" BOOL \" \"(4.15+ only)\"\n+Enable TCP Fastopen without a cookie for connections to this destination.\n+\n .TP\n .BI congctl \" NAME \" \"(3.20+ only)\"\n .TP\n","prefixes":["iproute2"]}