Re: how to run bcc xdp_redirect_cpu.py example


Jesper Dangaard Brouer
 

On Wed, 22 May 2019 12:28:46 +0800
"Gary Lin" <glin@...> wrote:

On Tue, May 21, 2019 at 08:17:16PM -0700, forrest0579@... 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

Join {iovisor-dev@lists.iovisor.org to automatically receive all group messages.