linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: David Miller <davem@davemloft.net>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Networking <netdev@vger.kernel.org>
Cc: Cong Wang <cong.wang@bytedance.com>,
	John Fastabend <john.fastabend@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the net-next tree with the bpf tree
Date: Thu, 8 Apr 2021 13:11:17 +1000	[thread overview]
Message-ID: <20210408131117.7f2f3a29@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 3139 bytes --]

Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

  net/core/skmsg.c

between commit:

  144748eb0c44 ("bpf, sockmap: Fix incorrect fwd_alloc accounting")

from the bpf tree and commit:

  e3526bb92a20 ("skmsg: Move sk_redir from TCP_SKB_CB to skb")

from the net-next tree.

I fixed it up (I think - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc net/core/skmsg.c
index 5def3a2e85be,92a83c02562a..000000000000
--- a/net/core/skmsg.c
+++ b/net/core/skmsg.c
@@@ -806,12 -900,17 +900,13 @@@ int sk_psock_tls_strp_read(struct sk_ps
  	int ret = __SK_PASS;
  
  	rcu_read_lock();
- 	prog = READ_ONCE(psock->progs.skb_verdict);
+ 	prog = READ_ONCE(psock->progs.stream_verdict);
  	if (likely(prog)) {
 -		/* We skip full set_owner_r here because if we do a SK_PASS
 -		 * or SK_DROP we can skip skb memory accounting and use the
 -		 * TLS context.
 -		 */
  		skb->sk = psock->sk;
- 		tcp_skb_bpf_redirect_clear(skb);
- 		ret = sk_psock_bpf_run(psock, prog, skb);
- 		ret = sk_psock_map_verd(ret, tcp_skb_bpf_redirect_fetch(skb));
+ 		skb_dst_drop(skb);
+ 		skb_bpf_redirect_clear(skb);
+ 		ret = bpf_prog_run_pin_on_cpu(prog, skb);
+ 		ret = sk_psock_map_verd(ret, skb_bpf_redirect_fetch(skb));
  		skb->sk = NULL;
  	}
  	sk_psock_tls_verdict_apply(skb, psock->sk, ret);
@@@ -876,13 -995,13 +991,14 @@@ static void sk_psock_strp_read(struct s
  		kfree_skb(skb);
  		goto out;
  	}
- 	prog = READ_ONCE(psock->progs.skb_verdict);
 -	skb_set_owner_r(skb, sk);
+ 	prog = READ_ONCE(psock->progs.stream_verdict);
  	if (likely(prog)) {
 +		skb->sk = sk;
- 		tcp_skb_bpf_redirect_clear(skb);
- 		ret = sk_psock_bpf_run(psock, prog, skb);
- 		ret = sk_psock_map_verd(ret, tcp_skb_bpf_redirect_fetch(skb));
+ 		skb_dst_drop(skb);
+ 		skb_bpf_redirect_clear(skb);
+ 		ret = bpf_prog_run_pin_on_cpu(prog, skb);
+ 		ret = sk_psock_map_verd(ret, skb_bpf_redirect_fetch(skb));
 +		skb->sk = NULL;
  	}
  	sk_psock_verdict_apply(psock, skb, ret);
  out:
@@@ -953,13 -1115,15 +1112,16 @@@ static int sk_psock_verdict_recv(read_d
  		kfree_skb(skb);
  		goto out;
  	}
- 	prog = READ_ONCE(psock->progs.skb_verdict);
 -	skb_set_owner_r(skb, sk);
+ 	prog = READ_ONCE(psock->progs.stream_verdict);
+ 	if (!prog)
+ 		prog = READ_ONCE(psock->progs.skb_verdict);
  	if (likely(prog)) {
 +		skb->sk = sk;
- 		tcp_skb_bpf_redirect_clear(skb);
- 		ret = sk_psock_bpf_run(psock, prog, skb);
- 		ret = sk_psock_map_verd(ret, tcp_skb_bpf_redirect_fetch(skb));
+ 		skb_dst_drop(skb);
+ 		skb_bpf_redirect_clear(skb);
+ 		ret = bpf_prog_run_pin_on_cpu(prog, skb);
+ 		ret = sk_psock_map_verd(ret, skb_bpf_redirect_fetch(skb));
 +		skb->sk = NULL;
  	}
  	sk_psock_verdict_apply(psock, skb, ret);
  out:

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2021-04-08  3:11 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-08  3:11 Stephen Rothwell [this message]
2021-04-08  3:53 ` [External] linux-next: manual merge of the net-next tree with the bpf tree Cong Wang .
  -- strict thread matches above, loose matches on Subject: below --
2022-10-04  1:24 Stephen Rothwell
2022-10-04  2:07 ` Jakub Kicinski
2022-10-04 22:45   ` Stephen Rothwell
2022-09-23  0:45 Stephen Rothwell
2021-10-27  0:12 Stephen Rothwell
2021-06-22  1:06 Stephen Rothwell
2021-04-08  3:02 Stephen Rothwell
2021-03-29  1:29 Stephen Rothwell
2021-03-29  8:28 ` Jiri Olsa
2020-07-16  1:59 Stephen Rothwell
2020-05-26  3:12 Stephen Rothwell
2020-05-26  5:45 ` Björn Töpel
2019-06-06  1:34 Stephen Rothwell
2019-02-20  0:37 Stephen Rothwell
2019-02-20  0:41 ` Alexei Starovoitov
2019-02-20  0:45   ` Stanislav Fomichev
2019-02-20  1:03     ` Stephen Rothwell
2019-02-20  0:48   ` Daniel Borkmann
2019-02-20  3:03     ` Stanislav Fomichev
2018-12-14  0:56 Stephen Rothwell
2018-12-03  2:16 Stephen Rothwell
2018-12-03  2:03 Stephen Rothwell
2018-08-01  1:35 Stephen Rothwell
2018-08-01  4:23 ` Yonghong Song
2018-07-26  1:19 Stephen Rothwell
2018-07-26 15:32 ` Martin KaFai Lau
2018-01-09  0:21 Stephen Rothwell
2018-01-09  0:29 ` Alexei Starovoitov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210408131117.7f2f3a29@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=ast@kernel.org \
    --cc=cong.wang@bytedance.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=john.fastabend@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).