[PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-05-26 Thread Hangbin Liu
Hi all, This patchset is for xdp multicast support, which has been discussed before[0]. The goal is to be able to implement an OVS-like data plane in XDP, i.e., a software switch that can forward XDP frames to multiple ports. To achieve this, an application needs to specify a group of interfaces

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-16 Thread Jesper Dangaard Brouer
On Wed, 27 May 2020 17:04:50 +0200 Toke Høiland-Jørgensen wrote: > Hangbin Liu writes: > > > On Wed, May 27, 2020 at 12:21:54PM +0200, Toke Høiland-Jørgensen > > wrote: > >> > The example in patch 2 is functional, but not a lot of effort > >> > has been made on performance optimisation

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-16 Thread Hangbin Liu
On Tue, Jun 16, 2020 at 11:09:22AM +0200, Jesper Dangaard Brouer wrote: > > > BTW, when using pktgen, I got an panic because the skb don't have enough > > > header room. The code path looks like > > > > > > do_xdp_generic() > > > - netif_receive_generic_xdp() > > > - skb_headroom(skb) < XDP_P

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-05-27 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > Hi all, > > This patchset is for xdp multicast support, which has been discussed > before[0]. The goal is to be able to implement an OVS-like data plane in > XDP, i.e., a software switch that can forward XDP frames to multiple > ports. > > To achieve this, an application nee

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-05-27 Thread Eelco Chaudron
On 27 May 2020, at 12:21, Toke Høiland-Jørgensen wrote: Hangbin Liu writes: Hi all, This patchset is for xdp multicast support, which has been discussed before[0]. The goal is to be able to implement an OVS-like data plane in XDP, i.e., a software switch that can forward XDP frames to m

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-05-27 Thread Hangbin Liu
On Wed, May 27, 2020 at 12:21:54PM +0200, Toke Høiland-Jørgensen wrote: > > The example in patch 2 is functional, but not a lot of effort > > has been made on performance optimisation. I did a simple test(pkt size 64) > > with pktgen. Here is the test result with BPF_MAP_TYPE_DEVMAP_HASH > > arrays

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-05-27 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > On Wed, May 27, 2020 at 12:21:54PM +0200, Toke Høiland-Jørgensen wrote: >> > The example in patch 2 is functional, but not a lot of effort >> > has been made on performance optimisation. I did a simple test(pkt size 64) >> > with pktgen. Here is the test result with BP

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-02 Thread Hangbin Liu
On Wed, May 27, 2020 at 12:21:54PM +0200, Toke Høiland-Jørgensen wrote: > > The example in patch 2 is functional, but not a lot of effort > > has been made on performance optimisation. I did a simple test(pkt size 64) > > with pktgen. Here is the test result with BPF_MAP_TYPE_DEVMAP_HASH > > arrays

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-03 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > On Wed, May 27, 2020 at 12:21:54PM +0200, Toke Høiland-Jørgensen wrote: >> > The example in patch 2 is functional, but not a lot of effort >> > has been made on performance optimisation. I did a simple test(pkt size 64) >> > with pktgen. Here is the test result with BP

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-03 Thread Hangbin Liu
On Wed, Jun 03, 2020 at 01:05:28PM +0200, Toke Høiland-Jørgensen wrote: > > Hi Toke, > > > > Here is the result I tested with 2 i40e 10G ports on physical machine. > > The pktgen pkt_size is 64. > > These numbers seem a bit low (I'm getting ~8.5MPPS on my test machine > for a simple redirect). Som

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-04 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > On Wed, Jun 03, 2020 at 01:05:28PM +0200, Toke Høiland-Jørgensen wrote: >> > Hi Toke, >> > >> > Here is the result I tested with 2 i40e 10G ports on physical machine. >> > The pktgen pkt_size is 64. >> >> These numbers seem a bit low (I'm getting ~8.5MPPS on my test m

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-04 Thread Hangbin Liu
On Thu, Jun 04, 2020 at 11:44:24AM +0200, Toke Høiland-Jørgensen wrote: > Hangbin Liu writes: > > Here is the test topology, which looks like > > > > Host A| Host B|Host C > > eth0 +eth0 - eth1+eth0 > > > > I did pktgen sending on Host A, forwarding o

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-04 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > On Thu, Jun 04, 2020 at 11:44:24AM +0200, Toke Høiland-Jørgensen wrote: >> Hangbin Liu writes: >> > Here is the test topology, which looks like >> > >> > Host A| Host B|Host C >> > eth0 +eth0 - eth1+eth0 >> > >> > I did p

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-04 Thread Hangbin Liu
On Thu, Jun 04, 2020 at 02:37:23PM +0200, Toke Høiland-Jørgensen wrote: > > Now I use the ethtool_stats.pl to count forwarding speed and here is the > > result: > > > > With kernel 5.7(ingress i40e, egress i40e) > > XDP: > > bridge: 1.8M PPS > > xdp_redirect_map: > > generic mode: 1.9M PPS > >

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-04 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > On Thu, Jun 04, 2020 at 02:37:23PM +0200, Toke Høiland-Jørgensen wrote: >> > Now I use the ethtool_stats.pl to count forwarding speed and here is the >> > result: >> > >> > With kernel 5.7(ingress i40e, egress i40e) >> > XDP: >> > bridge: 1.8M PPS >> > xdp_redirect_ma

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-04 Thread Hangbin Liu
On Thu, Jun 04, 2020 at 06:02:54PM +0200, Toke Høiland-Jørgensen wrote: > Hangbin Liu writes: > > > On Thu, Jun 04, 2020 at 02:37:23PM +0200, Toke Høiland-Jørgensen > > wrote: > >> > Now I use the ethtool_stats.pl to count forwarding speed and here is the > >> > result: > >> > > >> > With

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-08 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > On Thu, Jun 04, 2020 at 06:02:54PM +0200, Toke Høiland-Jørgensen wrote: >> Hangbin Liu writes: >> >> > On Thu, Jun 04, 2020 at 02:37:23PM +0200, Toke Høiland-Jørgensen >> > wrote: >> >> > Now I use the ethtool_stats.pl to count forwarding speed and here is >> >> >

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-08 Thread Hangbin Liu
On Mon, Jun 08, 2020 at 05:32:54PM +0200, Toke Høiland-Jørgensen wrote: > Hangbin Liu writes: > > > On Thu, Jun 04, 2020 at 06:02:54PM +0200, Toke Høiland-Jørgensen wrote: > >> Hangbin Liu writes: > >> > >> > On Thu, Jun 04, 2020 at 02:37:23PM +0200, Toke Høiland-Jørgensen > >> > wrote:

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-09 Thread Toke Høiland-Jørgensen
Hangbin Liu writes: > On Mon, Jun 08, 2020 at 05:32:54PM +0200, Toke Høiland-Jørgensen wrote: >> Hangbin Liu writes: >> >> > On Thu, Jun 04, 2020 at 06:02:54PM +0200, Toke Høiland-Jørgensen wrote: >> >> Hangbin Liu writes: >> >> >> >> > On Thu, Jun 04, 2020 at 02:37:23PM +0200, Toke Høilan

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-09 Thread Hangbin Liu
On Tue, Jun 09, 2020 at 10:31:19PM +0200, Toke Høiland-Jørgensen wrote: > > Oh, sorry for the typo, the numbers make me crazy, it should be only > > ingress i40e, egress veth. Here is the right description: > > > > Kernel 5.7 + my patch(ingress i40e, egress i40e) > > xdp_redirect_map: > > generic

Re: [PATCHv4 bpf-next 0/2] xdp: add dev map multicast support

2020-06-10 Thread Jesper Dangaard Brouer
On Wed, 10 Jun 2020 10:35:08 +0800 Hangbin Liu wrote: > On Tue, Jun 09, 2020 at 10:31:19PM +0200, Toke Høiland-Jørgensen wrote: > > > Oh, sorry for the typo, the numbers make me crazy, it should be only > > > ingress i40e, egress veth. Here is the right description: > > > > > > Kernel 5.7 + my