Re: Regarding the __netpoll_rx function in 2.6.21 kernel

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

 



On 7/4/07, Rajendra Stalekar <rajendra.stalekar@xxxxxxxxx> wrote:
Hi,

I find that in the __netpoll_rx function in the netpoll.c , the
iph->protocol is only checking for the UDP protocol in the transport layer
for getting the true length of the frame.

Why is this check not done for IPPROTO_TCP?
More important is why do you need even the UDP length at ethernet
layer at all during receiving????

AFAICS, this is something for better performance.
If you have a bad packet there is no point is pushing it to upper
layers, because eventually they 'll also reject it. Doing it
prematurely means less headache because of a supposedly bad packet.
Thats why there is even a fast checksum calculation for the packet few
lines below.

OTOH, tcp layer is a connection oriented protocol. If you discard the
packet this way here only, how are the pending socket queues coming to
know that packet was a bad seed???
They need to be carried up to the TCP layer for checking because of
the nature of the TCP protocol.

UDP is a conncetion less and UDP layer don't care if there is no
notification of packet dropping.

I may be wrong , so feel free to correct me.

Thanks
~psr

--
play the game

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux