From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vk0-f65.google.com ([209.85.213.65]:44701 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933487AbeCGRBV (ORCPT ); Wed, 7 Mar 2018 12:01:21 -0500 Received: by mail-vk0-f65.google.com with SMTP id t126so1739378vkb.11 for ; Wed, 07 Mar 2018 09:01:21 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <20180307011230.24001-7-jesus.sanchez-palencia@intel.com> References: <20180307011230.24001-1-jesus.sanchez-palencia@intel.com> <20180307011230.24001-7-jesus.sanchez-palencia@intel.com> From: Willem de Bruijn Date: Wed, 7 Mar 2018 12:00:39 -0500 Message-ID: Subject: Re: [RFC v3 net-next 06/18] net: ipv4: udp: Hook into time based transmission. To: Jesus Sanchez-Palencia Cc: Network Development , Jamal Hadi Salim , Cong Wang , =?UTF-8?B?SmnFmcOtIFDDrXJrbw==?= , Vinicius Gomes , Richard Cochran , intel-wired-lan@lists.osuosl.org, anna-maria@linutronix.de, Henrik Austad , Thomas Gleixner , John Stultz , Levi Pearson , Eric Dumazet , Willem de Bruijn , Miroslav Lichvar , Richard Cochran Content-Type: text/plain; charset="UTF-8" Sender: netdev-owner@vger.kernel.org List-ID: On Tue, Mar 6, 2018 at 8:12 PM, Jesus Sanchez-Palencia wrote: > From: Richard Cochran > > For udp packets, copy the desired future transmit time from the CMSG > cookie into the skb. > > Signed-off-by: Richard Cochran > Signed-off-by: Jesus Sanchez-Palencia > --- > net/ipv4/udp.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c > index 3013404d0935..d683bbde526b 100644 > --- a/net/ipv4/udp.c > +++ b/net/ipv4/udp.c > @@ -926,6 +926,7 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) > } > > ipc.sockc.tsflags = sk->sk_tsflags; > + ipc.sockc.transmit_time = 0; > ipc.addr = inet->inet_saddr; > ipc.oif = sk->sk_bound_dev_if; > > @@ -1040,8 +1041,10 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) > sizeof(struct udphdr), &ipc, &rt, > msg->msg_flags); > err = PTR_ERR(skb); > - if (!IS_ERR_OR_NULL(skb)) > + if (!IS_ERR_OR_NULL(skb)) { > + skb->tstamp = ipc.sockc.transmit_time; > err = udp_send_skb(skb, fl4); > + } similar comment to raw: this implements only for a subset of udp requests: those that can take the fast path. From mboxrd@z Thu Jan 1 00:00:00 1970 From: Willem de Bruijn Date: Wed, 7 Mar 2018 12:00:39 -0500 Subject: [Intel-wired-lan] [RFC v3 net-next 06/18] net: ipv4: udp: Hook into time based transmission. In-Reply-To: <20180307011230.24001-7-jesus.sanchez-palencia@intel.com> References: <20180307011230.24001-1-jesus.sanchez-palencia@intel.com> <20180307011230.24001-7-jesus.sanchez-palencia@intel.com> Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: On Tue, Mar 6, 2018 at 8:12 PM, Jesus Sanchez-Palencia wrote: > From: Richard Cochran > > For udp packets, copy the desired future transmit time from the CMSG > cookie into the skb. > > Signed-off-by: Richard Cochran > Signed-off-by: Jesus Sanchez-Palencia > --- > net/ipv4/udp.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c > index 3013404d0935..d683bbde526b 100644 > --- a/net/ipv4/udp.c > +++ b/net/ipv4/udp.c > @@ -926,6 +926,7 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) > } > > ipc.sockc.tsflags = sk->sk_tsflags; > + ipc.sockc.transmit_time = 0; > ipc.addr = inet->inet_saddr; > ipc.oif = sk->sk_bound_dev_if; > > @@ -1040,8 +1041,10 @@ int udp_sendmsg(struct sock *sk, struct msghdr *msg, size_t len) > sizeof(struct udphdr), &ipc, &rt, > msg->msg_flags); > err = PTR_ERR(skb); > - if (!IS_ERR_OR_NULL(skb)) > + if (!IS_ERR_OR_NULL(skb)) { > + skb->tstamp = ipc.sockc.transmit_time; > err = udp_send_skb(skb, fl4); > + } similar comment to raw: this implements only for a subset of udp requests: those that can take the fast path.