| 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
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
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
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
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
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;
>
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,
> > +
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
---
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
| 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
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
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
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
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
---
| 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
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
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
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
---
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
| 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/
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
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
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
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
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
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
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
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
>
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
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
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.
>
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
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
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
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
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
---
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
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
>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
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
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[ */
> >
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
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
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
>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
] 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
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
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
> > _
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
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
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.
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
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
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
| 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
---
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
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
] 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
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
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
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
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
| 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 +++
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
] 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
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.
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
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
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
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
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
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
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
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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->
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 - 100 of 726 matches
Mail list logo