Re: question about the receiving ip path

From: Nivedita Singhvi (niv@us.ibm.com)
Date: Wed Jul 17 2002 - 16:51:47 EST


Quoting Bernd Eckenfels <ecki-news2002-06@lina.inka.de>:

> For 2.4 see net/core/dev.c:netif_rx(skb) which is called by the
> network driver. This will add it to the queue->input_pkt_queue,
> which is processed by net_rx_action(), which will call the protocol
> families receive handlers eighter directly via the func() method of
> the protcol or by deliver_to_old_cones() which does contain the
> clone. for ip it is net/ipv4/ip_input.c:ip_rcv() which hands it to
> ip_rcv_finish() which distributes it to the ip_local_deliver() for
> local targets which then passes it to ip_local_deliver_finish()
> which calls the ip protocol handler, for example udp_rcv which looks
> up the socket and passes it into that.
>
> Hope this is nearly right, by reading the source. Note, I am not
> shure with softirq and stuff, which function is running in the irq
> or bottom half mode.

As far as irq/softirq goes:

HW Interrupt Handler:
       device rx interrupt handler routine()
       netif_rx()

softirq (NET_RX_SOFTIRQ handling (from do_softirq() etc)
       net_rx_action()
       ip_rcv()
       ip_rcv_finish()
       ip_local_deliver()
       ip_local_deliver_finish()
       udp_rcv()

process context:
       udp_recvmsg()

thanks,
Nivedita

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html



This archive was generated by hypermail 2b29 : Tue Jul 23 2002 - 22:00:01 EST