[PATCHv8 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-15 Thread Hangbin Liu
| 11.4M 5.12 rc4 + patch | redirect_map multi i40e->i40e |1.9M | 8.9M 5.12 rc4 + patch | redirect_map multi i40e->veth |1.7M | 10.9M 5.12 rc4 + patch | redirect_map multi i40e->mlx4+veth |1.2M | 3.8M Acked-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- v8: u

[PATCHv8 bpf-next 4/4] selftests/bpf: add xdp_redirect_multi test

2021-04-15 Thread Hangbin Liu
Signed-off-by: Hangbin Liu --- v2: add a IPv6 test to validates that single redirect still works after multicast redirect. --- tools/testing/selftests/bpf/Makefile | 3 +- .../bpf/progs/xdp_redirect_multi_kern.c | 99 .../selftests/bpf/test_xdp_redirect_multi

[PATCHv8 bpf-next 3/4] sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test

2021-04-15 Thread Hangbin Liu
This is a sample for xdp redirect broadcast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Acked-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- samples/bpf/Makefile

[PATCHv8 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-15 Thread Hangbin Liu
map i40e->i40e |1.9M | 9.8M | 8.0M 5.12 rc4 + patch | xdp_redirect_map i40e->veth |1.7M | 12.0M | 9.4M Acked-by: Toke Høiland-Jørgensen Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Hangbin Liu --- v3: rebase the code based on Lorenzo's "Move drop error path to

[PATCHv8 bpf-next 0/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-15 Thread Hangbin Liu
the first key if the device get removed. After update the performace has improved 10% compired with v4. v4: Fix flags never cleared issue in patch 02. Update selftest to cover this. v3: Rebase the code based on latest bpf-next v2: fix flag renaming issue in patch 02 Hangbin Liu (3): xdp: extend

Re: [PATCHv7 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-14 Thread Hangbin Liu
On Wed, Apr 14, 2021 at 05:17:11PM -0700, Martin KaFai Lau wrote: > > static void bq_xmit_all(struct xdp_dev_bulk_queue *bq, u32 flags) > > { > > struct net_device *dev = bq->dev; > > - int sent = 0, err = 0; > > + int sent = 0, drops = 0, err = 0; > > + unsigned int cnt = bq->count; >

Re: [PATCHv7 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-14 Thread Hangbin Liu
On Wed, Apr 14, 2021 at 05:23:50PM -0700, Martin KaFai Lau wrote: > On Wed, Apr 14, 2021 at 08:26:08PM +0800, Hangbin Liu wrote: > [ ... ] > > > +static __always_inline int __bpf_xdp_redirect_map(struct bpf_map *map, u32 > > ifindex, > > +

[PATCHv7 bpf-next 4/4] selftests/bpf: add xdp_redirect_multi test

2021-04-14 Thread Hangbin Liu
ns1-4 Pass: xdpdrv ping ns1-2 Pass: xdpdrv ping ns1-3 Pass: xdpdrv ping ns1-4 Pass: xdpdrv ping6 ns1-2 Pass: xdpdrv ping6 ns1-1 number Pass: xdpdrv ping6 ns1-2 number Pass: xdpegress mac ns1-2 Pass: xdpegress mac ns1-3 Pass: xdpegress mac ns1-4 Summary: PASS 21, FAIL 0 Signed-off-by: Hangbin Liu ---

[PATCHv7 bpf-next 3/4] sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test

2021-04-14 Thread Hangbin Liu
This is a sample for xdp redirect broadcast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Signed-off-by: Hangbin Liu --- samples/bpf/Makefile | 3 + samples/bpf

[PATCHv7 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-14 Thread Hangbin Liu
| 11.4M 5.12 rc4 + patch | redirect_map multi i40e->i40e |1.9M | 8.9M 5.12 rc4 + patch | redirect_map multi i40e->veth |1.7M | 10.9M 5.12 rc4 + patch | redirect_map multi i40e->mlx4+veth |1.2M | 3.8M Signed-off-by: Hangbin Liu --- v7: no need to free xdpf in dev_map_en

[PATCHv7 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-14 Thread Hangbin Liu
map i40e->i40e |1.9M | 9.8M | 8.0M 5.12 rc4 + patch | xdp_redirect_map i40e->veth |1.7M | 12.0M | 9.4M Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Hangbin Liu --- v3: rebase the code based on Lorenzo's "Move drop error path to devmap for XDP_REDIREC

[PATCHv7 bpf-next 0/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-14 Thread Hangbin Liu
performace has improved 10% compired with v4. v4: Fix flags never cleared issue in patch 02. Update selftest to cover this. v3: Rebase the code based on latest bpf-next v2: fix flag renaming issue in patch 02 Hangbin Liu (3): xdp: extend xdp_redirect_map with broadcast support sample/bpf: add

[PATCHv6 bpf-next 3/4] sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test

2021-04-13 Thread Hangbin Liu
This is a sample for xdp redirect broadcast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Signed-off-by: Hangbin Liu --- samples/bpf/Makefile | 3 + samples/bpf

[PATCHv6 bpf-next 4/4] selftests/bpf: add xdp_redirect_multi test

2021-04-13 Thread Hangbin Liu
ns1-4 Pass: xdpdrv ping ns1-2 Pass: xdpdrv ping ns1-3 Pass: xdpdrv ping ns1-4 Pass: xdpdrv ping6 ns1-2 Pass: xdpdrv ping6 ns1-1 number Pass: xdpdrv ping6 ns1-2 number Pass: xdpegress mac ns1-2 Pass: xdpegress mac ns1-3 Pass: xdpegress mac ns1-4 Summary: PASS 21, FAIL 0 Signed-off-by: Hangbin Liu ---

[PATCHv6 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-13 Thread Hangbin Liu
| 11.4M 5.12 rc4 + patch | redirect_map multi i40e->i40e |1.9M | 8.9M 5.12 rc4 + patch | redirect_map multi i40e->veth |1.7M | 10.9M 5.12 rc4 + patch | redirect_map multi i40e->mlx4+veth |1.2M | 3.8M Signed-off-by: Hangbin Liu --- v6: Fix a skb leak in the error pat

[PATCHv6 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-13 Thread Hangbin Liu
map i40e->i40e |1.9M | 9.8M | 8.0M 5.12 rc4 + patch | xdp_redirect_map i40e->veth |1.7M | 12.0M | 9.4M Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Hangbin Liu --- v3: rebase the code based on Lorenzo's "Move drop error path to devmap for XDP_REDIREC

[PATCHv6 bpf-next 0/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-13 Thread Hangbin Liu
patch 02. Update selftest to cover this. v3: Rebase the code based on latest bpf-next v2: fix flag renaming issue in patch 02 Hangbin Liu (3): xdp: extend xdp_redirect_map with broadcast support sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test selftests/bpf: add

[PATCHv5 bpf-next 4/4] selftests/bpf: add xdp_redirect_multi test

2021-04-13 Thread Hangbin Liu
ns1-4 Pass: xdpdrv ping ns1-2 Pass: xdpdrv ping ns1-3 Pass: xdpdrv ping ns1-4 Pass: xdpdrv ping6 ns1-2 Pass: xdpdrv ping6 ns1-1 number Pass: xdpdrv ping6 ns1-2 number Pass: xdpegress mac ns1-2 Pass: xdpegress mac ns1-3 Pass: xdpegress mac ns1-4 Summary: PASS 21, FAIL 0 Signed-off-by: Hangbin Liu ---

[PATCHv5 bpf-next 3/4] sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test

2021-04-13 Thread Hangbin Liu
This is a sample for xdp redirect broadcast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Signed-off-by: Hangbin Liu --- samples/bpf/Makefile | 3 + samples/bpf

[PATCHv5 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-13 Thread Hangbin Liu
| 11.4M 5.12 rc4 + patch | redirect_map multi i40e->i40e |1.9M | 8.9M 5.12 rc4 + patch | redirect_map multi i40e->veth |1.7M | 10.9M 5.12 rc4 + patch | redirect_map multi i40e->mlx4+veth |1.2M | 3.8M Signed-off-by: Hangbin Liu --- v5: a) use xchg() instead of READ/

[PATCHv5 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-13 Thread Hangbin Liu
map i40e->i40e |1.9M | 9.8M | 8.0M 5.12 rc4 + patch | xdp_redirect_map i40e->veth |1.7M | 12.0M | 9.4M Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Hangbin Liu --- v3: rebase the code based on Lorenzo's "Move drop error path to devmap for XDP_REDIREC

[PATCHv5 bpf-next 0/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-13 Thread Hangbin Liu
patch 02 Hangbin Liu (3): xdp: extend xdp_redirect_map with broadcast support sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test selftests/bpf: add xdp_redirect_multi test Jesper Dangaard Brouer (1): bpf: run devmap xdp_prog on flush instead of bulk enqueue include/linux

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-11 Thread Hangbin Liu
On Fri, Apr 09, 2021 at 12:29:42PM -0600, Jason A. Donenfeld wrote: > On Fri, Apr 9, 2021 at 2:08 AM Hangbin Liu wrote: > > After offline discussion with Herbert, here is > > what he said: > > > > """ > > This is not a problem in RHEL8 because the

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-09 Thread Hangbin Liu
On Fri, Apr 09, 2021 at 09:08:20AM +0200, Stephan Mueller wrote: > > > > > > And how do you handle all the other places in the kernel that use > > > > > > ChaCha20 and > > > > > > SipHash?  For example, drivers/char/random.c? > > > > > > > > > > Good question, I will check it and reply to you late

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-08 Thread Hangbin Liu
On Thu, Apr 08, 2021 at 08:44:35PM -0600, Jason A. Donenfeld wrote: > Since it's just a normal module library, you can simply do this in the > module_init function, rather than deep within registration > abstractions. I did a try but looks it's not that simple. Not sure if it's because wireguard c

Re: [PATCHv4 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-08 Thread Hangbin Liu
On Thu, Apr 08, 2021 at 04:30:45PM -0700, John Fastabend wrote: > Hangbin, > > If possible please try to capture some of the design discussion in > the commit message on the next rev along with the tradeoffs we are making > so we don't lose these important details. Some of these points are fairly

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-08 Thread Hangbin Liu
On Thu, Apr 08, 2021 at 03:55:59PM -0600, Jason A. Donenfeld wrote: > On Thu, Apr 8, 2021 at 7:55 AM Simo Sorce wrote: > > > I'm not sure this makes so much sense to do _in wireguard_. If you > > > feel like the FIPS-allergic part is actually blake, 25519, chacha, and > > > poly1305, then wouldn't

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-08 Thread Hangbin Liu
On Thu, Apr 08, 2021 at 08:11:34AM -0700, Eric Biggers wrote: > On Thu, Apr 08, 2021 at 07:58:08PM +0800, Hangbin Liu wrote: > > On Thu, Apr 08, 2021 at 09:06:52AM +0800, Hangbin Liu wrote: > > > > Also, couldn't you just consider WireGuard to be outside your FIPS >

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-08 Thread Hangbin Liu
On Thu, Apr 08, 2021 at 09:06:52AM +0800, Hangbin Liu wrote: > > Also, couldn't you just consider WireGuard to be outside your FIPS module > > boundary, which would remove it from the scope of the certification? > > > > And how do you handle all the other places in

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-07 Thread Hangbin Liu
On Wed, Apr 07, 2021 at 03:15:51PM -0600, Jason A. Donenfeld wrote: > Hi Hangbin, > > On Wed, Apr 7, 2021 at 5:39 AM Hangbin Liu wrote: > > > > As the cryptos(BLAKE2S, Curve25519, CHACHA20POLY1305) in WireGuard are not > > FIPS certified, the WireGuard module shou

Re: [PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-07 Thread Hangbin Liu
On Wed, Apr 07, 2021 at 02:12:27PM -0700, Eric Biggers wrote: > On Wed, Apr 07, 2021 at 07:39:20PM +0800, Hangbin Liu wrote: > > As the cryptos(BLAKE2S, Curve25519, CHACHA20POLY1305) in WireGuard are not > > FIPS certified, the WireGuard module should be disabled in FIPS mode. >

[PATCH net-next] [RESEND] wireguard: disable in FIPS mode

2021-04-07 Thread Hangbin Liu
As the cryptos(BLAKE2S, Curve25519, CHACHA20POLY1305) in WireGuard are not FIPS certified, the WireGuard module should be disabled in FIPS mode. Signed-off-by: Hangbin Liu --- drivers/net/wireguard/main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireguard/main.c b

Re: [PATCH net-next] wireguard: disable in FIPS mode

2021-04-07 Thread Hangbin Liu
On Wed, Apr 07, 2021 at 06:43:07PM +0800, Hangbin Liu wrote: > As the cryptos(BLAKE2S, Curve25519, CHACHA20POLY1305) in WireGuard are not > FIPS certified, the WireGuard module should be disabled in FIPS mode. > > Signed-off-by: Hangbin Liu Ondrej remind that I need to cc linux-cr

[PATCH net-next] wireguard: disable in FIPS mode

2021-04-07 Thread Hangbin Liu
As the cryptos(BLAKE2S, Curve25519, CHACHA20POLY1305) in WireGuard are not FIPS certified, the WireGuard module should be disabled in FIPS mode. Signed-off-by: Hangbin Liu --- drivers/net/wireguard/main.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/net/wireguard/main.c b

Re: [PATCHv4 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-05 Thread Hangbin Liu
On Mon, Apr 05, 2021 at 05:24:48PM -0700, John Fastabend wrote: > Hangbin Liu wrote: > > This patch add two flags BPF_F_BROADCAST and BPF_F_EXCLUDE_INGRESS to extend > > xdp_redirect_map for broadcast support. > > > > Keep the general data path in net/core/filter.c and

[PATCHv4 bpf-next 4/4] selftests/bpf: add xdp_redirect_multi test

2021-04-02 Thread Hangbin Liu
ns1-4 Pass: xdpdrv ping ns1-2 Pass: xdpdrv ping ns1-3 Pass: xdpdrv ping ns1-4 Pass: xdpdrv ping6 ns1-2 Pass: xdpdrv ping6 ns1-1 number Pass: xdpdrv ping6 ns1-2 number Pass: xdpegress mac ns1-2 Pass: xdpegress mac ns1-3 Pass: xdpegress mac ns1-4 Summary: PASS 21, FAIL 0 Signed-off-by: Hangbin Liu ---

[PATCHv4 bpf-next 3/4] sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test

2021-04-02 Thread Hangbin Liu
This is a sample for xdp redirect broadcast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Signed-off-by: Hangbin Liu --- samples/bpf/Makefile | 3 + samples/bpf

[PATCHv4 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-02 Thread Hangbin Liu
40e->veth |1.7M | 12.0M 5.12 rc2 + patch | redirect_map multi i40e->i40e |1.6M | 7.8M 5.12 rc2 + patch | redirect_map multi i40e->veth |1.4M | 9.3M 5.12 rc2 + patch | redirect_map multi i40e->mlx4+veth |1.0M | 3.4M Signed-off-by: Hangbin Liu --- v4: a) add a n

[PATCHv4 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-04-02 Thread Hangbin Liu
>i40e |2.0M | 10.0M | 8.0M 5.12 rc2 + patch | xdp_redirect_map i40e->veth |1.8M | 12.4M | 9.5M Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Hangbin Liu --- v3: rebase the code based on Lorenzo's "Move drop error path to devmap for XDP_REDIRECT" v2: no

[PATCHv4 bpf-next 0/4] xdp: extend xdp_redirect_map with broadcast support

2021-04-02 Thread Hangbin Liu
latest bpf-next v2: fix flag renaming issue in patch 02 Hangbin Liu (3): xdp: extend xdp_redirect_map with broadcast support sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test selftests/bpf: add xdp_redirect_multi test Jesper Dangaard Brouer (1): bpf: run devmap

Re: [PATCHv3 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-31 Thread Hangbin Liu
On Wed, Mar 31, 2021 at 03:41:17PM +0200, Toke Høiland-Jørgensen wrote: > > @@ -1491,13 +1492,20 @@ static __always_inline int > > __bpf_xdp_redirect_map(struct bpf_map *map, u32 ifind > > */ > > ri->map_id = INT_MAX; /* Valid map id idr range: [1,INT_MAX[ */ > >

[PATCHv3 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-25 Thread Hangbin Liu
40e->veth |1.7M | 12.0M 5.12 rc2 + patch | redirect_map multi i40e->i40e |1.6M | 7.8M 5.12 rc2 + patch | redirect_map multi i40e->veth |1.4M | 9.3M 5.12 rc2 + patch | redirect_map multi i40e->mlx4+veth |1.0M | 3.4M Signed-off-by: Hangbin Liu --- v3: a) Rebas

[PATCHv3 bpf-next 4/4] selftests/bpf: add xdp_redirect_multi test

2021-03-25 Thread Hangbin Liu
ns1-2 Pass: xdpegress mac ns1-3 Pass: xdpegress mac ns1-4 Summary: PASS 15, FAIL 0 Signed-off-by: Hangbin Liu --- tools/testing/selftests/bpf/Makefile | 3 +- .../bpf/progs/xdp_redirect_multi_kern.c | 96 +++ .../selftests/bpf/test_xdp_redirect_multi.sh | 187 ++ .../sel

[PATCHv3 bpf-next 3/4] sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test

2021-03-25 Thread Hangbin Liu
This is a sample for xdp redirect broadcast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Signed-off-by: Hangbin Liu --- samples/bpf/Makefile | 3 + samples/bpf

[PATCHv3 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-03-25 Thread Hangbin Liu
>i40e |2.0M | 10.0M | 8.0M 5.12 rc2 + patch | xdp_redirect_map i40e->veth |1.8M | 12.4M | 9.5M Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Hangbin Liu --- v3: rebase the code based on Lorenzo's "Move drop error path to devmap for XDP_REDIRECT" v2: no

[PATCHv3 bpf-next 0/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-25 Thread Hangbin Liu
] https://lore.kernel.org/bpf/20210223125809.1376577-1-liuhang...@gmail.com v3: Rebase the code based on latest bpf-next v2: fix flag renaming issue in patch 02 Hangbin Liu (3): xdp: extend xdp_redirect_map with broadcast support sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast

Re: [PATCHv2 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-22 Thread Hangbin Liu
On Thu, Mar 18, 2021 at 03:19:47PM +0100, Toke Høiland-Jørgensen wrote: > Hangbin Liu writes: > > > On Wed, Mar 17, 2021 at 01:03:02PM +0100, Toke Høiland-Jørgensen wrote: > >> FYI, this no longer applies to bpf-next due to Björn's refactor in > >> commit: e

Re: [PATCH net] selftests: forwarding: vxlan_bridge_1d: Fix vxlan ecn decapsulate value

2021-03-21 Thread Hangbin Liu
On Sun, Mar 21, 2021 at 07:20:55PM +0200, Ido Schimmel wrote: > On Fri, Mar 19, 2021 at 10:33:14PM +0800, Hangbin Liu wrote: > > The ECN bit defines ECT(1) = 1, ECT(0) = 2. So inner 0x02 + outer 0x01 > > should be inner ECT(0) + outer ECT(1). Based on the description of > > _

[PATCH net] selftests: forwarding: vxlan_bridge_1d: Fix vxlan ecn decapsulate value

2021-03-19 Thread Hangbin Liu
x02 [FAIL] Expected to capture 10 packets, got 0. After the fix: TEST: VXLAN: ECN decap: 01/02->0x01 [ OK ] Fixes: a0b61f3d8ebf ("selftests: forwarding: vxlan_bridge_1d: Add an ECN decap test") Signed-off

Re: [PATCHv2 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-17 Thread Hangbin Liu
On Wed, Mar 17, 2021 at 01:03:02PM +0100, Toke Høiland-Jørgensen wrote: > FYI, this no longer applies to bpf-next due to Björn's refactor in > commit: ee75aef23afe ("bpf, xdp: Restructure redirect actions") Thanks Toke, I need to see how to get the map via map_id, does bpf_map_get_curr_or_next() w

Re: [PATCH net] selftests/bpf: set gopt opt_class to 0 if get tunnel opt failed

2021-03-14 Thread Hangbin Liu
On Fri, Mar 12, 2021 at 04:15:27PM +0100, Daniel Borkmann wrote: > On 3/12/21 2:56 AM, Hangbin Liu wrote: > > Hi David, > > > > May I ask what's the status of this patch? From patchwork[1] the state is > > accepted. But I can't find the fix on net or net-next.

Re: [PATCH net] selftests/bpf: set gopt opt_class to 0 if get tunnel opt failed

2021-03-11 Thread Hangbin Liu
11:22:14AM +0800, Hangbin Liu wrote: > When fixing the bpf test_tunnel.sh genve failure. I only fixed > the IPv4 part but forgot the IPv6 issue. Similar with the IPv4 > fixes 557c223b643a ("selftests/bpf: No need to drop the packet when > there is no geneve opt"), wh

Re: [PATCH net] selftests/bpf: set gopt opt_class to 0 if get tunnel opt failed

2021-03-09 Thread Hangbin Liu
On Wed, Mar 10, 2021 at 01:37:48AM +, patchwork-bot+netdev...@kernel.org wrote: > Hello: > > This patch was applied to netdev/net-next.git (refs/heads/master): > > On Tue, 9 Mar 2021 11:22:14 +0800 you wrote: > > When fixing the bpf test_tunnel.sh genve failure. I only fixed > > the IPv4 pa

[PATCHv2 bpf-next 4/4] selftests/bpf: add xdp_redirect_multi test

2021-03-09 Thread Hangbin Liu
ns1-2 Pass: xdpegress mac ns1-3 Pass: xdpegress mac ns1-4 Summary: PASS 15, FAIL 0 Signed-off-by: Hangbin Liu --- tools/testing/selftests/bpf/Makefile | 3 +- .../bpf/progs/xdp_redirect_multi_kern.c | 96 +++ .../selftests/bpf/test_xdp_redirect_multi.sh | 187 ++ .../sel

[PATCHv2 bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-09 Thread Hangbin Liu
| 11.9M 5.11 + patch | redirect_map_multi i40e->i40e |1.5M | 7.7M 5.11 + patch | redirect_map_multi i40e->veth |1.2M | 9.1M 5.11 + patch | redirect_map_multi i40e->mlx4+veth |0.9M | 3.2M v2: fix flag renaming issue in v1 Signed-off-by: Hangbin Liu ---

[PATCHv2 bpf-next 3/4] sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test

2021-03-09 Thread Hangbin Liu
This is a sample for xdp redirect broadcast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Signed-off-by: Hangbin Liu --- samples/bpf/Makefile | 3 + samples/bpf

[PATCHv2 bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-03-09 Thread Hangbin Liu
M | 9.7M 5.10 rc6 + patch | xdp_redirect_map i40e->i40e |2.0M | 9.5M | 7.5M 5.10 rc6 + patch | xdp_redirect_map i40e->veth |1.7M | 11.6M | 9.1M Reviewed-by: Maciej Fijalkowski Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Jesper Dangaard Br

[PATCHv2 bpf-next 0/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-09 Thread Hangbin Liu
] https://lore.kernel.org/bpf/20210223125809.1376577-1-liuhang...@gmail.com v2: fix flag renaming issue in patch 02 Hangbin Liu (3): xdp: extend xdp_redirect_map with broadcast support sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test selftests/bpf: add xdp_redirect_multi

Re: [PATCH bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-09 Thread Hangbin Liu
On Tue, Mar 09, 2021 at 10:09:41AM +0100, Daniel Borkmann wrote: > On 3/9/21 9:55 AM, Hangbin Liu wrote: > > On Tue, Mar 09, 2021 at 04:22:44PM +0800, kernel test robot wrote: > > > Hi Hangbin, > > > > > > Thank you for the patch! Yet something to improve: &g

Re: [PATCH bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-09 Thread Hangbin Liu
tps://github.com/0day-ci/linux/commits/Hangbin-Liu/xdp-extend-xdp_redirect_map-with-broadcast-support/20210309-153218 > base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git > master > config: s390-randconfig-s031-20210309 (attached as .config) > compiler: s3

[PATCH bpf-next 3/4] sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test

2021-03-08 Thread Hangbin Liu
This is a sample for xdp redirect broadcast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Signed-off-by: Hangbin Liu --- samples/bpf/Makefile | 3 + samples/bpf

[PATCH bpf-next 4/4] selftests/bpf: add xdp_redirect_multi test

2021-03-08 Thread Hangbin Liu
ns1-2 Pass: xdpegress mac ns1-3 Pass: xdpegress mac ns1-4 Summary: PASS 15, FAIL 0 Signed-off-by: Hangbin Liu --- tools/testing/selftests/bpf/Makefile | 3 +- .../bpf/progs/xdp_redirect_multi_kern.c | 96 +++ .../selftests/bpf/test_xdp_redirect_multi.sh | 187 ++ .../sel

[PATCH bpf-next 2/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-08 Thread Hangbin Liu
| 11.9M 5.11 + patch | redirect_map_multi i40e->i40e |1.5M | 7.7M 5.11 + patch | redirect_map_multi i40e->veth |1.2M | 9.1M 5.11 + patch | redirect_map_multi i40e->mlx4+veth |0.9M | 3.2M Signed-off-by: Hangbin Liu --- include/linux/bpf.h| 16 +++

[PATCH bpf-next 1/4] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-03-08 Thread Hangbin Liu
M | 9.7M 5.10 rc6 + patch | xdp_redirect_map i40e->i40e |2.0M | 9.5M | 7.5M 5.10 rc6 + patch | xdp_redirect_map i40e->veth |1.7M | 11.6M | 9.1M Reviewed-by: Maciej Fijalkowski Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Jesper Dangaard Br

[PATCH bpf-next 0/4] xdp: extend xdp_redirect_map with broadcast support

2021-03-08 Thread Hangbin Liu
] https://lore.kernel.org/bpf/20210223125809.1376577-1-liuhang...@gmail.com Hangbin Liu (3): xdp: extend xdp_redirect_map with broadcast support sample/bpf: add xdp_redirect_map_multi for redirect_map broadcast test selftests/bpf: add xdp_redirect_multi test Jesper Dangaard Brouer (1): bpf: run

[PATCH net] selftests/bpf: set gopt opt_class to 0 if get tunnel opt failed

2021-03-08 Thread Hangbin Liu
urns error, there is no need to drop the packets and break all geneve rx traffic. Just set opt_class to 0 and keep returning TC_ACT_OK at the end. Fixes: 933a741e3b82 ("selftests/bpf: bpf tunnel test.") Signed-off-by: Hangbin Liu --- tools/testing/selftests/bpf/progs/test_tunnel_kern.

[PATCH net] selftest/bpf: no need to drop the packet when there is no geneve opt

2021-02-24 Thread Hangbin Liu
0 in this test and keep returning TC_ACT_OK. Signed-off-by: Hangbin Liu --- tools/testing/selftests/bpf/progs/test_tunnel_kern.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/bpf/progs/test_tunnel_kern.c b/tools/testing/selftests

[PATCHv2 bpf-next] bpf: remove blank line in bpf helper description

2021-02-23 Thread Hangbin Liu
Add BPF-helper for MTU checking") Signed-off-by: Hangbin Liu --- v2: remove the blank line directly instead of adding a * --- include/uapi/linux/bpf.h | 1 - tools/include/uapi/linux/bpf.h | 1 - 2 files changed, 2 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/ua

[PATCHv20 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test

2021-02-23 Thread Hangbin Liu
y: PASS 24, FAIL 0 Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Hangbin Liu --- v16-v20: no update v15: use bpf_object__find_program_by_name instead of bpf_object__find_program_by_title v14: no update, only rebase the code v13: remove setrlimit v12: add devmap pr

[PATCHv20 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL

2021-02-23 Thread Hangbin Liu
FAILED Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Hangbin Liu --- tools/testing/selftests/bpf/test_verifier.c | 22 +- .../testing/selftests/bpf/verifier/map_ptr.c | 70 +++ 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/tools

[PATCHv20 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test

2021-02-23 Thread Hangbin Liu
This is a sample for xdp multicast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Acked-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- v16-v20: no update v15: use

[PATCHv20 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL

2021-02-23 Thread Hangbin Liu
argument check if there are multiple map pointers in the same function. Signed-off-by: Hangbin Liu --- v20: Fix multi map pointer compatibility check in check_helper_call() v13-v19: no update v11-v12: rebase the patch to latest bpf-next v10: remove useless CONST_PTR_TO_MAP_OR_NULL and Copy-paste comment

[PATCHv20 bpf-next 3/6] xdp: add a new helper for dev map multicast support

2021-02-23 Thread Hangbin Liu
can use direct calls to get better performace. [0] https://xdp-project.net/#Handling-multicast Acked-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- v20: remove an extra blank line in devmap_get_next_key() v16-v19: no update v15: a) Update bpf_redirect_map_multi() helper descript

[PATCHv20 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-02-23 Thread Hangbin Liu
M | 9.7M 5.10 rc6 + patch | xdp_redirect_map i40e->i40e |2.0M | 9.5M | 7.5M 5.10 rc6 + patch | xdp_redirect_map i40e->veth |1.7M | 11.6M | 9.1M Reviewed-by: Maciej Fijalkowski Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Jesper Dangaard Br

[PATCHv20 bpf-next 0/6] xdp: add a new helper for dev map multicast support

2021-02-23 Thread Hangbin Liu
the interface is not able to forward instead of abort the whole loop. e) Remove READ_ONCE/WRITE_ONCE for ex_map. v2: Add new syscall bpf_xdp_redirect_map_multi() which could accept include/exclude maps directly. Hangbin Liu (5): bpf: add a new bpf argument type ARG_CONST_MAP_P

[PATCH bpf-next] bpf: fix missing * in bpf.h

2021-02-23 Thread Hangbin Liu
quot;) Signed-off-by: Hangbin Liu --- include/uapi/linux/bpf.h | 2 +- tools/include/uapi/linux/bpf.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/bpf.h b/include/uapi/linux/bpf.h index 4c24daa43bac..46248f8e024b 100644 --- a/include/uapi/linux/bpf.

[PATCHv19 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL

2021-02-08 Thread Hangbin Liu
FAILED Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Hangbin Liu --- tools/testing/selftests/bpf/test_verifier.c | 22 +- .../testing/selftests/bpf/verifier/map_ptr.c | 70 +++ 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/tools

[PATCHv19 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test

2021-02-08 Thread Hangbin Liu
y: PASS 24, FAIL 0 Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Hangbin Liu --- v16-v19: no update v15: use bpf_object__find_program_by_name instead of bpf_object__find_program_by_title v14: no update, only rebase the code v13: remove setrlimit v12: add devmap pr

[PATCHv19 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test

2021-02-08 Thread Hangbin Liu
This is a sample for xdp multicast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Acked-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- v16-v19: no update v15: use

[PATCHv19 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-02-08 Thread Hangbin Liu
M | 9.7M 5.10 rc6 + patch | xdp_redirect_map i40e->i40e |2.0M | 9.5M | 7.5M 5.10 rc6 + patch | xdp_redirect_map i40e->veth |1.7M | 11.6M | 9.1M Reviewed-by: Maciej Fijalkowski Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Jesper Dangaard Br

[PATCHv19 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL

2021-02-08 Thread Hangbin Liu
Add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL which could be used when we want to allow NULL pointer for map parameter. The bpf helper need to take care and check if the map is NULL when use this type. Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Hangbin Liu

[PATCHv19 bpf-next 0/6] xdp: add a new helper for dev map multicast support

2021-02-08 Thread Hangbin Liu
rt the whole loop. e) Remove READ_ONCE/WRITE_ONCE for ex_map. v2: Add new syscall bpf_xdp_redirect_map_multi() which could accept include/exclude maps directly. Hangbin Liu (5): bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL xdp: add a new helper for dev map multicast support sample/bpf: a

[PATCHv19 bpf-next 3/6] xdp: add a new helper for dev map multicast support

2021-02-08 Thread Hangbin Liu
can use direct calls to get better performace. [0] https://xdp-project.net/#Handling-multicast Acked-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- v16-v19: no update v15: a) Update bpf_redirect_map_multi() helper description that ex_map must be keyed by ifindex. b) remove variabl

Re: [PATCHv17 bpf-next 0/6] xdp: add a new helper for dev map multicast support

2021-02-04 Thread Hangbin Liu
Hi John, On Thu, Feb 04, 2021 at 09:03:23AM -0800, Jakub Kicinski wrote: > New patchwork can actually find messages by Message-ID header. > > Just slap message ID of one of the patches at the end of: > > https://patchwork.kernel.org/project/netdevbpf/patch/ > > And there is a link to entire seri

[PATCHv18 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-02-04 Thread Hangbin Liu
M | 9.7M 5.10 rc6 + patch | xdp_redirect_map i40e->i40e |2.0M | 9.5M | 7.5M 5.10 rc6 + patch | xdp_redirect_map i40e->veth |1.7M | 11.6M | 9.1M Reviewed-by: Maciej Fijalkowski Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Jesper Dangaard Brouer

[PATCHv18 bpf-next 2/6] bpf: add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL

2021-02-04 Thread Hangbin Liu
Add a new bpf argument type ARG_CONST_MAP_PTR_OR_NULL which could be used when we want to allow NULL pointer for map parameter. The bpf helper need to take care and check if the map is NULL when use this type. Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Hangbin Liu

[PATCHv18 bpf-next 3/6] xdp: add a new helper for dev map multicast support

2021-02-04 Thread Hangbin Liu
can use direct calls to get better performace. [0] https://xdp-project.net/#Handling-multicast Acked-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu v16-v18: no update v15: a) Update bpf_redirect_map_multi() helper description that ex_map must be keyed by ifindex. b) remove variable las

[PATCHv18 bpf-next 4/6] sample/bpf: add xdp_redirect_map_multicast test

2021-02-04 Thread Hangbin Liu
This is a sample for xdp multicast. In the sample we could forward all packets between given interfaces. There is also an option -X that could enable 2nd xdp_prog on egress interface. Acked-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu v16-v18: no update v15: use

[PATCHv18 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test

2021-02-04 Thread Hangbin Liu
y: PASS 24, FAIL 0 Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Hangbin Liu v16-v18: no update v15: use bpf_object__find_program_by_name instead of bpf_object__find_program_by_title v14: no update, only rebase the code v13: remove setrlimit v12: add devmap pr

[PATCHv18 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL

2021-02-04 Thread Hangbin Liu
FAILED Acked-by: Toke Høiland-Jørgensen Acked-by: John Fastabend Signed-off-by: Hangbin Liu --- tools/testing/selftests/bpf/test_verifier.c | 22 +- .../testing/selftests/bpf/verifier/map_ptr.c | 70 +++ 2 files changed, 91 insertions(+), 1 deletion(-) diff --git a/tools

[PATCHv18 bpf-next 0/6] xdp: add a new helper for dev map multicast support

2021-02-04 Thread Hangbin Liu
dev_map_enqueue_multi() if the interface is not able to forward instead of abort the whole loop. e) Remove READ_ONCE/WRITE_ONCE for ex_map. v2: Add new syscall bpf_xdp_redirect_map_multi() which could accept include/exclude maps directly. Hangbin Liu (5): bpf: add a new bpf argument type AR

Re: [PATCHv17 bpf-next 0/6] xdp: add a new helper for dev map multicast support

2021-02-04 Thread Hangbin Liu
On Thu, Feb 04, 2021 at 01:09:22PM +0100, Maciej Fijalkowski wrote: > > I think I would just resubmit with a rebase + a note in the changelog > > that we concluded no further change was needed :) > > I only asked for imperative mood in commit messages, but not sure if > anyone cares ;) I will try

Re: [PATCHv17 bpf-next 0/6] xdp: add a new helper for dev map multicast support

2021-02-03 Thread Hangbin Liu
On Wed, Feb 03, 2021 at 06:53:20PM -0800, John Fastabend wrote: > Hangbin Liu wrote: > > Hi Daniel, Alexei, > > > > It has been one week after Maciej, Toke, John's review/ack. What should > > I do to make a progress for this patch set? > > > > P

Re: [PATCHv17 bpf-next 0/6] xdp: add a new helper for dev map multicast support

2021-02-03 Thread Hangbin Liu
Hi Daniel, Alexei, It has been one week after Maciej, Toke, John's review/ack. What should I do to make a progress for this patch set? Thanks Hangbin On Mon, Jan 25, 2021 at 08:45:10PM +0800, Hangbin Liu wrote: > This patch is for xdp multicast support. which has been discussed before[0

Re: [PATCHv17 bpf-next 6/6] selftests/bpf: add xdp_redirect_multi test

2021-01-28 Thread Hangbin Liu
Hi John, On Thu, Jan 28, 2021 at 03:37:09PM -0800, John Fastabend wrote: > Otherwise, its not the most elegant, but testing XDP at the moment > doesn't fit into the normal test framework very well either. Thanks a lot for your help in reviewing the patches. I will add updating XDP test in my todo

Re: [PATCHv17 bpf-next 5/6] selftests/bpf: Add verifier tests for bpf arg ARG_CONST_MAP_PTR_OR_NULL

2021-01-27 Thread Hangbin Liu
On Wed, Jan 27, 2021 at 02:24:47PM -0800, John Fastabend wrote: > [...] > > > +{ > > + "ARG_CONST_MAP_PTR_OR_NULL: null pointer for ex_map", > > + .insns = { > > + BPF_MOV64_IMM(BPF_REG_1, 0), > > + /* bpf_redirect_map_multi arg1 (in_map) */ > > + BPF_LD_MAP_FD(BP

Re: [PATCH net-next] bridge: Propagate NETDEV_NOTIFY_PEERS notifier

2021-01-27 Thread Hangbin Liu
On Wed, Jan 27, 2021 at 11:43:30AM +0200, Nikolay Aleksandrov wrote: > > For IGMP, although you said they are different. In my understanding, when > > bridge mac changed, we need to re-join multicast group, while a gratuitous > > ARP is also needed. I couldn't find a reason why IGMP message is OK b

Re: [PATCH net-next] bridge: Propagate NETDEV_NOTIFY_PEERS notifier

2021-01-26 Thread Hangbin Liu
On Tue, Jan 26, 2021 at 04:55:22PM +0200, Nikolay Aleksandrov wrote: > >> Thanks for the reply. There are a few reasons I think the bridge should > >> handle NETDEV_NOTIFY_PEERS: > >> > >> 1. Only a few devices will call NETDEV_NOTIFY_PEERS notifier: bond, team, > >>virtio, xen, 6lowpan. There

[PATCHv17 bpf-next 1/6] bpf: run devmap xdp_prog on flush instead of bulk enqueue

2021-01-26 Thread Hangbin Liu
Høiland-Jørgensen Signed-off-by: Jesper Dangaard Brouer Signed-off-by: Hangbin Liu --- v17: a) rename to_sent to to_send. b) clear bq dev_rx, xdp_prog and flush_node in __dev_flush(). v16: a) refactor bq_xmit_all logic and remove error label v15: a) do not use unlikely when checking bq->

[PATCHv17 bpf-next 3/6] xdp: add a new helper for dev map multicast support

2021-01-26 Thread Hangbin Liu
calls to get better performace. [0] https://xdp-project.net/#Handling-multicast Acked-by: Toke Høiland-Jørgensen Signed-off-by: Hangbin Liu --- v16-v17: no update v15: a) Update bpf_redirect_map_multi() helper description that ex_map must be keyed by ifindex. b) remove variable last_one

  1   2   3   4   5   6   7   8   >