Re: [PATCH v2 net-next 0/8] add TX timestamping via cmsg

2016-04-02 Thread Soheil Hassas Yeganeh
On Sat, Apr 2, 2016 at 9:27 PM, David Miller  wrote:
> From: David Miller 
> Date: Sat, 02 Apr 2016 21:19:42 -0400 (EDT)
>
>> Series applied, thanks.
>
> I had to revert, this breaks the build:
>
> net/l2tp/l2tp_ip6.c: In function ‘l2tp_ip6_sendmsg’:
> net/l2tp/l2tp_ip6.c:565:9: error: too few arguments to function 
> ‘ip6_datagram_send_ctl’
>err = ip6_datagram_send_ctl(sock_net(sk), sk, msg, , opt,
>  ^
> In file included from net/l2tp/l2tp_ip6.c:33:0:
> include/net/transp_v6.h:43:5: note: declared here
>  int ip6_datagram_send_ctl(struct net *net, struct sock *sk, struct msghdr 
> *msg,
>  ^
> net/l2tp/l2tp_ip6.c:625:8: error: too few arguments to function 
> ‘ip6_append_data’
>   err = ip6_append_data(sk, ip_generic_getfrag, msg,
> ^
> In file included from include/net/inetpeer.h:15:0,
>  from include/net/route.h:28,
>  from include/net/ip.h:31,
>  from net/l2tp/l2tp_ip6.c:23:
> include/net/ipv6.h:865:5: note: declared here
>  int ip6_append_data(struct sock *sk,
>  ^

I'm really sorry about this. CONFIG_L2TP was no enabled in my config.
I'll fix the patch, and will mail v3.

Thanks,
Soheil


Re: [PATCH v2 net-next 0/8] add TX timestamping via cmsg

2016-04-02 Thread David Miller
From: David Miller 
Date: Sat, 02 Apr 2016 21:19:42 -0400 (EDT)

> Series applied, thanks.

I had to revert, this breaks the build:

net/l2tp/l2tp_ip6.c: In function ‘l2tp_ip6_sendmsg’:
net/l2tp/l2tp_ip6.c:565:9: error: too few arguments to function 
‘ip6_datagram_send_ctl’
   err = ip6_datagram_send_ctl(sock_net(sk), sk, msg, , opt,
 ^
In file included from net/l2tp/l2tp_ip6.c:33:0:
include/net/transp_v6.h:43:5: note: declared here
 int ip6_datagram_send_ctl(struct net *net, struct sock *sk, struct msghdr *msg,
 ^
net/l2tp/l2tp_ip6.c:625:8: error: too few arguments to function 
‘ip6_append_data’
  err = ip6_append_data(sk, ip_generic_getfrag, msg,
^
In file included from include/net/inetpeer.h:15:0,
 from include/net/route.h:28,
 from include/net/ip.h:31,
 from net/l2tp/l2tp_ip6.c:23:
include/net/ipv6.h:865:5: note: declared here
 int ip6_append_data(struct sock *sk,
 ^


Re: [PATCH v2 net-next 0/8] add TX timestamping via cmsg

2016-04-02 Thread David Miller
From: Soheil Hassas Yeganeh 
Date: Fri,  1 Apr 2016 11:04:32 -0400

> From: Soheil Hassas Yeganeh 
> 
> This patch series aim at enabling TX timestamping via cmsg.
> 
> Currently, to occasionally sample TX timestamping on a socket,
> applications need to call setsockopt twice: first for enabling
> timestamps and then for disabling them. This is an unnecessary
> overhead. With cmsg, in contrast, applications can sample TX
> timestamps per sendmsg().
> 
> This patch series adds the code for processing SO_TIMESTAMPING
> for cmsg's of the SOL_SOCKET level, and adds the glue code for
> TCP, UDP, and RAW for both IPv4 and IPv6. This implementation
> supports overriding timestamp generation flags (i.e.,
> SOF_TIMESTAMPING_TX_*) but not timestamp reporting flags.
> Applications must still enable timestamp reporting via
> setsockopt to receive timestamps.
> 
> This series does not change existing timestamping behavior for
> applications that are using socket options.
> 
> I will follow up with another patch to enable timestamping for
> active TFO (client-side TCP Fast Open) and also setting packet
> mark via cmsgs.
 ...
> Changes in v2:
>   - Replace u32 with __u32 in the documentation.

Series applied, thanks.


[PATCH v2 net-next 0/8] add TX timestamping via cmsg

2016-04-01 Thread Soheil Hassas Yeganeh
From: Soheil Hassas Yeganeh 

This patch series aim at enabling TX timestamping via cmsg.

Currently, to occasionally sample TX timestamping on a socket,
applications need to call setsockopt twice: first for enabling
timestamps and then for disabling them. This is an unnecessary
overhead. With cmsg, in contrast, applications can sample TX
timestamps per sendmsg().

This patch series adds the code for processing SO_TIMESTAMPING
for cmsg's of the SOL_SOCKET level, and adds the glue code for
TCP, UDP, and RAW for both IPv4 and IPv6. This implementation
supports overriding timestamp generation flags (i.e.,
SOF_TIMESTAMPING_TX_*) but not timestamp reporting flags.
Applications must still enable timestamp reporting via
setsockopt to receive timestamps.

This series does not change existing timestamping behavior for
applications that are using socket options.

I will follow up with another patch to enable timestamping for
active TFO (client-side TCP Fast Open) and also setting packet
mark via cmsgs.

Thanks!

Changes in v2:
- Replace u32 with __u32 in the documentation.

Soheil Hassas Yeganeh (7):
  tcp: accept SOF_TIMESTAMPING_OPT_ID for passive TFO
  tcp: use one bit in TCP_SKB_CB to mark ACK timestamps
  sock: accept SO_TIMESTAMPING flags in socket cmsg
  ipv4: process socket-level control messages in IPv4
  ipv6: process socket-level control messages in IPv6
  sock: enable timestamping using control messages
  sock: document timestamping via cmsg in Documentation

Willem de Bruijn (1):
  sock: break up sock_cmsg_snd into __sock_cmsg_snd and loop

 Documentation/networking/timestamping.txt | 48 --
 drivers/net/tun.c |  3 +-
 include/net/ip.h  |  3 +-
 include/net/ipv6.h|  6 ++--
 include/net/sock.h| 13 +---
 include/net/tcp.h |  3 +-
 include/net/transp_v6.h   |  3 +-
 include/uapi/linux/net_tstamp.h   | 10 +++
 net/can/raw.c |  2 +-
 net/core/sock.c   | 49 +++
 net/ipv4/ip_sockglue.c|  9 +-
 net/ipv4/ping.c   |  7 +++--
 net/ipv4/raw.c| 13 
 net/ipv4/tcp.c| 22 ++
 net/ipv4/tcp_input.c  |  2 +-
 net/ipv4/udp.c| 10 +++
 net/ipv6/datagram.c   |  9 +-
 net/ipv6/icmp.c   |  6 ++--
 net/ipv6/ip6_flowlabel.c  |  3 +-
 net/ipv6/ip6_output.c | 15 ++
 net/ipv6/ipv6_sockglue.c  |  3 +-
 net/ipv6/ping.c   |  3 +-
 net/ipv6/raw.c|  7 +++--
 net/ipv6/udp.c| 10 +--
 net/packet/af_packet.c| 30 +++
 net/socket.c  | 10 +++
 26 files changed, 225 insertions(+), 74 deletions(-)

-- 
2.8.0.rc3.226.g39d4020