Networking Forums

Networking Forums > Computer Networking > Linux Networking > Network device driver and blocking send.

Reply
Thread Tools Display Modes

Network device driver and blocking send.

 
 
Vincent
Guest
Posts: n/a

 
      12-05-2004, 01:09 PM
Hello,

I've developed a Linux Network device driver.
For now, this driver only provides PF_PACKET protocol family socket.

The problem is that, even when in blocking mode, if there are no more space
available the "send" function returns -1 with error code ENOBUFS.

I don't think the problem comes from the test application as this very
simple application works fine on "eth0" network device.

I should have missed something.

Do you have any idea?

Regards.

Vincent


 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      12-06-2004, 01:36 AM

"Vincent" <(E-Mail Removed)> wrote in message
news:LyEsd.1830$(E-Mail Removed)...

> The problem is that, even when in blocking mode, if there are no more
> space
> available the "send" function returns -1 with error code ENOBUFS.


What would you like it to do? It can't block, because doing that would
require some place to store the information about which process is waiting
on what resource, and it's out of places to store things.

> I don't think the problem comes from the test application as this very
> simple application works fine on "eth0" network device.
>
> I should have missed something.
>
> Do you have any idea?


This is behavior you have to deal with. You may wish to 'usleep' and try
again.

DS


 
Reply With Quote
 
Kasper Dupont
Guest
Posts: n/a

 
      12-07-2004, 06:01 AM
David Schwartz wrote:
>
> What would you like it to do? It can't block, because doing that would
> require some place to store the information about which process is waiting
> on what resource, and it's out of places to store things.


And why couldn't that be on the stack?

--
Kasper Dupont
 
Reply With Quote
 
Vincent
Guest
Posts: n/a

 
      12-11-2004, 10:16 AM
Hi David,

"David Schwartz" <(E-Mail Removed)> a écrit dans le message de
news:cp0gjv$kmi$(E-Mail Removed)...
>
> "Vincent" <(E-Mail Removed)> wrote in message
> news:LyEsd.1830$(E-Mail Removed)...
>
> > The problem is that, even when in blocking mode, if there are no more
> > space
> > available the "send" function returns -1 with error code ENOBUFS.

>
> What would you like it to do? It can't block, because doing that would
> require some place to store the information about which process is waiting
> on what resource, and it's out of places to store things.


This could be done in the network stack. And actually I think this is done
there as it works when I use the "eth0" device.
I suspect I have made a mistake in my driver that prevent the stack properly
doing its job.

> > I don't think the problem comes from the test application as this very
> > simple application works fine on "eth0" network device.
> >
> > I should have missed something.
> >
> > Do you have any idea?

>
> This is behavior you have to deal with. You may wish to 'usleep' and

try
> again.


Not possible as I will use up to 512 sockets at the same time with something
like 40000 messages per second.

In fact I do need blocking mode to use this sockets with "kqueue" API.

Regards.

Vincent


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
eth0: Device not found (e1000: Intel PRO/1000 Network Driver) vendredi5h@gmail.com Linux Networking 2 03-12-2006 04:23 AM
could not load RDR device driver alerteye Windows Networking 0 12-05-2005 07:32 AM
Network device driver. Blocking send does not work. Vincent Linux Networking 0 01-02-2005 06:57 PM
send data packets to driver hard_xmit function sara Linux Networking 0 12-28-2004 01:09 PM
Driver for D-Link DWL 120+ USB device? ppcinfo Linux Networking 6 10-22-2003 06:54 PM



1 2 3 4 5 6 7 8 9 10 11