henrist / aqmt-fq-codel-scheduler

FQ-CoDel scheduler to be used with AQM test framework
1 stars 0 forks source link

Unable to use fq_codel aqm #1

Open Blandine11 opened 3 years ago

Blandine11 commented 3 years ago

Hello guys,

I need your help please.

I'm trying to use your AQM's patch to do some tests but it does not works.

Can you help me step by step how to apply your API that makes change in IP ID field to insert drops and delay, please ?

What I already done is to clone this git repository , then cd in it and do : CPATH=/path/to/aqmt/common make make load to load the module. But when I try to use the aqm witth ''tc'', I have this error : unknow qdisc I think that I don't understand very well the steps to install and use it.

What I want to know firstly is that:

1)To use this aqm, I must to download iproute2?

2/ If yes, Then I need to replace the aqm source code file in tc directory with yours ? Or how can I do, please ?

Thank you !

henrist commented 3 years ago

Hey!

What Linux kernal version are you using? It's been a while since I've been working on this, so it might need a few updates to be compatible with newer kernels. Are you looking for measuring the fq_codel scheduler in particular?

You will need iproute2 to have the ip, tc command etc to modify the traffic controller and network setup. It sounds like you already have it in place. You can verify by running tc -V and ip -V.

What command are you running that gives you the unknown qdisc message?

Blandine11 commented 3 years ago

Hello,

I use ubuntu 18.04 bionic with the kernel version 5.10.0-051000-generic Yes, I have tc already installed, perhaps I nead to uninstall it and reinstall with iproute2 package? tc -V gives me this result :iproute2-ss180129 The command that I use is : tc qdisc add dev ens3 root fq_codel limit 10000 And the error is : ``Unknown qdisc "fq_codel", hence option "limit" is unparsable.

So, my question remains. If for example I have tc installed, what I need to do is: 1- download, your fq_codel patch :git clone https://github.com/henrist/aqmt-fq-codel-scheduler.git

2-download the aqmt repository to have the path to common directory: https://github.com/henrist/aqmt.git

3 - Move to fq_codel directory: cd aqmt-fq-codel-scheduler

4 - build it while indicating the common path: CPATH=../aqmt/common & make

5 - Load the module : make load

If I mistake on the steps to use your aqms, please tells me.

I try to use your patch for dualpi2 but the same. I think the probleme come from the steps to install them.

Help me, please.

henrist commented 3 years ago

I see. The repos here haven't been maintained actively for some time. It seems the current state of this repo matches kernel 4.11. There have been quite some changes to this since then (see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/net/sched/sch_fq_codel.c?id=v4.11&id2=v5.10) which is probably why you cannot load the module. This will most likely need to be patched in this repo.

I assume you can add the fs_codel qdisc without loading the module first? It will use the scheduler already included on your system which should not fail (but of cause will miss the ta code).

4 - build it while indicating the common path: CPATH=../aqmt/common & make

I suppose you did not intend to include the & there, as it would run the preceding command in the background.

Blandine11 commented 3 years ago

Ok, I see.

But can you confirme that the steps that I followed to install is good? Concerning the word ''to patch''. Here, it means to replace the existingsch_fq_codel.c file with what you give in the link above? If no, can you tell me how to patch it ?

Excuse me, I'm new on github.

henrist commented 3 years ago

Your list looks correct. I assume you run make load with root.

I was wrong about the version. For some reason the kernel-reference branch was never updated. The current state represents v4.20. (diff)

What I've done previously is to extract the commits modifying the files from linux code, and add these into the kernel-reference branch, and then merge this into master and handling any conflicts. This way it is easier to keep track of new additions that need to be included.

But the important part is to get the tc code. So you can also take the version from the kernel tree and patch it with the tc code. You can see it here: https://github.com/henrist/aqmt-fq-codel-scheduler/compare/kernel-reference...master

I'm not up-to-date with recent changes in kernel code, so I'll have to find some time available, e.g. during the weekend, to look deeper into it if needed.

Blandine11 commented 3 years ago

Hello,

Thank you again for your help.

But like I said, I'm new in using linux and github so some expressions that use like 'comit', 'kernel-branch', 'to patch' are not meaningful for me. I ask you about fq_codel but my goal is to use your patch for dualpi2 ( https://github.com/olgaalb/sch_dualpi2/issues) because I need to do some experiences in L4S with your API that inserts drops and delay informations in IP's ID field. So please, like a README.md, can you show me step by step how can I install your dualpi2's patch in an existence ubuntu machine? In the README of dualpi2 aqm (https://github.com/olgaalb/sch_dualpi2), they ask us to download iproute2 and ''apply the patch''. What is the meaning of the expression ''apply the patch'' here? What I did is to copy the dualpi2 files into iproute2/tc directory. Am I right? If no, please tell me how to apply the patch, please.

Regards

Le jeu. 28 janv. 2021 à 22:54, Henrik Steen notifications@github.com a écrit :

Your list looks correct. I assume you run make load with root.

I was wrong about the version. For some reason the kernel-reference branch was never updated. The current state represents v4.20. (diff https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/net/sched/sch_fq_codel.c?id=v4.20&id2=v5.10 )

What I've done previously is to extract the commits modifying the files from linux code, and add these into the kernel-reference branch, and then merge this into master and handling any conflicts. This way it is easier to keep track of new additions that need to be included.

But the important part is to get the tc code. So you can also take the version from the kernel tree and patch it with the tc code. You can see it here: kernel-reference...master diff-34ec8a788726fe3b103e719ef8af46f905360ffe40ebeb8053a5a4f2bf37c75e https://github.com/henrist/aqmt-fq-codel-scheduler/compare/kernel-reference...masterdiff-34ec8a788726fe3b103e719ef8af46f905360ffe40ebeb8053a5a4f2bf37c75e

I'm not up-to-date with recent changes in kernel code, so I'll have to find some time available, e.g. during the weekend, to look deeper into it if needed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/henrist/aqmt-fq-codel-scheduler/issues/1#issuecomment-769424425, or unsubscribe https://github.com/notifications/unsubscribe-auth/AINCMMNQCBOH7B2WGWLZVPLS4HMJRANCNFSM4WW6YSSQ .

henrist commented 3 years ago

Apologize for the confusion.

The patch for fq_codel in this repo is out-of-date. It will need to be brought up-to-date before you can use it. You should be able to achieve it by applying a similar patch as I linked in the previous comment. By kernel-reference branch I was refering to the Git branch: https://github.com/henrist/aqmt-fq-codel-scheduler/tree/kernel-reference - I can try to have a look through this during the weekend, but unfortunately I cannot promise I have time.

By "patch" I mean you can't just drop in a different file. It will need to be modified so that it contains the newer changes from Linux, and at the same time having the code that handles the IP ID field.

Regarding iproute2: For using dualpi2 you have to install a patched version of iproute2 since it needs to know about the API specific for dualpi2 specific. See here: https://github.com/L4STeam/iproute2

Blandine11 commented 3 years ago

Thanks, I'll check it out.

But can you juste show me how to create and apply the patch of dualpi2 , please. If you can do it like an exemple, it will be more clear for me. You can just call the repository of dualpi2 ´´dualpi2´´ and the repository of iproute2 ´´iproute2´´ and show me how to create and apply the patch between them step by step or command by command.

Think you again for your help

Le ven. 29 janv. 2021 à 11:58, Henrik Steen notifications@github.com a écrit :

Apologize for the confusion.

The patch for fq_codel in this repo is out-of-date. It will need to be brought up-to-date before you can use it. You should be able to achieve it by applying a similar patch as I linked in the previous comment. By kernel-reference branch I was refering to the Git branch: https://github.com/henrist/aqmt-fq-codel-scheduler/tree/kernel-reference

  • I can try to have a look through this during the weekend, but unfortunately I cannot promise I have time.

By "patch" I mean you can't just drop in a different file. It will need to be modified so that it contains the newer changes from Linux, and at the same time having the code that handles the IP ID field.

Regarding iproute2: For using dualpi2 you have to install a patched version of iproute2 since it needs to know about the API specific for dualpi2 specific. See here: https://github.com/L4STeam/iproute2

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/henrist/aqmt-fq-codel-scheduler/issues/1#issuecomment-769735015, or unsubscribe https://github.com/notifications/unsubscribe-auth/AINCMMNPUB32AOTBYGCKBL3S4KIGZANCNFSM4WW6YSSQ .

henrist commented 3 years ago

I've updated the patch of this repo, so it is now in sync with Linux 5.10. I'm currently on a system where fq_codel is builtin (5.10.11-arch1-1 #1 SMP PREEMPT Wed, 27 Jan 2021 13:53:16 +0000 x86_64 GNU/Linux), so I cannot override it. Do you mind trying to see if you can make and load it successfully? I've also updated https://github.com/henrist/aqmt-pfifo-scheduler and https://github.com/henrist/aqmt-pie-scheduler and they seem to load fine.

Regarding dualpi2 I'm not currently up-to-date on its state. I think the repo at https://github.com/olgaalb/sch_dualpi2/ is not the latest code. It seems newer additions are made at https://github.com/L4STeam/linux/commits/testing/net/sched/sch_dualpi2.c. Maybe @olgaalb can provide some details and where to look for the latest version.

Regarding iproute2 you should be able to follow its documentation and normal conventions, e.g. make and make install. Have a look at the README in https://github.com/L4STeam/iproute2

Do you mind sharing some more details of what your mission is?

henrist commented 3 years ago

Or maybe @oliviertilmans can shed some light on the current state. I'm not sure who is involved in what at the current time.

Blandine11 commented 3 years ago

Ok thank you.

As fare as concern my project, I want to do some test in L4S architecture. So, I want to use dualpi2 with your API to get the latence and total drops. With the new update, can you give some details in the README on the maner to download, patch, build and load, please ?

Regards

Le dim. 31 janv. 2021 à 19:06, Henrik Steen notifications@github.com a écrit :

I've updated the patch of this repo, so it is now in sync with Linux 5.10. I'm currently on a system where fq_codel is builtin (5.10.11-arch1-1 #1 SMP PREEMPT Wed, 27 Jan 2021 13:53:16 +0000 x86_64 GNU/Linux), so I cannot override it. Do you mind trying to see if you can make and load it successfully? I've also updated https://github.com/henrist/aqmt-pfifo-scheduler and https://github.com/henrist/aqmt-pie-scheduler and they seem to load fine.

Regarding dualpi2 I'm not currently up-to-date on its state. I think the repo at https://github.com/olgaalb/sch_dualpi2/ is not the latest code. It seems newer additions are made at https://github.com/L4STeam/linux/commits/testing/net/sched/sch_dualpi2.c. Maybe @olgaalb https://github.com/olgaalb can provide some details and where to look for the latest version.

Regarding iproute2 you should be able to follow its documentation and normal conventions, e.g. make and make install. Have a look at the README in https://github.com/L4STeam/iproute2

Do you mind sharing some more details of what your mission is?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/henrist/aqmt-fq-codel-scheduler/issues/1#issuecomment-770423674, or unsubscribe https://github.com/notifications/unsubscribe-auth/AINCMMLG6NCCSWO6CRLVHIDS4WL3FANCNFSM4WW6YSSQ .

henrist commented 3 years ago

Did you solve the initial issue with tc qdisc with my updated code? The README already describes the details. With it you should be able to run the traffic analyzer and collect metrics. As for the traffic analyzer see the Makefile for how to build it. You should be able to run ./analyzer after building it. You should verify this works as a first step.

In order for you to test dualpi2, you will first have to locate the latest version. I think it should be what I linked to above in the linux repo. That version does not contain the code required to use it with the testbed / traffic analyzer. You either have to patch it yourself (see the IS_TESTBED macros in the older dualpi2 repo, and also how it is applied to e.g. this repo), or maybe there exists some other repo I'm currently not familiar with. You will likely need to copy this out-of-tree and build it similar as the older repo (so it behaves similar as this repo, so you can load it). I haven't touched this myself for a few years, so sorry I cannot be of much more help right now.

Blandine11 commented 3 years ago

Thanks, I'll check it out.

Le dim. 31 janv. 2021 à 22:53, Henrik Steen notifications@github.com a écrit :

Did you solve the initial issue with tc qdisc with my updated code? The README already describes the details. With it you should be able to run the traffic analyzer and collect metrics. As for the traffic analyzer see the Makefile https://github.com/henrist/aqmt/blob/master/aqmt/ta/Makefile#L2 for how to build it. You should be able to run ./analyzer after building it. You should verify this works as a first step.

In order for you to test dualpi2, you will first have to locate the latest version. I think it should be what I linked to above in the linux repo. That version does not contain the code required to use it with the testbed / traffic analyzer. You either have to patch it yourself (see the IS_TESTBED macros in the older dualpi2 repo, and also how it is applied to e.g. this repo), or maybe there exists some other repo I'm currently not familiar with. You will likely need to copy this out-of-tree and build it similar as the older repo (so it behaves similar as this repo, so you can load it). I haven't touched this myself for a few years, so sorry I cannot be of much more help right now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/henrist/aqmt-fq-codel-scheduler/issues/1#issuecomment-770457403, or unsubscribe https://github.com/notifications/unsubscribe-auth/AINCMMOPSA5Z7Z6MUPVZGLTS4XGMLANCNFSM4WW6YSSQ .

Blandine11 commented 3 years ago

Hello Henrist,

Excuse me to answer so late. I have tried to test the pfifo aqm but it failed when I tried to apply the patch on iproute2 repository. I followed your updated README.md 1: I download the githut repository of pfifo aqm with git clone https://github.com/henrist/aqmt-pfifo-scheduler.git 2: I download iproute2's github repository too: git clone https://github.com/L4STeam/iproute2.git 3: I move to iproute2/tc directory to apply the patch located at aqmt-pfifo-scheduler/iproute2.patch : cd iproute2/tc git apply ../../aqmt-pfifo-scheduler/iproute2.patch But I have this error : error: patch failed: tc/Makefile:12 error: tc/Makefile: patch does not apply

Can you confirm the steps that I follow to apply the patch are good? If not, can you show me where I mistaked ?

Regards

Le lun. 1 févr. 2021 à 01:45, Boris ndjoreboris@gmail.com a écrit :

Thanks, I'll check it out.

Le dim. 31 janv. 2021 à 22:53, Henrik Steen notifications@github.com a écrit :

Did you solve the initial issue with tc qdisc with my updated code? The README already describes the details. With it you should be able to run the traffic analyzer and collect metrics. As for the traffic analyzer see the Makefile https://github.com/henrist/aqmt/blob/master/aqmt/ta/Makefile#L2 for how to build it. You should be able to run ./analyzer after building it. You should verify this works as a first step.

In order for you to test dualpi2, you will first have to locate the latest version. I think it should be what I linked to above in the linux repo. That version does not contain the code required to use it with the testbed / traffic analyzer. You either have to patch it yourself (see the IS_TESTBED macros in the older dualpi2 repo, and also how it is applied to e.g. this repo), or maybe there exists some other repo I'm currently not familiar with. You will likely need to copy this out-of-tree and build it similar as the older repo (so it behaves similar as this repo, so you can load it). I haven't touched this myself for a few years, so sorry I cannot be of much more help right now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/henrist/aqmt-fq-codel-scheduler/issues/1#issuecomment-770457403, or unsubscribe https://github.com/notifications/unsubscribe-auth/AINCMMOPSA5Z7Z6MUPVZGLTS4XGMLANCNFSM4WW6YSSQ .

henrist commented 3 years ago

The patch from https://github.com/henrist/aqmt-pfifo-scheduler/blob/master/iproute2.patch is supposed to be done on a clean iproute2 branch, while the one from L4STeam includes other changes. You will have to solve the conflicts manually.

Blandine11 commented 3 years ago

Yes, sorry for the mistake. Now I downloaded ip route from this link https://kernel.googlesource.com/pub/scm/linux/kernel/git/jkirsher/iproute2/ and the pfiffo_aqmt patch was successfully applied. Then, The loading is also successful. I defined pfifo_aqmt as AQM on my aqm node and I use greedy to send traffic crossing the AQM node. But unfortunatly when I launch the analyser to have information about drops and delay, I stell geting zero packet information. See following an example of the analyser output:

elay [ms] ECN 00: ECN 01: ECN 10: ECN 11: Throughput per stream (ECN queue): Throughput per stream (non-ECN queue): Total throughput: 0 bits/sec

I checked also the analyser's ouput files in the output directory but it is the same result. It is like no packet is crossing the AQM node what is not the case.

henrist commented 3 years ago

My initial thought is that you are not having any traffic on your link. You don't need to load a special qdisc for the analyzer to work, but you will not get correct delay information unless you load one that modifies the IP ID field. You can use something like tcpdump to target the same interface to check and also to experiment with the pcap filter if needed.

Blandine11 commented 3 years ago

I did it with tcpdump wich confirms that here is a trafic on my link. I run greedy client and server on a client and and server node in a network architecture that uses the aqm node as router. My aim was to see if the loaded aqm inserts corrects drop and delay information in IP ID fields of each packet that cross it .

I will check again.

Regards

Le jeu. 4 févr. 2021 à 02:00, Henrik Steen notifications@github.com a écrit :

My initial thought is that you are not having any traffic on your link. You don't need to load a special qdisc for the analyzer to work, but you will not get correct delay information unless you load one that modifies the IP ID field. You can use something like tcpdump to target the same interface to check and also to experiment with the pcap filter if needed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/henrist/aqmt-fq-codel-scheduler/issues/1#issuecomment-772943362, or unsubscribe https://github.com/notifications/unsubscribe-auth/AINCMMMFRRWD7WIG6YJM4C3S5HWUFANCNFSM4WW6YSSQ .