Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net

Trivial conflicts in net/can/isotp.c and
tools/testing/selftests/net/mptcp/mptcp_connect.sh

scaled_ppm_to_ppb() was moved from drivers/ptp/ptp_clock.c
to include/linux/ptp_clock_kernel.h in -next so re-apply
the fix there.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Jakub Kicinski
2021-06-18 19:47:02 -07:00
858 changed files with 9191 additions and 4065 deletions

View File

@@ -1934,7 +1934,8 @@ static inline u32 net_tx_rndhash(void)
static inline void sk_set_txhash(struct sock *sk)
{
sk->sk_txhash = net_tx_rndhash();
/* This pairs with READ_ONCE() in skb_set_hash_from_sk() */
WRITE_ONCE(sk->sk_txhash, net_tx_rndhash());
}
static inline bool sk_rethink_txhash(struct sock *sk)
@@ -2206,9 +2207,12 @@ static inline void sock_poll_wait(struct file *filp, struct socket *sock,
static inline void skb_set_hash_from_sk(struct sk_buff *skb, struct sock *sk)
{
if (sk->sk_txhash) {
/* This pairs with WRITE_ONCE() in sk_set_txhash() */
u32 txhash = READ_ONCE(sk->sk_txhash);
if (txhash) {
skb->l4_hash = 1;
skb->hash = sk->sk_txhash;
skb->hash = txhash;
}
}
@@ -2266,8 +2270,13 @@ struct sk_buff *sock_dequeue_err_skb(struct sock *sk);
static inline int sock_error(struct sock *sk)
{
int err;
if (likely(!sk->sk_err))
/* Avoid an atomic operation for the common case.
* This is racy since another cpu/thread can change sk_err under us.
*/
if (likely(data_race(!sk->sk_err)))
return 0;
err = xchg(&sk->sk_err, 0);
return -err;
}