netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Joe Perches <joe@perches.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 7/9] fm10k: Fix misuse of net_ratelimit()
Date: Tue,  3 Oct 2017 09:31:36 -0700	[thread overview]
Message-ID: <20171003163138.47569-8-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <20171003163138.47569-1-jeffrey.t.kirsher@intel.com>

From: Joe Perches <joe@perches.com>

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 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/intel/fm10k/fm10k_main.c b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
index 5d56ed5ad7a6..dbd69310f263 100644
--- a/drivers/net/ethernet/intel/fm10k/fm10k_main.c
+++ b/drivers/net/ethernet/intel/fm10k/fm10k_main.c
@@ -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;
-- 
2.14.2

  parent reply	other threads:[~2017-10-03 16:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-03 16:31 [net-next 0/9][pull request] 100GbE Intel Wired LAN Driver Updates 2017-10-03 Jeff Kirsher
2017-10-03 16:31 ` [net-next 1/9] fm10k: prepare_for_reset() when we lose PCIe Link Jeff Kirsher
2017-10-03 16:31 ` [net-next 2/9] fm10k: use spinlock to implement mailbox lock Jeff Kirsher
2017-10-03 16:31 ` [net-next 3/9] fm10k: use generic PM hooks instead of legacy PCIe power hooks Jeff Kirsher
2017-10-03 16:31 ` [net-next 4/9] fm10k: introduce a message queue for MAC/VLAN messages Jeff Kirsher
2017-10-03 16:31 ` [net-next 5/9] fm10k: use the MAC/VLAN queue for VF<->PF MAC/VLAN requests Jeff Kirsher
2017-10-03 16:31 ` [net-next 6/9] fm10k: bump version number Jeff Kirsher
2017-10-03 16:31 ` Jeff Kirsher [this message]
2017-10-03 16:31 ` [net-next 8/9] fm10k: prefer %s and __func__ for diagnostic prints Jeff Kirsher
2017-10-03 16:31 ` [net-next 9/9] fm10k: fix mis-ordered parameters in declaration for .ndo_set_vf_bw Jeff Kirsher
2017-10-03 23:25 ` [net-next 0/9][pull request] 100GbE Intel Wired LAN Driver Updates 2017-10-03 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171003163138.47569-8-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=joe@perches.com \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).