[PATCH 57/75] headr: Add empty dev_set_threaded()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



dev_set_threaded() allows to deactivated threadded NAPI, threaded NAPI
is only supported in kernel 5.12 and later. If some code wants to set it
in older kenrl versions just return an error.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 backport/backport-include/linux/netdevice.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index 1ec5b1d2..cbc96124 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -250,4 +250,12 @@ dev_addr_mod(struct net_device *dev, unsigned int offset,
 }
 #endif /* < 5.15 */
 
+#if LINUX_VERSION_IS_LESS(5,13,0)
+#define dev_set_threaded LINUX_BACKPORT(dev_set_threaded)
+static inline int dev_set_threaded(struct net_device *dev, bool threaded)
+{
+	return -EOPNOTSUPP;
+}
+#endif /* < 5.13 */
+
 #endif /* __BACKPORT_NETDEVICE_H */
-- 
2.45.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux