Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Network Webinar Q&A # 2 (Difference between io-net and io-pkt drivers): (6 Items)
   
Network Webinar Q&A # 2 (Difference between io-net and io-pkt drivers)  
This is an answer to Question #2 posted during the Webinar on 11/14/07 on Core Networking 6.4:

Q: What is the biggest difference between io-net and io-pkt drivers? (Hint: it has to do with the way the initialization
 routine is used).

A: the stack uses a ‘shim’ layer (dev*-shim.so) to translate from io-net to the networking layer (Core Networking 6.4)

(I think that was mentioned during the presentation.)

Besides, 
•io-net drivers export /dev/en<N>
•io-net driver can be unmounted (by using umount /dev/en<N>), while io-pkt can be destroyed (e.g. ifconfig eth<N> 
destroy)
•io-net drivers use dedicated commands (e.g. speed, duplex) to set different modes, while native drivers uses ioct 
calls.
(these can be found at the Networking Wiki) 

Regards, 
Vlad

Re: Network Webinar Q&A # 2 (Difference between io-net and io-pkt drivers)  
Hi Vlad:
  Congratulations on being the first poster to any of the Networking forum groups!  That warrants something in my mind 
so I'll see what I can do for you.

   The io-net / io-pkt driver difference that I'm looking for applies more to the implementation than the usage.   
There's something that the initialization routines have to be able to handle in io-pkt that they don't have to in io-net
, so we'll look for some more answers to come in with that clarification.

  Thanks for responding!
    Robert.
Re: Network Webinar Q&A # 2 (Difference between io-net and io-pkt drivers)  
I still owe Vlad a T-shirt (yes, I haven't forgotten, just was out of the country!) so maybe we can piggy back our 
delivery! :-)
Re: Network Webinar Q&A # 2 (Difference between io-net and io-pkt drivers)  
>    The io-net / io-pkt driver difference that I'm looking for applies more to 
> the implementation than the usage.   There's something that the initialization
>  routines have to be able to handle in io-pkt that they don't have to in io-
> net, so we'll look for some more answers to come in with that clarification.

Hi Robert, 

Not sure if anyone has replied yet, so I'll just give it a go. 

I'm guessing the difference in the init routines you are looking for is that within io-net the init routines of the 
network drivers are only called once upon driver load. 

Within io-pkt they are called repeatedly, e.g. every time someone issues an ifconfig for the interface in question. I 
think that may become  quite a gotcha in any driver implementation, one has to take care to e.g. not attach the 
interrupt or alloc new DMA buffer space etc over and over again,  in the init routine. Otherwise the driver might work 
fine for a while but then crash later...

Also, another big difference is that io-net drivers had their own threads in which the layer-2 receive processing was 
done, while io-pkt drivers just provide function hooks and are always called within the context of the stack's thread 
pool. That's even true for periodic housekeeping tasks, we do not create a timer triggered thread ourselves anymore, but
 use the callout function of the stack framework. 

Christopher


RE: Network Webinar Q&A # 2 (Difference between io-net and io-pkt drivers)  
Hi Christopher:
	That's exactly the answer that I was looking for.  Could you send me
your full contact information (rcraig at qnx dot com)?  Also reminds me
there are another couple of prizes that need to go out as well...

	Robert.

-----Original Message-----
From: Christopher Pohl [mailto:christopher.pohl@etas.de] 
Sent: Wednesday, January 09, 2008 6:20 AM
To: technology-networking
Subject: Re: Network Webinar Q&A # 2 (Difference between io-net and io-pkt
drivers)

>    The io-net / io-pkt driver difference that I'm looking for applies more
to 
> the implementation than the usage.   There's something that the
initialization
>  routines have to be able to handle in io-pkt that they don't have to in
io-
> net, so we'll look for some more answers to come in with that
clarification.

Hi Robert, 

Not sure if anyone has replied yet, so I'll just give it a go. 

I'm guessing the difference in the init routines you are looking for is that
within io-net the init routines of the network drivers are only called once
upon driver load. 

Within io-pkt they are called repeatedly, e.g. every time someone issues an
ifconfig for the interface in question. I think that may become  quite a
gotcha in any driver implementation, one has to take care to e.g. not attach
the interrupt or alloc new DMA buffer space etc over and over again,  in the
init routine. Otherwise the driver might work fine for a while but then
crash later...

Also, another big difference is that io-net drivers had their own threads in
which the layer-2 receive processing was done, while io-pkt drivers just
provide function hooks and are always called within the context of the
stack's thread pool. That's even true for periodic housekeeping tasks, we do
not create a timer triggered thread ourselves anymore, but use the callout
function of the stack framework. 

Christopher




_______________________________________________
Technology
http://community.qnx.com/sf/go/post4136
Re: RE: Network Webinar Q&A # 2 (Difference between io-net and io-pkt  
Vlad, can you send me your contact information as well?

   Thanks! 
     Robert.