User Tools

Site Tools


networking:napi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
networking:napi [2016/10/06 06:47]
shirai some tiny fixes related to wiki syntax
networking:napi [2016/11/14 21:59]
jwi
Line 95: Line 95:
  
   * Only one CPU at any time can call napi->​poll();​ for each ''​napi_struct''​ this is because only one CPU can pick the initial interrupt and hence the initial //​napi_schedule(napi)//​   * Only one CPU at any time can call napi->​poll();​ for each ''​napi_struct''​ this is because only one CPU can pick the initial interrupt and hence the initial //​napi_schedule(napi)//​
-  * The core layer invokes devices to send packets in a round robin format. This implies receive is totaly lockless because of the guarantee ​only that one CPU is executing it.+  * The core layer invokes devices to send packets in a round robin format. This implies receive is totaly lockless because of the guarantee that only one CPU is executing it.
   * Contention can only be the result of some other CPU accessing the rx ring. This happens only in close() and suspend() (when these methods try to clean the rx ring); Driver authors need not worry about this; synchronization is taken care for them by the top net layer.   * Contention can only be the result of some other CPU accessing the rx ring. This happens only in close() and suspend() (when these methods try to clean the rx ring); Driver authors need not worry about this; synchronization is taken care for them by the top net layer.
  
Line 112: Line 112:
   * puts ''​napi''​ in a state ready to be added to the CPU polling list if it is up and running. You can look at this as the first half of //​napi_schedule(napi)//​.   * puts ''​napi''​ in a state ready to be added to the CPU polling list if it is up and running. You can look at this as the first half of //​napi_schedule(napi)//​.
   * **<​nowiki>​__napi_schedule(napi)</​nowiki>​**   * **<​nowiki>​__napi_schedule(napi)</​nowiki>​**
-  * Add ''​napi''​ to the poll list for this CPU; assuming that //napi_prep(napi)// has already been called and returned 1+  * Add ''​napi''​ to the poll list for this CPU; assuming that //napi_schedule_prep(napi)// has already been called and returned 1
   * **napi_reschedule(napi) **   * **napi_reschedule(napi) **
   * Called to reschedule polling for ''​napi''​ specifically for some deficient hardware.   * Called to reschedule polling for ''​napi''​ specifically for some deficient hardware.
networking/napi.txt · Last modified: 2022/10/16 16:55 by joser93