Avoiding re-ordering in netif_rx()

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

 



I am modifying linux kernel 2.4.18 to add support for our TCP offload 
card. The problem is:
The packets that I get from the card are fully TCP processed and in-order. 
Now I feed these packets to netif_rx(). marking a flag in the skbuff which 
says that the full TCP/IP processing is done on this packet and the higher 
layers can just bypass the packet protocol  processing. On an SMP m/c 
different consequtive in-order packets received from the card can be 
queued to different per-cpu queues and it might so happen that the later 
received packet is added to the socket receive queue first ( bcos the 
softirq on the later CPU got a chance to execute first). This maliciously 
reorders the data.

My question is, what is an elegant way of avoiding this. I have a couple 
of choices, but I want to know what people think. f.e one way is to queue 
these packets to a single queue and not a per-cpu queue. In this case 
order will be honoured.

brilliant suggestions are very welcome !!

Thanx
tomar

-
: 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