Re: Newbie questions

"Ethy H. Brito" <[email protected]>
Newsgroups org.kernel.vger.xdp-newbies
Organization InterNexo Ltda.
Message-ID <20210618173717.581e1058@babalu>
On Fri, 18 Jun 2021 19:40:17 +0200
Jesper Dangaard Brouer <[email protected]> wrote:

> On Fri, 18 Jun 2021 13:31:06 -0300
> "Ethy H. Brito" <[email protected]> wrote:
> 
> > Hi All.
> > 
> > I've been doing some home work reading the docs and some doubts have raised.
> > For reference, my environment is 
> > 	Ubuntu 20.04
> > 	kernel 5.4.0-66 
> > 	tc utility, iproute2-ss200127.
> > 
> > 1) https://xdp-project.net/areas/cpumap.html#cpumap--Create-script-MQ-HTB-silo-setup says that: 
> > 	"XPS (Transmit Packet Steering) will take precedence over any changes to 
> > 	skb->queue_mapping. You need to disable *XDP* via mask=00 in files 
> > 	/sys/class/net/DEV/queues/tx-*/xps_cpus"
> > 
> > Shouldn't it say I need to disable *XPS* (not XDP) using mask=00??  
> 
> You are absolutely right it is a typo. Can I ask you to fix that and
> send a GitHub PR?
> 
> The file you need to change is:
>  https://github.com/xdp-project/xdp-project/blob/master/areas/cpumap.org
> 

I'll have to figure it out how to do that. 
Never edited a GitHub before.

>  
> > 2) Taking tc_mq_htb_setup_example.sh as reference, how to enable XDP?  
> 
> XDP gets enabled when you load an XDP program.

Ok.

> 
> > Since I have to disable XPS, I assume I have to enable something in
> > replacement, right?  
> 
> No, XPS is just a kernel feature you need to disable, because it
> conflicts with the TC-BPF program usage of skb->queue_mapping.

Pretty advanced topic. But I'll get there.

> 
> 
> > How to set that CPU-0 will deal with mq queue 7FFF:1, CPU-1 will deal
> > with 7FFF:2, and so on?  
> 
> That is the role of the XDP program that redirect into a cpumap, and
> the key in the cpumap is the CPU number.

You mean I have to master this tutorial:
https://github.com/xdp-project/xdp-tutorial/blob/master/setup_dependencies.org

right?

> 
>  
> > 3) Is XDP available in kernel 5.4.0 ?  
> 
> I think so.
> 
> The real question is what NIC card drivers are you using?

driver=i40e driverversion=2.8.20-k duplex=full firmware=8.15

Is it ok for xdp use?

> 
> 
> > 4) Is XPS a suitable "substitute" for XDP ?  
> 
> XPS and XDP are completely unrelated kernel features.

I thought their both primary goal was to redirect packets to be handled by a specific CPU.

The difference would be that XDP does this upstream compared with XPS.
At least, I understand this way reading
https://developers.redhat.com/blog/2021/05/13/receive-side-scaling-rss-with-ebpf-and-cpumap#
 at "Faster software receive steering with XDP" paragraph
Is my understanding incorrect?

Regards

Ethy


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


-- 

Ethy H. Brito         /"\
InterNexo Ltda.       \ /  CAMPANHA DA FITA ASCII - CONTRA MAIL HTML
+55 (12) 3797-6860     X   ASCII RIBBON CAMPAIGN - AGAINST HTML MAIL
S.J.Campos - Brasil   / \ 
 
PGP key: http://www.inexo.com.br/~ethy/0xC3F222A0.asc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.