Subject: Re: [PATCH net-next 01/15] ice: Add E830 checksum offload support

From: Jakub Kicinski <[email-masked]>
Date: Wed, 6 Nov 2024 18:08:39 -0800

On Tue,  5 Nov 2024 14:23:35 -0800 Tony Nguyen wrote:
> +static netdev_features_t
> +ice_fix_features_gcs(struct net_device *netdev, netdev_features_t features)
> +{
> +	if (!((features & NETIF_F_HW_CSUM) && (features & NETIF_F_ALL_TSO)))
> +		return features;
> +
> +	if (netdev->features & NETIF_F_HW_CSUM) {
> +		netdev_warn(netdev, "Dropping TSO. TSO and HW checksum are mutually exclusive.\n");
> +		features &= ~NETIF_F_ALL_TSO;
> +	} else {
> +		netdev_warn(netdev, "Dropping HW checksum. TSO and HW checksum are mutually exclusive.\n");
> +		features &= ~NETIF_F_HW_CSUM;
> +	}

why dropping what the user requested with a warning and not just return
an error from ice_set_features()?