what is the use of poll function int a net_device struct

3 messages, 2 authors, 2013-01-16 · open the first message on its own page

what is the use of poll function int a net_device struct

From: horseriver <hidden>
Date: 2013-01-15 09:02:11

hi:

   Where is the handler function defined  for an netcard's  IRQ  ? 
   When an IRQ has reached,  how to wake_up the wait_queue of the socket?

thanks1

 

Re: what is the use of poll function int a net_device struct

From: Rami Rosen <hidden>
Date: 2013-01-15 13:20:39

Hi,

On Mon, Jan 14, 2013 at 4:21 PM, horseriver [off-list ref] wrote:
Where is the handler function defined  for an netcard's  IRQ
look for the request_irq() method; you register the handler with this method.

for example,
in e1000e:

http://lxr.free-electrons.com/source/drivers/net/ethernet/intel/e1000e/netdev.c

err = request_irq(adapter->msix_entries[vector].vector,
                           e1000_intr_msix_rx, 0,
                          adapter->rx_ring->name,
                             netdev);

so the handler is   e1000_intr_msix_rx().

When an IRQ has reached,  how to wake_up the wait_queue of the socket?
TCP/UDP packet goes up from the driver to L3 and then to L4 (in case
it is for this machine). In L4 you should find the
wake_up of the wait_queue of the socket.

Regards,
Rami Rosen
http://ramirose.wix.com/ramirosen

Re: what is the use of poll function int a net_device struct

From: horseriver <hidden>
Date: 2013-01-16 04:26:11

On Tue, Jan 15, 2013 at 03:20:39PM +0200, Rami Rosen wrote:
Hi,

On Mon, Jan 14, 2013 at 4:21 PM, horseriver [off-list ref] wrote:
quoted
Where is the handler function defined  for an netcard's  IRQ
look for the request_irq() method; you register the handler with this method.

for example,
in e1000e:

http://lxr.free-electrons.com/source/drivers/net/ethernet/intel/e1000e/netdev.c

err = request_irq(adapter->msix_entries[vector].vector,
                           e1000_intr_msix_rx, 0,
                          adapter->rx_ring->name,
                             netdev);

so the handler is   e1000_intr_msix_rx().

When an IRQ has reached,  how to wake_up the wait_queue of the socket?
TCP/UDP packet goes up from the driver to L3 and then to L4 (in case
it is for this machine). In L4 you should find the
wake_up of the wait_queue of the socket.
  
  thanks!
  
  In L4, wake_up should be fired  by IRQ event.
  where is the code for fire this callback ?

  
Regards,
Rami Rosen
http://ramirose.wix.com/ramirosen
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help