diff mbox series

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

Message ID 20240627234808.1253337-58-hauke@hauke-m.de (mailing list archive)
State New, archived
Headers show
Series backports: Update to kernel 6.1.95 | expand

Commit Message

Hauke Mehrtens June 27, 2024, 11:47 p.m. UTC
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@hauke-m.de>
---
 backport/backport-include/linux/netdevice.h | 8 ++++++++
 1 file changed, 8 insertions(+)
diff mbox series

Patch

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 */