How to test NAPI function on Linux?

I am trying to test the functionality of NAPI in an embedded Linux environment. I used pktgen to generate a large number of packets and tried to check the number of interruptions of my network interface in / proc / interrupts.

I found out that the number of interrupts is comparatively less than the generated packets. I am also trying to set netdev_budget 'from 1 to 1000 (300 by default), so that I can observe a decrease in the number of interrupts as netdev_budget increases.

However, increasing netdev_budget doesn't seem to help. The interrupt is similar to the interrupt observed with netdev_budget set to 300.

So here are my queries:

  • What is the effect of "netdev_budget" on NAPI?

  • What other parameters can / should I configure to monitor changes in the number of interrupts?

  • Is there any other way that I can use to test NAPI functionality on Linux? (In addition to directly viewing the network driver code)

Any help is a lot.

Thanks in advance.

+4
source share
1 answer

I wrote a comprehensive Linux network setup blog post that explains everything about monitoring, tuning and optimizing the Linux network stack (including NAPI weight). Take a look.

: IRQ NAPI. , . , IRQ , , .

, IRQ , .

:

  • netdev_budget , NET_RX softirq. , , , . , NET_RX softirq 100% . , hardirqs reneabled NAPI .

  • IRQ , . . , .

  • /proc/net/softnet_stat . , , ..

, :

? , , , . hardirq NIC- , , , . , , . , IRQ IRQ , , NIC .

, , , . , , .

: Linux, . , ( ) .

+5

All Articles