Skip to contentSkip to conversation

linux-next: manual merge of the bpf-next tree with the net tree

PATCH Mark Brown 1 participant 1 message Jul 21

Subsystems (5)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

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

net/core/filter.c

between commit:

3f4920d165b29 ("bpf: Reject redirect helpers without a bpf_net_context")

from the net tree and commit:

509ca545d4255 ("bpf: Support BPF_F_EGRESS with bpf_redirect_peer")

from the bpf-next tree.

I fixed it up (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.

net/core/filter.c +0 -0
diff --cc net/core/filter.c
index 11bb0d236822a,0b7afdd0ae474..0000000000000
@@@ -2575,13 -2578,12 +2580,13 @@@ static const struct bpf_func_proto bpf_
  
  BPF_CALL_2(bpf_redirect_peer, u32, ifindex, u64, flags)
  {
 -	struct bpf_redirect_info *ri = bpf_net_ctx_get_ri();
 +	struct bpf_redirect_info *ri;
  
- 	if (unlikely(!bpf_net_ctx_get() || flags))
 -	if (unlikely(flags & ~BPF_F_EGRESS))
++	if (unlikely(!bpf_net_ctx_get() || flags & ~BPF_F_EGRESS))
  		return TC_ACT_SHOT;
  
 +	ri = bpf_net_ctx_get_ri();
- 	ri->flags = BPF_F_PEER;
+ 	ri->flags = BPF_F_PEER | flags;
  	ri->tgt_index = ifindex;
  
  	return TC_ACT_REDIRECT;