Re: Newbie questions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Fri, 18 Jun 2021 17:37:17 -0300
"Ethy H. Brito" <ethy.brito@xxxxxxxxxxxx> wrote:

> On Fri, 18 Jun 2021 19:40:17 +0200
> Jesper Dangaard Brouer <brouer@xxxxxxxxxx> wrote:
> > On Fri, 18 Jun 2021 13:31:06 -0300
> > "Ethy H. Brito" <ethy.brito@xxxxxxxxxxxx> 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) 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:
> >

File edited. PR sent.

> > 
> >   
> > > 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.  

OK. I see that in source code.
But I am still pretty in the dark here to start using XDP.
More newbie questions are necessary.

My goal is simple: to control the bandwidth of a few (or a lot) thousands users using an of-the-shelf (almost) box. Two 10Gbps ether interface. One internal, one external.
What come in thru eth0 goes out to eth0 or eth1 and what comes in thru eth1 comes out to eth0. 

Is there a road map about what to execute and in what order to achieve this task using xdp-cpumap-tc?

I have cloned xdp-cpumap-tc to try figuring it out reading the source code. 
But things did not get together.

For instance, tc_classify_kern.c (as tc_queue_mapping_kern.c)  "talks" about a "manuel" (sic)

	tc qdisc  add dev ixgbe2 clsact
	tc filter add dev ixgbe2 egress bpf da obj tc_classify_kern.o sec tc_classify

At what point these commands are to be executed?
They are not mentioned anywhere else. ( forgot these perhaps?)

Which one is be to loaded tc_classify_kern or tc_queue_mapping_kern?
Or both? None? After and before what?

In the file tc_classify_kern.c, map_ifindex_type is defined differently from xdp_iphash_to_cpu_kern.c. 
	".size_value = sizeof(struct txq_config)" in the former
	".size_value = sizeof(__u32)" int the later.
Is this a "Cut and paste" typo? Are they really meant to be two different maps?

Anyway, a step by step guide would be appreciated.
Maybe it is time to start populating that BNG-router repo I was told about.
How can I start helping with that? Worth doing it?



[Index of Archives]     [Linux Networking Development]     [Fedora Linux Users]     [Linux SCTP]     [DCCP]     [Gimp]     [Yosemite Campsites]

  Powered by Linux