When netif_rx() receives a packet, if the packet is target packet, delay it. Problem: How to delay the packet? sol 1: Put the target packet in the extra queue. problem: When will the queue be used to send packet? sol 1: When the main queue is empty. problem: main queue is almost impossible to be empty. There are broadcast packets, multicast packets, telnet session... So solution 1 is impractical. sol 2: use proportion: e.g. handle one packet in extra queue after every NUMBER of packets in main queue. Problem: 1.main queue may have not so many packets to handle . Packets in extra queue may be blocked indefinitely. problem: 2.We need to use asynchronization machanism sol 1: when main queue has no packets to handle, process packets in extra queue directly. problem: This won't introduce packet delay as we want. sol 1: when main queue is empty,use sleep or something Problem: the whole system is delayed. It affects system to accept other packets. So solution 1 is impractical. So solution 1 is impractical. So solution 2 is impractical. So solution 1 is impractical. sol 2: Add a counter in the queue/packet structure. When dev_queue_xmit() meets the target packet, it increments the counter, if the counter is >= some threshhold,send it. Otherwise put it in the end of the queue. problem 1: It may need to modify the basic data-structure sk_buff Solution: sk_buff has a field "unsigned char __unused". we can use sk_buff->__unused as the counter. problem 2: For TCP connection, this kind of delay is too long. The other party will think packet is lost and retransmit the packet. And because the packet is circulating in the device queue, the queue tends to be full all the time, it will prevent kernel from putting more packets in the device queue, which in turn, affect the performance of the whole network throughput. possible solution 1.