{"id":814803,"url":"http://patchwork.ozlabs.org/api/patches/814803/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/patch/d0d4e04282773badbf6aebb9fbe0fa43491e20b6.1505719061.git.rcochran@linutronix.de/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/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":"<d0d4e04282773badbf6aebb9fbe0fa43491e20b6.1505719061.git.rcochran@linutronix.de>","list_archive_url":null,"date":"2017-09-18T07:41:19","name":"[RFC,V1,net-next,4/6] net: ipv4: udp: Hook into time based transmission.","commit_ref":null,"pull_url":null,"state":"rfc","archived":true,"hash":"6c40bf075fe4408b7059318fca74cfd4d8301a1e","submitter":{"id":69550,"url":"http://patchwork.ozlabs.org/api/people/69550/?format=json","name":"Richard Cochran","email":"rcochran@linutronix.de"},"delegate":{"id":34,"url":"http://patchwork.ozlabs.org/api/users/34/?format=json","username":"davem","first_name":"David","last_name":"Miller","email":"davem@davemloft.net"},"mbox":"http://patchwork.ozlabs.org/project/netdev/patch/d0d4e04282773badbf6aebb9fbe0fa43491e20b6.1505719061.git.rcochran@linutronix.de/mbox/","series":[{"id":3574,"url":"http://patchwork.ozlabs.org/api/series/3574/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=3574","date":"2017-09-18T07:41:16","name":"Time based packet transmission","version":1,"mbox":"http://patchwork.ozlabs.org/series/3574/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/814803/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/814803/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 3xwdM45ZJwz9s3w\n\tfor <patchwork-incoming@ozlabs.org>;\n\tMon, 18 Sep 2017 17:44:48 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752743AbdIRHop (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 18 Sep 2017 03:44:45 -0400","from Galois.linutronix.de ([146.0.238.70]:49786 \"EHLO\n\tGalois.linutronix.de\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1752517AbdIRHnX (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 18 Sep 2017 03:43:23 -0400","from rcochran by Galois.linutronix.de with local (Exim 4.80)\n\t(envelope-from <rcochran@linutronix.de>)\n\tid 1dtqgE-0006bX-3a; Mon, 18 Sep 2017 09:41:22 +0200"],"From":"Richard Cochran <rcochran@linutronix.de>","To":"<netdev@vger.kernel.org>","Cc":"<linux-kernel@vger.kernel.org>, intel-wired-lan@lists.osuosl.org,\n\tAndre Guedes <andre.guedes@intel.com>,\n\tAnna-Maria Gleixner <anna-maria@linutronix.de>,\n\tDavid Miller <davem@davemloft.net>, Henrik Austad <henrik@austad.us>,\n\tJesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>,\n\tJohn Stultz <john.stultz@linaro.org>,\n\tThomas Gleixner <tglx@linutronix.de>,\n\tVinicius Costa Gomes <vinicius.gomes@intel.com>","Subject":"[PATCH RFC V1 net-next 4/6] net: ipv4: udp: Hook into time based\n\ttransmission.","Date":"Mon, 18 Sep 2017 09:41:19 +0200","Message-Id":"<d0d4e04282773badbf6aebb9fbe0fa43491e20b6.1505719061.git.rcochran@linutronix.de>","X-Mailer":"git-send-email 1.7.10.4","In-Reply-To":"<cover.1505719061.git.rcochran@linutronix.de>","References":"<cover.1505719061.git.rcochran@linutronix.de>","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"For udp packets, copy the desired future transmit time from the CMSG\ncookie into the skb.\n\nSigned-off-by: Richard Cochran <rcochran@linutronix.de>\n---\n net/ipv4/udp.c | 5 ++++-\n 1 file changed, 4 insertions(+), 1 deletion(-)","diff":"diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c\nindex ef29df8648e4..669f63495877 100644\n--- a/net/ipv4/udp.c\n+++ b/net/ipv4/udp.c\n@@ -949,6 +949,7 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)\n \t}\n \n \tipc.sockc.tsflags = sk->sk_tsflags;\n+\tipc.sockc.transmit_time = 0;\n \tipc.addr = inet->inet_saddr;\n \tipc.oif = sk->sk_bound_dev_if;\n \n@@ -1050,8 +1051,10 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len)\n \t\t\t\t  sizeof(struct udphdr), &ipc, &rt,\n \t\t\t\t  msg->msg_flags);\n \t\terr = PTR_ERR(skb);\n-\t\tif (!IS_ERR_OR_NULL(skb))\n+\t\tif (!IS_ERR_OR_NULL(skb)) {\n+\t\t\tskb->transmit_time = ipc.sockc.transmit_time;\n \t\t\terr = udp_send_skb(skb, fl4);\n+\t\t}\n \t\tgoto out;\n \t}\n \n","prefixes":["RFC","V1","net-next","4/6"]}