3

I am working on precise time stamping of packets being captured from a network. An interrupt is generated at every packet reception. Thus an interrupt handler registered by the Ethernet driver queues the captured packets. I have 2 questions

  1. Who performs the time stamping on each packet, the interrupt handler or the kernel which processes the packets from the queue.
  2. Depending on which task (interrupt handler or kernel, both being in kernel space) performs the time stamping, how can I increase its priority in a normal kernel (i.e. without using a RT kernel)
  • **Linux** targets a wide variety of hardware. Not every piece of hardware or architecture can support priorities. The answer to your question will depend on the type of hardware in use and will never be **portable** across different **Linux** targets. – artless noise Sep 02 '13 at 17:28
  • I have an Intel NIC with e1000e driver (which supports interrupt throttle rate). Now I am trying to use a RT- Linux and give priority to the thread which actually time stamps the packets. Do you mean that the e1000e driver will not support priorities? – Undefined_Argument Sep 03 '13 at 09:42
  • I mean the CPU interrupt controller needs to support it. You are talking about the interrupt source. The source gets routed to a series of controllers which get routed to the CPU. They all need to support priorities for it to work. Typically each *interrupt controller* will support a priority. For example if there are 16 interrupt sources and four priorities, then 16*2=32 bits can specify a priority for each interrupt. The interrupt handler code for the CPU then need to support re-entrant interrupts as we may start handling a lower priority and then need to pre-empt; not simple to do. – artless noise Sep 03 '13 at 17:06

0 Answers0