diff mbox series

[net-next,2/2] net: Warning about use of deprecated TX checksum offload

Message ID 1577396099-3831-3-git-send-email-tom@herbertland.com
State Rejected
Delegated to: David Miller
Headers show
Series net: Warning for protocol specific transmit checksum | expand

Commit Message

Tom Herbert Dec. 26, 2019, 9:34 p.m. UTC
Add a warning in netdev_fix_features that NETIF_F_IP_CSUM and
NETIF_F_IPV6_CSUM are deprecated and that drivers should advertise
NETIF_F_HW_CSUM instead.

Signed-off-by: Tom Herbert <tom@herbertland.com>
---
 net/core/dev.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

David Miller Dec. 26, 2019, 9:41 p.m. UTC | #1
From: Tom Herbert <tom@herbertland.com>
Date: Thu, 26 Dec 2019 13:34:59 -0800

> +	/* NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM are deprecated */
> +	if (features & (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM))
> +		netdev_warn(dev, "NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM are considered deprecated. Please fix driver to use NETIF_F_HW_CSUM.\n");

So let's put useless messages in people's kernel logs because grep
apparently doesn't work on your computer?

Fix drivers that use that flag that you care about.

No way I am applying this series, it is ill conceived.
diff mbox series

Patch

diff --git a/net/core/dev.c b/net/core/dev.c
index 0ad39c8..ef09fb7 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -8835,6 +8835,10 @@  static void netdev_sync_lower_features(struct net_device *upper,
 static netdev_features_t netdev_fix_features(struct net_device *dev,
 	netdev_features_t features)
 {
+	/* NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM are deprecated */
+	if (features & (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM))
+		netdev_warn(dev, "NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM are considered deprecated. Please fix driver to use NETIF_F_HW_CSUM.\n");
+
 	/* Fix illegal checksum combinations */
 	if ((features & NETIF_F_HW_CSUM) &&
 	    (features & (NETIF_F_IP_CSUM|NETIF_F_IPV6_CSUM))) {