LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 11-24-2010, 02:51 PM   #1
MLinux
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Rep: Reputation: 0
Question WFQ


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

Thanx
 
Old 11-24-2010, 05:11 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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.
..
 
Old 11-25-2010, 12:25 PM   #3
MLinux
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Original Poster
Rep: Reputation: 0
Thank u
 
Old 11-28-2010, 10:18 AM   #4
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 230Reputation: 230Reputation: 230
For those who didn't know: WFQ & ns2
 
Old 10-02-2012, 12:47 AM   #5
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Rep: Reputation: Disabled
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

Last edited by deVacto; 10-02-2012 at 12:48 AM.
 
Old 10-02-2012, 03:15 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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/

.
 
1 members found this post helpful.
Old 10-02-2012, 04:12 AM   #7
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Rep: Reputation: Disabled
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
 
Old 10-02-2012, 05:14 AM   #8
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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;

.

Last edited by knudfl; 10-02-2012 at 05:33 AM.
 
Old 10-02-2012, 05:25 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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 ?


.
 
Old 10-02-2012, 05:51 AM   #10
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Rep: Reputation: Disabled
@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

Last edited by deVacto; 10-02-2012 at 05:54 AM.
 
Old 10-02-2012, 05:58 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
# 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

.
 
Old 10-02-2012, 06:08 AM   #12
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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.

.

Last edited by knudfl; 10-02-2012 at 06:15 AM.
 
Old 10-02-2012, 06:14 AM   #13
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Rep: Reputation: Disabled
#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
 
Old 10-02-2012, 06:42 AM   #14
deVacto
LQ Newbie
 
Registered: Aug 2012
Posts: 19

Rep: Reputation: Disabled
@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?
 
Old 10-02-2012, 07:09 AM   #15
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 13,519

Rep: Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495Reputation: 2495
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.

.

Last edited by knudfl; 10-02-2012 at 07:13 AM.
 
  


Reply

Tags
bsfq, wfq, wfq-ns2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
wfq reta Programming 13 03-16-2010 02:58 PM
Needing the source code implementing WFQ rickie Linux - Networking 1 07-29-2002 10:06 AM


All times are GMT -5. The time now is 12:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration