Thread: [mpls-linux-general] Netlink Vs ioctl
Status: Beta
Brought to you by:
jleu
From: jagdish G. <jag...@ie...> - 2002-02-13 10:50:16
|
Hi In the mpls implementation both netlink and ioctls are used for communication with mpls/kernel code . Is there any specific reason for using ioctl for some modification and netlink for others. Can any body guide me which is more efficient? Thanks in advance Jagdish Garg |
From: James R. L. <jl...@mi...> - 2002-02-13 17:09:55
|
On Wed, Feb 13, 2002 at 04:13:34PM +0530, jagdish Garg wrote: > Hi > In the mpls implementation both netlink and ioctls are used for > communication with mpls/kernel code . Is there any specific reason for > using ioctl for some modification and netlink for others. > Can any body guide me which is more efficient? Originally I used ioctl for everything. Then I switch to using netlink for everthing execpt for things related to MPLS tunnels. Now (in mpls-linux-1.1xx) I've moved back to using ioctl for everything. Netlink is nice, it works, but is a little over kill for what I'm doing. If I ever need to send notification back to userland about MPLS changes, then I'll consider netlink again. > Thanks in advance > Jagdish Garg > > > > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general -- James R. Leu |
From: Abhijit G. <gab...@ee...> - 2002-02-14 04:10:01
|
James R. Leu wrote : >Now (in mpls-linux-1.1xx) I've moved back to using ioctl for everything. >Netlink is nice, it works, but is a little over kill for what I'm doing. What you call as overkill I would say flexibility. >If I ever need to send notification back to userland about MPLS changes, then >I'll consider netlink again. One will have to eventually - eg. Stuff like Label Resource Available etc. Cannot be done so effectively without netlink. Also repeatatively packets with some label(s) are causing problems, netlink is the way to notify the userspace abt it. I think question here is becoming more _religious_. However I have seen some draft few days back which was aiming at making netlink a standard interface between userspace/kernelspace. Donno how and when this will happen. -abhijit |
From: James R. L. <jl...@mi...> - 2002-02-14 14:59:35
|
On Thu, Feb 14, 2002 at 09:46:15AM +0530, Abhijit Gadgil wrote: > James R. Leu wrote : > > >Now (in mpls-linux-1.1xx) I've moved back to using ioctl for everything. > >Netlink is nice, it works, but is a little over kill for what I'm doing. > > What you call as overkill I would say flexibility. .. but that flexibility always comes at a cost, complexity. It's not rocket science, but it does take a bit more work. Right now I'd rather spent my time getting everything else to work. Eventually, maybe I'll have the time an williness to re-implement the netlink stuff, and take full advantage of what it has to offer. Until then I'll stick to my trusty ioctl calls. > >If I ever need to send notification back to userland about MPLS changes, then > >I'll consider netlink again. > > One will have to eventually - eg. Stuff like Label Resource Available etc. > Cannot be done so effectively without netlink. Also repeatatively packets > with some label(s) are causing problems, netlink is the way to notify the > userspace abt it. Not to nit pick, but label managment is a userland issue, not the responsibility of the forwarding plane. > I think question here is becoming more _religious_. However I have seen > some draft few days back which was aiming at making netlink a standard > interface between userspace/kernelspace. Donno how and when this will > happen. If/when I get MPLS integrated into the standard kernel I'll worry about that :-) > > -abhijit > -- James R. Leu |
From: jagdish G. <jag...@ie...> - 2002-02-15 09:30:13
|
Hi In the mpls code a new dst entry is created for each new nhlfe add request. The pointer of which is kept in moi. The dst_entry is further use depends on the mpls LSP configuration. I have one question, suppose dst_entry is not used long time and it will go to the garbage list. After that if moi is used then what will happen? Further I will be grateful if one can tell me the significance of _use field of dst_entry structure. Thanks in advance Jagdish |
From: James R. L. <jl...@mi...> - 2002-02-15 13:46:19
|
In mpls-linux 1.0 dst_entry is used ineffeciently. Take a look at mpls-linux 1.1xx (get it from CVS) to see how it will be used in the future. As for you question. Since MPLS created the dst_entry and holds a reference (and a reference count) for the dst_entry, it will not be deleted until MPLS releases it. The neighbor entry the the dst_entry points to can change over time, but the neighbor entry deals with this. _use is the reference count. Jim On Fri, Feb 15, 2002 at 02:53:07PM +0530, jagdish Garg wrote: > Hi > In the mpls code a new dst entry is created for each new nhlfe add request. > The pointer of which is kept in moi. The dst_entry is further use depends on > the mpls LSP configuration. I have one question, suppose dst_entry is not > used long time and it will go to the garbage list. After that if moi is used > then what will happen? > > Further I will be grateful if one can tell me the significance of _use field > of dst_entry structure. > > > > Thanks in advance > Jagdish > > > > > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general -- James R. Leu |
From: jagdish G. <jag...@ie...> - 2002-02-18 04:54:40
|
Hi I have seen the linux code. In the code ref_count is use for keeping the reference, but not the _use field. In Mpls 1.0 code to delete a label(__mpls_del_out_label) and dst_entry, simply release st_entry( dst_release(moi->moi_dst) is called. The function dst_release is decrementing the ref_count not the _use field. Please let me know how to get the latest CVS code. Regards Jagdish ----- Original Message ----- From: James R. Leu <jl...@mi...> To: jagdish Garg <jag...@ie...> Cc: <mpl...@li...> Sent: Friday, February 15, 2002 9:08 PM Subject: Re: [mpls-linux-general] Dst_entry in MPLS implementation > > From: "James R. Leu" <jl...@mi...> on 02/15/2002 09:38 AM CST > > Please respond to jl...@mi... > > To: jagdish Garg <jag...@ie...> > cc: mpl...@li... > Subject: Re: [mpls-linux-general] Dst_entry in MPLS implementation > > > In mpls-linux 1.0 dst_entry is used ineffeciently. Take a look at > mpls-linux 1.1xx (get it from CVS) to see how it will be used in the > future. > > As for you question. Since MPLS created the dst_entry and holds a > reference > (and a reference count) for the dst_entry, it will not be deleted until > MPLS releases it. The neighbor entry the the dst_entry points to can > change > over time, but the neighbor entry deals with this. > > _use is the reference count. > > Jim > > On Fri, Feb 15, 2002 at 02:53:07PM +0530, jagdish Garg wrote: > > Hi > > In the mpls code a new dst entry is created for each new nhlfe add > request. > > The pointer of which is kept in moi. The dst_entry is further use depends > on > > the mpls LSP configuration. I have one question, suppose dst_entry is > not > > used long time and it will go to the garbage list. After that if moi is > used > > then what will happen? > > > > Further I will be grateful if one can tell me the significance of _use > field > > of dst_entry structure. > > > > > > > > Thanks in advance > > Jagdish > > > > > > > > > > _______________________________________________ > > mpls-linux-general mailing list > > mpl...@li... > > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general > > -- > James R. Leu > |
From: James R. L. <jl...@mi...> - 2002-02-18 14:44:14
|
On Mon, Feb 18, 2002 at 10:17:56AM +0530, jagdish Garg wrote: > Hi > I have seen the linux code. In the code ref_count is use for keeping the > reference, but not the _use field. In Mpls 1.0 code to delete a > label(__mpls_del_out_label) and dst_entry, simply release > st_entry( dst_release(moi->moi_dst) is called. The function dst_release is > decrementing the ref_count not the _use field. Then I'm not sure what _use if for, it obvioulsy doesn't have much of an impact on mpls-linux. You have the kernel code figure it out yourself. > Please let me know how to get the latest CVS code. http://sourceforge.net/cvs/?group_id=15443 > > Regards > Jagdish > > ----- Original Message ----- > From: James R. Leu <jl...@mi...> > To: jagdish Garg <jag...@ie...> > Cc: <mpl...@li...> > Sent: Friday, February 15, 2002 9:08 PM > Subject: Re: [mpls-linux-general] Dst_entry in MPLS implementation > > > > > > From: "James R. Leu" <jl...@mi...> on 02/15/2002 09:38 AM CST > > > > Please respond to jl...@mi... > > > > To: jagdish Garg <jag...@ie...> > > cc: mpl...@li... > > Subject: Re: [mpls-linux-general] Dst_entry in MPLS implementation > > > > > > In mpls-linux 1.0 dst_entry is used ineffeciently. Take a look at > > mpls-linux 1.1xx (get it from CVS) to see how it will be used in the > > future. > > > > As for you question. Since MPLS created the dst_entry and holds a > > reference > > (and a reference count) for the dst_entry, it will not be deleted until > > MPLS releases it. The neighbor entry the the dst_entry points to can > > change > > over time, but the neighbor entry deals with this. > > > > _use is the reference count. > > > > Jim > > > > On Fri, Feb 15, 2002 at 02:53:07PM +0530, jagdish Garg wrote: > > > Hi > > > In the mpls code a new dst entry is created for each new nhlfe add > > request. > > > The pointer of which is kept in moi. The dst_entry is further use > depends > > on > > > the mpls LSP configuration. I have one question, suppose dst_entry is > > not > > > used long time and it will go to the garbage list. After that if moi is > > used > > > then what will happen? > > > > > > Further I will be grateful if one can tell me the significance of _use > > field > > > of dst_entry structure. > > > > > > > > > > > > Thanks in advance > > > Jagdish > > > > > > > > > > > > > > > _______________________________________________ > > > mpls-linux-general mailing list > > > mpl...@li... > > > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general > > > > -- > > James R. Leu > > -- James R. Leu |
From: <seh...@ya...> - 2002-02-21 08:47:43
|
Hi, Can you please help me to fix this problem: i have 2 PC with linux2.4.7 + mpls_linux-1.0 +ldp-portable-0.080 . I install both MPLS and LDP. I am trying to test this 2 LSRs. I start by configure the LDP with "add global" and "add interface" in the 2 PC as it is mentionned in the linux-port/REDME.sample. I notice that i have a "HELLO LDP" message between the 2 LSRs but my /proc/net/mpls-out and /proc/net/mpls_fec are empty. What is missing ? does this insufficent to bind a lebel to the FEC ( 192.168.0.0 ) ? must i use the "mplsadm" commande? Please help me? Thanks in advance. Kind regards. Sehla loussaief. ___________________________________________________________ Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français ! Yahoo! Mail : http://fr.mail.yahoo.com |
From: James R. L. <jl...@mi...> - 2002-02-21 15:18:55
|
On Thu, Feb 21, 2002 at 09:47:38AM +0100, sehla loussaief wrote: > Hi, > Can you please help me to fix this problem: i have 2 > PC with linux2.4.7 + mpls_linux-1.0 > +ldp-portable-0.080 . I install both MPLS and LDP. I > am trying to test this 2 LSRs. I start by configure > the LDP with "add global" and "add interface" in the > 2 PC as it is mentionned in the > linux-port/REDME.sample. I notice that i have a "HELLO > LDP" message between the 2 LSRs but my > /proc/net/mpls-out and /proc/net/mpls_fec are empty. > What is missing ? does this insufficent to bind a > lebel to the FEC ( 192.168.0.0 ) ? must i use the > "mplsadm" commande? First, you need to understand that I have not done any developement on ldp-portable for many months now. If you're not will to dig into the cod= e or atleast do some level of trouble shooting/research you probably should not be using ldp-portable. There is a good possibility that it does not = work. Did you grab the HEAD of the ldp-portable tree via CVS or did you specify revision 'ldp-portable_0_080'? (you want the 'Head of Line') I just submi= tted a small fix a couple days ago. Did you compile with the MPLS_LINUX flag? Do you have static route between the LDP speakers for the LSRIDs of each = box? Do you know how LDP works? If you want me to help: -send ma an ascii drawing of you setup, ip addresses, interfaces, network= s etc. -send me the commands you typed in -sent me the output of: show route show ses show data show inte -send me the output of your linux routing table Please forgive me if I seem rude, but: -ldp-portable is intended for developers -I have recieved (and answered) this exact question many time no this ma= iling list Jim > Please help me? > Thanks in advance. > Kind regards. > Sehla loussaief. >=20 >=20 > ___________________________________________________________ > Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en fran=E7ais ! > Yahoo! Mail : http://fr.mail.yahoo.com >=20 > _______________________________________________ > mpls-linux-general mailing list > mpl...@li... > https://lists.sourceforge.net/lists/listinfo/mpls-linux-general --=20 James R. Leu |