aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJakub Kicinski <[email protected]>2023-03-21 22:38:48 -0700
committerJakub Kicinski <[email protected]>2023-03-23 19:47:40 -0700
commit3eb8eea2a453463f5606ce3e46cf225f88671440 (patch)
treed65c3fdeb4e9ef73dc3effec879981684ffacdae /include/linux
parentfcb3a4653bc5fb0525d957db0cc8b413252029f8 (diff)
docs: networking: document NAPI
Add basic documentation about NAPI. We can stop linking to the ancient doc on the LF wiki. Link: https://lore.kernel.org/all/[email protected]/ Reviewed-by: Bagas Sanjaya <[email protected]> Reviewed-by: Toke Høiland-Jørgensen <[email protected]> Acked-by: Pavel Pisa <[email protected]> # for ctucanfd-driver.rst Reviewed-by: Tony Nguyen <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Reviewed-by: Stephen Hemminger <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 674ee5daa7b1..18a5be6ddd0f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -509,15 +509,18 @@ static inline bool napi_reschedule(struct napi_struct *napi)
return false;
}
-bool napi_complete_done(struct napi_struct *n, int work_done);
/**
- * napi_complete - NAPI processing complete
- * @n: NAPI context
+ * napi_complete_done - NAPI processing complete
+ * @n: NAPI context
+ * @work_done: number of packets processed
*
- * Mark NAPI processing as complete.
- * Consider using napi_complete_done() instead.
+ * Mark NAPI processing as complete. Should only be called if poll budget
+ * has not been completely consumed.
+ * Prefer over napi_complete().
* Return false if device should avoid rearming interrupts.
*/
+bool napi_complete_done(struct napi_struct *n, int work_done);
+
static inline bool napi_complete(struct napi_struct *n)
{
return napi_complete_done(n, 0);