LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - Networking (http://www.linuxquestions.org/questions/forumdisplay.php?f=3)
-   -   WFQ (http://www.linuxquestions.org/questions/showthread.php?t=846351)

MLinux 11-24-2010 02:51 PM

WFQ
 
hi,
Can anyone tell me where i can find patch for WFQ scheduling in ns2

Thanx

knudfl 11-24-2010 05:11 PM

Google .. WFQ scheduling in ns2 ..

Contributed_Code
http://nsnam.isi.edu/nsnam/index.php/Contributed_Code
Save page as | Filter = Text | >> Contributed_Code.txt

grep -ni wfq Contributed_Code.txt
→ line 836 , 910 ( Chapter 'Scheduling and Queue Management')
But : The patch links are not valid any more , sorry.


Google .. wfq patch ns2 ..
finds this right away ( for ns229 ) :
http://en.pudn.com/downloads137/sour...587127_en.html

So I guess, you may find something usable,
if you do a lot of searching.
..

MLinux 11-25-2010 12:25 PM

Thank u :)

archtoad6 11-28-2010 10:18 AM

For those who didn't know: WFQ & ns2

deVacto 10-02-2012 12:47 AM

please anyone know where i can get wfq patch for ns2.33?
i didnt find it anywhere, or is it other way to use wfq?

i got wfq.cc from wfq
how to get it worked when i compile it? cause after i compile.tcl it seems doesnt work ot it need to be patched? i already change ns-default and change it like drr one and i make install again...

my project is lte in NS2
tq

knudfl 10-02-2012 03:15 AM

Post #5, @deVacto

Probably use a new install of ns-allinone version 2.33 or 2.34 :
Do not expect other patches / changes to live together with LTE.

You can have as many versions of ns-allinone-2.xx as you want,
installed at the same time. But: Do not add any of them to a *PATH.

Binaries ns can be copied / renamed to new names to recognize versions.
Copy to /usr/local/bin/ as ns, ns233, ns-lte, ns-wfq, etc. etc.


Adding wfq : cd ns-allinone-2.33/ns-2.33/ && mkdir wfq

wfq.cc : Edit line 20 to : friend class WFQ;

Copy the modified wfq.cc to ns-2.33/wfq/

Edit the Makefile.in, line 325 to : apps/pbc.o wfq/wfq.o \

Then you can go to the top directory, ns-allinone-2.33/, and do ./install,
and wfq will be compiled into the binary 'ns' ( "ns-wfq" ).

wfq http://www.cse.iitb.ac.in/~varsha/al...cheduling/src/
> examples http://www.cse.iitb.ac.in/~varsha/al...ling/examples/
> graphs wfq http://www.cse.iitb.ac.in/~varsha/al...amples/graphs/

.

deVacto 10-02-2012 04:12 AM

tq again @knudfl

i dont want another ns version for now, so i skip to adding wfq

-in wfq.cc is it mean Edit line 20 to : friend class WFQ; is that mean to delete that line?
-in makefile.in in ns233 folder, is it only edit line 325? cause i see queue/drr i dont need edit there to?
-after i ./install i got
fatal eror : iostream.h no such file or directory
compilation termination
make : *** [wfq/wfq.o] error 1
Ns make failed

so i need delete line iostream.h in wfq.cc?
tq

knudfl 10-02-2012 05:14 AM

Add # 6

Using the whole package : final.tgz , with wfq.cc, bsfq.cc, drr.cc
http://www.cse.iitb.ac.in/~varsha/al...ling/sim_code/
> http://www.cse.iitb.ac.in/~varsha/al...code/final.tgz

Line 325 in Makefile.in / Makefile : apps/pbc.o wfq/wfq.o wfq/bsfq.o \
cp bsfq.cc ns-2.33/wfq/
cp -f drr.cc ns-2.33/queue/


Edits ...
bsfq.cc : Added line 16 : #include <iostream>
bsfq.cc : Line 30 : friend class BSFQ;
bsfq.cc : Added below line 3 : using namespace __gnu_cxx;

drr.cc : Line 37 : friend class DRR;

.

knudfl 10-02-2012 05:25 AM

Post # 7
Quote:

-in wfq.cc is it mean Edit line 20 to : friend class WFQ;
Line 20 is : friend WFQ;
Please edit to : friend class WFQ;

Quote:

fatal eror : iostream.h no such file or directory
I got no errors with g++ version 4.1.2 ( iostream.h is an old file.)
? May be your install works with #include <iostream>


Which OS are you using ? Name and version, please.
And which compiler ?


.

deVacto 10-02-2012 05:51 AM

@knudfl
i use slackware 13, gcc 4.5.2 after i follow #6
i got many warning like "common/packet.h warning : deprecated conversion from string constant"

what have i done is:
-Adding wfq : cd ns-allinone-2.33/ns-2.33/ && mkdir wfq
-wfq.cc : Edit line 20 to : friend class WFQ;
i edit to #include <iostream> and add using namespace __gnu_452; below the last #include
-Copy the modified wfq.cc to ns-2.33/wfq/
-Edit the Makefile.in, line 325 to : apps/pbc.o wfq/wfq.o \

i got that warning, but my ns2 installed at least, is it will any error in future?
or is any other way without ./install cause i just need that wfq code and i already success installed package lte in the past cause it so hard to installed it

knudfl 10-02-2012 05:58 AM

# 9

No problem, there is a g++34 for Slackware ..
http://www.slackware.com/~alien/slackbuilds/
> http://www.slackware.com/~alien/slackbuilds/gcc34/
> pkg/ > 12/ for a 32bits OS, > pkg64/ for 64bits.

So it's # installpkg gcc34-3.4.6-i486-2compat.tgz gcc34-g++34-3.4.6-i486-2compat.tgz
Or # installpkg gcc34-3.4.6-x86_64-2compat.tgz gcc34-g++34-3.4.6-x86_64-2compat.tgz
.... Then reboot, and you can do : export CC=gcc34 CXX=g++34

.

knudfl 10-02-2012 06:08 AM

Add # 9
Quote:

I got that warning, but my ns2 installed at least, is it will any error in future?
or is any other way without ./install cause I already success installed
package lte in the past cause it so hard to installed it.
Hard to install : That's a good reason to set up a new ns-allinone-2.33 for wfq.
LTE may still work with with the wfg patched ns ?
But the LTE patched ns-2.33/ns may not work with wfq tcl files.
Please make sure that you have a backup of the "ns-lte" binary.


P.S. : Slackware 13 has gcc-4.3.3, Slackware 13.37 has gcc-4.5.2.

.

deVacto 10-02-2012 06:14 AM

#11
tq again, i think i`ll keep in gcc 4.5.2 for now
@kundfl, can i have your contact or social media chat like ym?... i dont know how to pm in this forum

deVacto 10-02-2012 06:42 AM

@knudfl
i got eror
[code omitted because of length] :
invalid command name "session/RTP::debug_" while executing
"session/RTP::RTP_ set 0"
after write ns in terminal, how to fix it?

knudfl 10-02-2012 07:09 AM

Post # 13 : It's the same for compilers :
You can have as many versions as you want, installed at the same time.
They all have unique file names and locations.
Example g++34 : /usr/gcc34/bin/g++34. No conflicts.

Post # 14 : I have no idea.
But : You are not supposed to write 'ns' in the terminal.
At this time you should have 3 "ns copies" in /usr/local/bin/ :
Like : ns233-orig, ns233-lte, ns233-wfq.
I still don't think that you can mix modifications, and expect ns to work.
But : I will have a look into wrq / ns-2.33 / Slackware 13.?? later.
The command 'cat /etc/slackware-version' : Will reply with version.
The command 'uname -m' : The architecture ( i686 or x86_64 ).
Please show the output from both commands.

.


All times are GMT -5. The time now is 05:26 AM.