diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/can/raw.c | 4 | ||||
-rw-r--r-- | net/core/dev.c | 6 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 | ||||
-rw-r--r-- | net/ipv4/icmp.c | 4 | ||||
-rw-r--r-- | net/ipv4/ip_output.c | 6 | ||||
-rw-r--r-- | net/ipv4/raw.c | 2 | ||||
-rw-r--r-- | net/ipv4/udp.c | 4 | ||||
-rw-r--r-- | net/packet/af_packet.c | 4 | ||||
-rw-r--r-- | net/socket.c | 9 |
9 files changed, 20 insertions, 21 deletions
diff --git a/net/can/raw.c b/net/can/raw.c index a10e3338f084..7d77e67e57af 100644 --- a/net/can/raw.c +++ b/net/can/raw.c | |||
@@ -647,12 +647,12 @@ static int raw_sendmsg(struct kiocb *iocb, struct socket *sock, | |||
647 | err = memcpy_fromiovec(skb_put(skb, size), msg->msg_iov, size); | 647 | err = memcpy_fromiovec(skb_put(skb, size), msg->msg_iov, size); |
648 | if (err < 0) | 648 | if (err < 0) |
649 | goto free_skb; | 649 | goto free_skb; |
650 | err = sock_tx_timestamp(msg, sk, skb_tx(skb)); | 650 | err = sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags); |
651 | if (err < 0) | 651 | if (err < 0) |
652 | goto free_skb; | 652 | goto free_skb; |
653 | 653 | ||
654 | /* to be able to check the received tx sock reference in raw_rcv() */ | 654 | /* to be able to check the received tx sock reference in raw_rcv() */ |
655 | skb_tx(skb)->prevent_sk_orphan = 1; | 655 | skb_shinfo(skb)->tx_flags |= SKBTX_DRV_NEEDS_SK_REF; |
656 | 656 | ||
657 | skb->dev = dev; | 657 | skb->dev = dev; |
658 | skb->sk = sk; | 658 | skb->sk = sk; |
diff --git a/net/core/dev.c b/net/core/dev.c index 586a11cb4398..c1dc8a95f6ff 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1902,14 +1902,14 @@ static int dev_gso_segment(struct sk_buff *skb) | |||
1902 | 1902 | ||
1903 | /* | 1903 | /* |
1904 | * Try to orphan skb early, right before transmission by the device. | 1904 | * Try to orphan skb early, right before transmission by the device. |
1905 | * We cannot orphan skb if tx timestamp is requested, since | 1905 | * We cannot orphan skb if tx timestamp is requested or the sk-reference |
1906 | * drivers need to call skb_tstamp_tx() to send the timestamp. | 1906 | * is needed on driver level for other reasons, e.g. see net/can/raw.c |
1907 | */ | 1907 | */ |
1908 | static inline void skb_orphan_try(struct sk_buff *skb) | 1908 | static inline void skb_orphan_try(struct sk_buff *skb) |
1909 | { | 1909 | { |
1910 | struct sock *sk = skb->sk; | 1910 | struct sock *sk = skb->sk; |
1911 | 1911 | ||
1912 | if (sk && !skb_tx(skb)->flags) { | 1912 | if (sk && !skb_shinfo(skb)->tx_flags) { |
1913 | /* skb_tx_hash() wont be able to get sk. | 1913 | /* skb_tx_hash() wont be able to get sk. |
1914 | * We copy sk_hash into skb->rxhash | 1914 | * We copy sk_hash into skb->rxhash |
1915 | */ | 1915 | */ |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 3a2513f0d0c3..99ef721f773d 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -3016,7 +3016,7 @@ void skb_tstamp_tx(struct sk_buff *orig_skb, | |||
3016 | } else { | 3016 | } else { |
3017 | /* | 3017 | /* |
3018 | * no hardware time stamps available, | 3018 | * no hardware time stamps available, |
3019 | * so keep the skb_shared_tx and only | 3019 | * so keep the shared tx_flags and only |
3020 | * store software time stamp | 3020 | * store software time stamp |
3021 | */ | 3021 | */ |
3022 | skb->tstamp = ktime_get_real(); | 3022 | skb->tstamp = ktime_get_real(); |
diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c index a0d847c7cba5..96bc7f9475a3 100644 --- a/net/ipv4/icmp.c +++ b/net/ipv4/icmp.c | |||
@@ -379,7 +379,7 @@ static void icmp_reply(struct icmp_bxm *icmp_param, struct sk_buff *skb) | |||
379 | inet->tos = ip_hdr(skb)->tos; | 379 | inet->tos = ip_hdr(skb)->tos; |
380 | daddr = ipc.addr = rt->rt_src; | 380 | daddr = ipc.addr = rt->rt_src; |
381 | ipc.opt = NULL; | 381 | ipc.opt = NULL; |
382 | ipc.shtx.flags = 0; | 382 | ipc.tx_flags = 0; |
383 | if (icmp_param->replyopts.optlen) { | 383 | if (icmp_param->replyopts.optlen) { |
384 | ipc.opt = &icmp_param->replyopts; | 384 | ipc.opt = &icmp_param->replyopts; |
385 | if (ipc.opt->srr) | 385 | if (ipc.opt->srr) |
@@ -538,7 +538,7 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, __be32 info) | |||
538 | inet_sk(sk)->tos = tos; | 538 | inet_sk(sk)->tos = tos; |
539 | ipc.addr = iph->saddr; | 539 | ipc.addr = iph->saddr; |
540 | ipc.opt = &icmp_param.replyopts; | 540 | ipc.opt = &icmp_param.replyopts; |
541 | ipc.shtx.flags = 0; | 541 | ipc.tx_flags = 0; |
542 | 542 | ||
543 | { | 543 | { |
544 | struct flowi fl = { | 544 | struct flowi fl = { |
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 04b69896df5f..e807492f1777 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -953,7 +953,7 @@ alloc_new_skb: | |||
953 | else | 953 | else |
954 | /* only the initial fragment is | 954 | /* only the initial fragment is |
955 | time stamped */ | 955 | time stamped */ |
956 | ipc->shtx.flags = 0; | 956 | ipc->tx_flags = 0; |
957 | } | 957 | } |
958 | if (skb == NULL) | 958 | if (skb == NULL) |
959 | goto error; | 959 | goto error; |
@@ -964,7 +964,7 @@ alloc_new_skb: | |||
964 | skb->ip_summed = csummode; | 964 | skb->ip_summed = csummode; |
965 | skb->csum = 0; | 965 | skb->csum = 0; |
966 | skb_reserve(skb, hh_len); | 966 | skb_reserve(skb, hh_len); |
967 | *skb_tx(skb) = ipc->shtx; | 967 | skb_shinfo(skb)->tx_flags = ipc->tx_flags; |
968 | 968 | ||
969 | /* | 969 | /* |
970 | * Find where to start putting bytes. | 970 | * Find where to start putting bytes. |
@@ -1384,7 +1384,7 @@ void ip_send_reply(struct sock *sk, struct sk_buff *skb, struct ip_reply_arg *ar | |||
1384 | 1384 | ||
1385 | daddr = ipc.addr = rt->rt_src; | 1385 | daddr = ipc.addr = rt->rt_src; |
1386 | ipc.opt = NULL; | 1386 | ipc.opt = NULL; |
1387 | ipc.shtx.flags = 0; | 1387 | ipc.tx_flags = 0; |
1388 | 1388 | ||
1389 | if (replyopts.opt.optlen) { | 1389 | if (replyopts.opt.optlen) { |
1390 | ipc.opt = &replyopts.opt; | 1390 | ipc.opt = &replyopts.opt; |
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 009a7b2aa1ef..1f85ef289895 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -505,7 +505,7 @@ static int raw_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
505 | 505 | ||
506 | ipc.addr = inet->inet_saddr; | 506 | ipc.addr = inet->inet_saddr; |
507 | ipc.opt = NULL; | 507 | ipc.opt = NULL; |
508 | ipc.shtx.flags = 0; | 508 | ipc.tx_flags = 0; |
509 | ipc.oif = sk->sk_bound_dev_if; | 509 | ipc.oif = sk->sk_bound_dev_if; |
510 | 510 | ||
511 | if (msg->msg_controllen) { | 511 | if (msg->msg_controllen) { |
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c index 32e0bef60d0a..86e757e162ee 100644 --- a/net/ipv4/udp.c +++ b/net/ipv4/udp.c | |||
@@ -797,7 +797,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
797 | return -EOPNOTSUPP; | 797 | return -EOPNOTSUPP; |
798 | 798 | ||
799 | ipc.opt = NULL; | 799 | ipc.opt = NULL; |
800 | ipc.shtx.flags = 0; | 800 | ipc.tx_flags = 0; |
801 | 801 | ||
802 | if (up->pending) { | 802 | if (up->pending) { |
803 | /* | 803 | /* |
@@ -845,7 +845,7 @@ int udp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, | |||
845 | ipc.addr = inet->inet_saddr; | 845 | ipc.addr = inet->inet_saddr; |
846 | 846 | ||
847 | ipc.oif = sk->sk_bound_dev_if; | 847 | ipc.oif = sk->sk_bound_dev_if; |
848 | err = sock_tx_timestamp(msg, sk, &ipc.shtx); | 848 | err = sock_tx_timestamp(sk, &ipc.tx_flags); |
849 | if (err) | 849 | if (err) |
850 | return err; | 850 | return err; |
851 | if (msg->msg_controllen) { | 851 | if (msg->msg_controllen) { |
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c index 9a17f28b1253..3616f27b9d46 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c | |||
@@ -488,7 +488,7 @@ retry: | |||
488 | skb->dev = dev; | 488 | skb->dev = dev; |
489 | skb->priority = sk->sk_priority; | 489 | skb->priority = sk->sk_priority; |
490 | skb->mark = sk->sk_mark; | 490 | skb->mark = sk->sk_mark; |
491 | err = sock_tx_timestamp(msg, sk, skb_tx(skb)); | 491 | err = sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags); |
492 | if (err < 0) | 492 | if (err < 0) |
493 | goto out_unlock; | 493 | goto out_unlock; |
494 | 494 | ||
@@ -1209,7 +1209,7 @@ static int packet_snd(struct socket *sock, | |||
1209 | err = skb_copy_datagram_from_iovec(skb, offset, msg->msg_iov, 0, len); | 1209 | err = skb_copy_datagram_from_iovec(skb, offset, msg->msg_iov, 0, len); |
1210 | if (err) | 1210 | if (err) |
1211 | goto out_free; | 1211 | goto out_free; |
1212 | err = sock_tx_timestamp(msg, sk, skb_tx(skb)); | 1212 | err = sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags); |
1213 | if (err < 0) | 1213 | if (err < 0) |
1214 | goto out_free; | 1214 | goto out_free; |
1215 | 1215 | ||
diff --git a/net/socket.c b/net/socket.c index 2270b941bcc7..7848d12f5e4d 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -535,14 +535,13 @@ void sock_release(struct socket *sock) | |||
535 | } | 535 | } |
536 | EXPORT_SYMBOL(sock_release); | 536 | EXPORT_SYMBOL(sock_release); |
537 | 537 | ||
538 | int sock_tx_timestamp(struct msghdr *msg, struct sock *sk, | 538 | int sock_tx_timestamp(struct sock *sk, __u8 *tx_flags) |
539 | union skb_shared_tx *shtx) | ||
540 | { | 539 | { |
541 | shtx->flags = 0; | 540 | *tx_flags = 0; |
542 | if (sock_flag(sk, SOCK_TIMESTAMPING_TX_HARDWARE)) | 541 | if (sock_flag(sk, SOCK_TIMESTAMPING_TX_HARDWARE)) |
543 | shtx->hardware = 1; | 542 | *tx_flags |= SKBTX_HW_TSTAMP; |
544 | if (sock_flag(sk, SOCK_TIMESTAMPING_TX_SOFTWARE)) | 543 | if (sock_flag(sk, SOCK_TIMESTAMPING_TX_SOFTWARE)) |
545 | shtx->software = 1; | 544 | *tx_flags |= SKBTX_SW_TSTAMP; |
546 | return 0; | 545 | return 0; |
547 | } | 546 | } |
548 | EXPORT_SYMBOL(sock_tx_timestamp); | 547 | EXPORT_SYMBOL(sock_tx_timestamp); |