Re: [iovisor-dev] how to run bcc xdp_redirect_cpu.py example

2019-05-21 Thread Jesper Dangaard Brouer
On Wed, 22 May 2019 12:28:46 +0800
"Gary Lin"  wrote:

> On Tue, May 21, 2019 at 08:17:16PM -0700, forrest0...@gmail.com wrote:
> > Hi,
> > I’m new to bpf and when run `iovisor/bcc` examples with
> > `xdp_redirect_cpu.py` in my vm, the connection will lost and I have
> > to restart my vm. In my understanding this example just foword the
> > package from one cpu to another and the package should not lost. Am
> > I missing something? Anyone can help me? Thank you
> > 
> > PS: xdp is loaded in xdpgeneric mode
> >   
>
> CPUMAP is not supported by generic XDP(*). Besides, it provides very little
> benefit since the packet is already packaged into a skb and there is no need
> to package it again with another CPU.
> 
> (*) https://github.com/torvalds/linux/blob/v5.1/net/core/filter.c#L3560-L3563

Thanks you Gary, for pointing this out.  I added the TODO in the code,
and it is still on my todo list for CPUMAP here:

 https://github.com/xdp-project/xdp-project/blob/master/areas/cpumap.org

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#1675): https://lists.iovisor.org/g/iovisor-dev/message/1675
Mute This Topic: https://lists.iovisor.org/mt/31716133/21656
Group Owner: iovisor-dev+ow...@lists.iovisor.org
Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [iovisor-dev] how to run bcc xdp_redirect_cpu.py example

2019-05-21 Thread Gary Lin
On Tue, May 21, 2019 at 08:17:16PM -0700, forrest0...@gmail.com wrote:
> Hi, I’m new to bpf and when run `iovisor/bcc` examples with 
> `xdp_redirect_cpu.py` in my vm, the connection will lost and I have to 
> restart my vm. In my understanding this example just foword the package from 
> one cpu to another and the package should not lost. Am I missing something? 
> Anyone can help me? Thank you
> 
> PS: xdp is loaded in xdpgeneric mode
> 
CPUMAP is not supported by generic XDP(*). Besides, it provides very little
benefit since the packet is already packaged into a skb and there is no need
to package it again with another CPU.

Cheers,

Gary Lin

(*) https://github.com/torvalds/linux/blob/v5.1/net/core/filter.c#L3560-L3563

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#1674): https://lists.iovisor.org/g/iovisor-dev/message/1674
Mute This Topic: https://lists.iovisor.org/mt/31716133/21656
Group Owner: iovisor-dev+ow...@lists.iovisor.org
Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[iovisor-dev] how to run bcc xdp_redirect_cpu.py example

2019-05-21 Thread forrest0579
Hi, I’m new to bpf and when run `iovisor/bcc` examples with 
`xdp_redirect_cpu.py` in my vm, the connection will lost and I have to restart 
my vm. In my understanding this example just foword the package from one cpu to 
another and the package should not lost. Am I missing something? Anyone can 
help me? Thank you

PS: xdp is loaded in xdpgeneric mode

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#1671): https://lists.iovisor.org/g/iovisor-dev/message/1671
Mute This Topic: https://lists.iovisor.org/mt/31716133/21656
Group Owner: iovisor-dev+ow...@lists.iovisor.org
Unsubscribe: https://lists.iovisor.org/g/iovisor-dev/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-