mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
net: add missing SOF_TIMESTAMPING_OPT_ID support
SOF_TIMESTAMPING_OPT_ID is supported on TCP, UDP and RAW sockets.
But it was missing on RAW with IPPROTO_IP, PF_PACKET and CAN.
Add skb_setup_tx_timestamp that configures both tx_flags and tskey
for these paths that do not need corking or use bytestream keys.
Fixes: 09c2d251b7 ("net-timestamp: add key to disambiguate concurrent datagrams")
Signed-off-by: Willem de Bruijn <[email protected]>
Acked-by: Soheil Hassas Yeganeh <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
fbfb2321e9
commit
8f932f762e
5 changed files with 27 additions and 10 deletions
|
|
@ -1965,7 +1965,7 @@ retry:
|
|||
skb->mark = sk->sk_mark;
|
||||
skb->tstamp = sockc.transmit_time;
|
||||
|
||||
sock_tx_timestamp(sk, sockc.tsflags, &skb_shinfo(skb)->tx_flags);
|
||||
skb_setup_tx_timestamp(skb, sockc.tsflags);
|
||||
|
||||
if (unlikely(extra_len == 4))
|
||||
skb->no_fcs = 1;
|
||||
|
|
@ -2460,7 +2460,7 @@ static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
|
|||
skb->priority = po->sk.sk_priority;
|
||||
skb->mark = po->sk.sk_mark;
|
||||
skb->tstamp = sockc->transmit_time;
|
||||
sock_tx_timestamp(&po->sk, sockc->tsflags, &skb_shinfo(skb)->tx_flags);
|
||||
skb_setup_tx_timestamp(skb, sockc->tsflags);
|
||||
skb_zcopy_set_nouarg(skb, ph.raw);
|
||||
|
||||
skb_reserve(skb, hlen);
|
||||
|
|
@ -2898,7 +2898,7 @@ static int packet_snd(struct socket *sock, struct msghdr *msg, size_t len)
|
|||
goto out_free;
|
||||
}
|
||||
|
||||
sock_tx_timestamp(sk, sockc.tsflags, &skb_shinfo(skb)->tx_flags);
|
||||
skb_setup_tx_timestamp(skb, sockc.tsflags);
|
||||
|
||||
if (!vnet_hdr.gso_type && (len > dev->mtu + reserve + extra_len) &&
|
||||
!packet_extra_vlan_len_allowed(dev, skb)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue