-2

I'm working on control system stuff, where the NIC interrupt is used as a trigger. This works very well for cycle times greater than 3 microseconds. Now i want to make some performance tests and measure the transmission time, respectively the shortest time between two interrupts.

The sender is sending 60 byte packages as fast as possible. The receiver should generate one interrupt per package. I'm testing with 256 packets, the size of the Rx descriptor ring. The packet data won't handled during the test. Only the interrupt is interesting.

The trouble is, that the reception is very fast up to less then 1 microsecond between two interrupts, but only for around 70 interrupts / descriptors. Then the NIC sets the RDU (Rx Descriptor Unavailable) bit and stops the receiving before reaching the end of the ring. The confusing thing is, when i increase the size of the Rx descriptor ring up to 2048 (e.g.), then the number of interrupts is increasing too (around 800). I don't understand this behavior. I thought he should stop again after 70 interrupts.

It seems to be a time problem, but why? I'm overlooking something, but what? Can somebody help my?

Thanks in advance!

Billy
  • 61
  • 2

1 Answers1

1

What I think is that due to large RX packet rate, your receive interrupts are missing . Don't count interrupts to see how many packets are received.Rely on "own" bit of Receive descriptors. Receive Descriptor unavailable will be set only when you reach end of the ring unless you have made some error in programming RX descriptors (e.g. forgot to set ownership bit) So if your RX ring has 256 descriptors, I think you should receive 256 packets without recycling RX descriptors. If you are doubtful whether you are reaching the end of ring or not, try setting interrupt on completion bit of only last RX descriptor.In this way you receive only one interrupt at the end of ring.

Adi06411
  • 356
  • 2
  • 7
  • Thanks, you are right! I recognized that the PCIe system is to slow, the latency is to high. The receiving of the packages is to fast, therefore the descriptor ring is full, before the ownership can be changed. – Billy Aug 24 '16 at 10:47
  • That's Great!@Billy – Adi06411 Aug 31 '16 at 10:59