{"id":825815,"url":"http://patchwork.ozlabs.org/api/1.2/patches/825815/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/patch/20171014114714.3694-3-natale.patriciello@gmail.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":"<20171014114714.3694-3-natale.patriciello@gmail.com>","list_archive_url":null,"date":"2017-10-14T11:47:11","name":"[RFC,v2,2/5] tcp: implemented pacing_expired","commit_ref":null,"pull_url":null,"state":"rfc","archived":true,"hash":"860489e91a3e5808249d0b49cfbf8ad734f215bb","submitter":{"id":72063,"url":"http://patchwork.ozlabs.org/api/1.2/people/72063/?format=json","name":"Natale Patriciello","email":"natale.patriciello@gmail.com"},"delegate":{"id":34,"url":"http://patchwork.ozlabs.org/api/1.2/users/34/?format=json","username":"davem","first_name":"David","last_name":"Miller","email":"davem@davemloft.net"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/20171014114714.3694-3-natale.patriciello@gmail.com/mbox/","series":[{"id":8182,"url":"http://patchwork.ozlabs.org/api/1.2/series/8182/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=8182","date":"2017-10-14T11:47:09","name":"TCP Wave","version":2,"mbox":"http://patchwork.ozlabs.org/series/8182/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/825815/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/825815/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; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"GvQL4PQd\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3yDjZ222wQz9t3H\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSat, 14 Oct 2017 22:50:02 +1100 (AEDT)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1753497AbdJNLtx (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 14 Oct 2017 07:49:53 -0400","from mail-wr0-f194.google.com ([209.85.128.194]:34990 \"EHLO\n\tmail-wr0-f194.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1753184AbdJNLtu (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Sat, 14 Oct 2017 07:49:50 -0400","by mail-wr0-f194.google.com with SMTP id y44so2182590wry.2\n\tfor <netdev@vger.kernel.org>; Sat, 14 Oct 2017 04:49:49 -0700 (PDT)","from localhost.localdomain (62.57.152.197.dyn.user.ono.com.\n\t[62.57.152.197])\n\tby smtp.gmail.com with ESMTPSA id 4sm4560337wmm.1.2017.10.14.04.49.48\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tSat, 14 Oct 2017 04:49:48 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=qu30q/MsUx47EEURs3zN+dfVFKvAMpgc7aFaW/9fjI8=;\n\tb=GvQL4PQdvuUXiBRBYUaqUBe9W+WJg/7qhhzleE2SGdiHm0dNxFVXViWnyHMY3h36Ee\n\tgoWLUC38O1PeWzUVTpa44/8iBYIbcl68cfNzzdBCtJ2G/2MV5hXuHN4cLE0BM9YmeR7s\n\tP4/ID1lAyC3q0N+kQ/BMoHx+2e4LoxudEseu/EZxZEDH+VKsHfOen+0TXtgo9+CUfxyv\n\tNsf//zQ7fj3U1ZLO4eV/RqMa+dYaBBK8E7pN/6dG7b0HaJip9rWh470nHSzhc7znnDru\n\t6+zaqJ8q6/tcwb7Hnj7gqhQ5TfteOY9A4O4Edit9y3YUifPBlsxSwDuu2CTsxQ28641n\n\tyVlQ==","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:cc:subject:date:message-id:in-reply-to\n\t:references;\n\tbh=qu30q/MsUx47EEURs3zN+dfVFKvAMpgc7aFaW/9fjI8=;\n\tb=nhzpd/3c28gEq23ooCjzNLNrg8OBh96etxcqVRIQnIGDXijMyjvkfh4IF40YWsngKf\n\ti55xhgJA2jk8E99MP6yb8oZgukLiJip/+tsEWADNgy8Lq/ZJ9df6WMk2K1vTAMuszPzB\n\t7gb42UYUVxh+ztUcqdbSOKsl4LBLlwKKg7oMzEOKmdVEnGIW6e7xKIr5lGxA3d19/lxA\n\tTPouPRjlxrgxAsy59K87xwEE3o8daL2Ox16keKQ2+iIw6rh/bBaliwWQBxv4A7yCvhiT\n\tiMRkzShbrjE/QdiStO8FW3CIrc/8dToiDPtqWzHWlte66e3LIuFixfa49K420BmdVZw5\n\tARpg==","X-Gm-Message-State":"AMCzsaWQ/Ik5oQPBuDXYOyBvY61COwd3L3wSwH0Iq/yG8jPdBfnq9viM\n\tMrUuR/blZ+Hh920+xgXHk44=","X-Google-Smtp-Source":"AOwi7QA/DnIzgb86kkXW2C3hn6EP36QzCvnTDkpUpBomCeyNfQO5f3GpkvrBJcstZGktjbELbEzqGg==","X-Received":"by 10.223.175.232 with SMTP id y40mr3963030wrd.207.1507981789261;\n\tSat, 14 Oct 2017 04:49:49 -0700 (PDT)","From":"Natale Patriciello <natale.patriciello@gmail.com>","To":"\"David S . Miller\" <davem@davemloft.net>,\n\tEric Dumazet <eric.dumazet@gmail.com>","Cc":"netdev <netdev@vger.kernel.org>, Ahmed Said <ahmed.said@uniroma2.it>,\n\tNatale Patriciello <natale.patriciello@gmail.com>,\n\tFrancesco Zampognaro <zampognaro@ing.uniroma2.it>,\n\tCesare Roseti <roseti@ing.uniroma2.it>","Subject":"[RFC PATCH v2 2/5] tcp: implemented pacing_expired","Date":"Sat, 14 Oct 2017 13:47:11 +0200","Message-Id":"<20171014114714.3694-3-natale.patriciello@gmail.com>","X-Mailer":"git-send-email 2.14.2","In-Reply-To":"<20171014114714.3694-1-natale.patriciello@gmail.com>","References":"<20171014114714.3694-1-natale.patriciello@gmail.com>","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"Inform the congestion control that the pacing timer, previously set,\nhas expired. The commit does not consider situations in which another\nkind of timer has expired (e.g., a tail loss probe, a retransmission\ntimer...)\n\nSigned-off-by: Natale Patriciello <natale.patriciello@gmail.com>\n---\n include/net/tcp.h     | 2 ++\n net/ipv4/tcp_output.c | 6 ++++++\n 2 files changed, 8 insertions(+)","diff":"diff --git a/include/net/tcp.h b/include/net/tcp.h\nindex 42c7aa96c4cf..e817f0669d0e 100644\n--- a/include/net/tcp.h\n+++ b/include/net/tcp.h\n@@ -1017,6 +1017,8 @@ struct tcp_congestion_ops {\n \t\t\t   union tcp_cc_info *info);\n \t/* get the expiration time for the pacing timer (optional) */\n \tu64 (*get_pacing_time)(struct sock *sk);\n+\t/* the pacing timer is expired (optional) */\n+\tvoid (*pacing_timer_expired)(struct sock *sk);\n \n \tchar \t\tname[TCP_CA_NAME_MAX];\n \tstruct module \t*owner;\ndiff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c\nindex ec5977156c26..25b4cf0802f2 100644\n--- a/net/ipv4/tcp_output.c\n+++ b/net/ipv4/tcp_output.c\n@@ -2241,6 +2241,7 @@ void tcp_chrono_stop(struct sock *sk, const enum tcp_chrono type)\n static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,\n \t\t\t   int push_one, gfp_t gfp)\n {\n+\tconst struct tcp_congestion_ops *ca_ops = inet_csk(sk)->icsk_ca_ops;\n \tstruct tcp_sock *tp = tcp_sk(sk);\n \tstruct sk_buff *skb;\n \tunsigned int tso_segs, sent_pkts;\n@@ -2263,6 +2264,11 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,\n \n \tmax_segs = tcp_tso_segs(sk, mss_now);\n \ttcp_mstamp_refresh(tp);\n+\n+\tif (!tcp_pacing_timer_check(sk) &&\n+\t    ca_ops && ca_ops->pacing_timer_expired)\n+\t\tca_ops->pacing_timer_expired(sk);\n+\n \twhile ((skb = tcp_send_head(sk))) {\n \t\tunsigned int limit;\n \n","prefixes":["RFC","v2","2/5"]}