From: Jon Z. <Jon...@jd...> - 2010-12-22 06:17:19
|
Hi The reason I want to disable RSS is that I doubt it will incur packet mis-order in af_packet.c/PACKET_MMAP i.e. In multi-queue enabled kernel, tpacket_rcv will be run in parallel,right? So that a later packet might get the spinlock earlier and it is copied to the ring buffer prior to packet which timestamp is earlier? if RSS is disabled the tpacket_rcv will be run in sequence, but what's the performance? Can intel X520 nic reach 5gbps+ without RSS? Thanks jon af_packet.c static int tpacket_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) { ... spin_lock(&sk->sk_receive_queue.lock); h.raw = packet_current_frame(po, &po->rx_ring, TP_STATUS_KERNEL); if (!h.raw) goto ring_is_full; packet_increment_head(&po->rx_ring); po->stats.tp_packets++; if (copy_skb) { status |= TP_STATUS_COPY; __skb_queue_tail(&sk->sk_receive_queue, copy_skb); } if (!po->stats.tp_drops) status &= ~TP_STATUS_LOSING; spin_unlock(&sk->sk_receive_queue.lock); skb_copy_bits(skb, 0, h.raw + macoff, snaplen); } |