RE: question about the receiving ip path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks, 

First, i forgot to mention that it was for 2.4 linux kernel.  So the
information was alright.

For the figure, it seems to be the trace with user mode linux, is it
possible???

I will look at the code in more detail later but with a quick check i am
wondering if it's really necessary to clone the skbuff. (i think that if we
could possibly modify the skb later, then yes it is), but the real question
is, how can an skbuff be treated by two or more different "stack".

			for (ptype = ptype_all; ptype; ptype = ptype->next)
{
				if (!ptype->dev || ptype->dev == skb->dev) {
					[...]
				}
			}

			for
(ptype=ptype_base[ntohs(type)&15];ptype;ptype=ptype->next) {
				if (ptype->type == type &&
				    (!ptype->dev || ptype->dev == skb->dev))
{
					[...]
				}
			}

i haven't check at what ptype_all is but why send it to the ptype->func if
it's not of the same protocol type?????

bye

Phil


-----Original Message-----
From: Vincent Guffens [mailto:guffens@auto.ucl.ac.be]
Sent: Thursday, July 18, 2002 4:41 AM
To: Bernd Eckenfels
Cc: linux-net@vger.kernel.org
Subject: Re: question about the receiving ip path


A few months ago, I did a drawing of the path of an ip packet in the linux
2.4 kernel, it is not completed but it says what you
say in graphical form. I would appreciate any feedback and corrections.

The figure is attached in compressed (gzipped) eps format.

Cheers,


> 
> 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.
> 
> Greetings
> Bernd
> -
> : 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

-- 
				Vincent Guffens, CESAME, UCL

Value your freedom, or you will lose it, teaches history. 
"Don't bother us with politics," respond those who don't want to learn.
	      	-- Richard M. Stallman
-
: 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

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux