fm10k: Fix misuse of net_ratelimit()
authorJoe Perches <joe@perches.com>
Fri, 11 Aug 2017 16:17:15 +0000 (09:17 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 3 Oct 2017 15:51:27 +0000 (08:51 -0700)
Correct the backward logic using !net_ratelimit()

Miscellanea:

o Add a blank line before the error return label

Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Krishneil Singh <krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k_main.c

index 5d56ed5ad7a6415f8563f6a774c871ded51938ba..dbd69310f263ea5e4815a020bd1ec8a6113a85e5 100644 (file)
@@ -806,9 +806,10 @@ static int fm10k_tso(struct fm10k_ring *tx_ring,
        tx_desc->mss = cpu_to_le16(skb_shinfo(skb)->gso_size);
 
        return 1;
+
 err_vxlan:
        tx_ring->netdev->features &= ~NETIF_F_GSO_UDP_TUNNEL;
-       if (!net_ratelimit())
+       if (net_ratelimit())
                netdev_err(tx_ring->netdev,
                           "TSO requested for unsupported tunnel, disabling offload\n");
        return -1;