public inbox for xdp-newbies@vger.kernel.org
 help / color / mirror / Atom feed
From: "Ethy H. Brito" <ethy.brito@inexo.com.br>
To: "xdp-newbies@vger.kernel.org" <xdp-newbies@vger.kernel.org>,
	Jesper Dangaard Brouer <brouer@redhat.com>
Subject: Re: Newbie questions
Date: Mon, 21 Jun 2021 22:28:09 -0300	[thread overview]
Message-ID: <20210621222809.2d7633cc@babalu> (raw)
In-Reply-To: <20210618173717.581e1058@babalu>

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

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

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)
setup:

	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. (tc_mq_htb_setup_example.sh 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
and  
	".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?

Regards 

Ethy

  reply	other threads:[~2021-06-22  1:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-18 16:31 Newbie questions Ethy H. Brito
2021-06-18 17:40 ` Jesper Dangaard Brouer
2021-06-18 20:37   ` Ethy H. Brito
2021-06-22  1:28     ` Ethy H. Brito [this message]
2021-06-22  9:18       ` Jesper Dangaard Brouer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210621222809.2d7633cc@babalu \
    --to=ethy.brito@inexo.com.br \
    --cc=brouer@redhat.com \
    --cc=xdp-newbies@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox