netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: davem@davemloft.net
Cc: Todd Fujinaka <todd.fujinaka@intel.com>,
	netdev@vger.kernel.org, nhorman@redhat.com, sassmann@redhat.com,
	jogreene@redhat.com, Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Subject: [net-next 03/15] igb: report unsupported ethtool settings in set_coalesce
Date: Thu, 23 Jul 2015 06:52:32 -0700	[thread overview]
Message-ID: <1437659564-48822-4-git-send-email-jeffrey.t.kirsher@intel.com> (raw)
In-Reply-To: <1437659564-48822-1-git-send-email-jeffrey.t.kirsher@intel.com>

From: Todd Fujinaka <todd.fujinaka@intel.com>

There are many settings possible using ethtool -C/--coalesce, but not
all of them are supported in igb. Report failure when an unsupported
option is set.

Signed-off-by: Todd Fujinaka <todd.fujinaka@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
 drivers/net/ethernet/intel/igb/igb_ethtool.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
index 109cad9..b7b9c67 100644
--- a/drivers/net/ethernet/intel/igb/igb_ethtool.c
+++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c
@@ -2159,6 +2159,27 @@ static int igb_set_coalesce(struct net_device *netdev,
 	struct igb_adapter *adapter = netdev_priv(netdev);
 	int i;
 
+	if (ec->rx_max_coalesced_frames ||
+	    ec->rx_coalesce_usecs_irq ||
+	    ec->rx_max_coalesced_frames_irq ||
+	    ec->tx_max_coalesced_frames ||
+	    ec->tx_coalesce_usecs_irq ||
+	    ec->stats_block_coalesce_usecs ||
+	    ec->use_adaptive_rx_coalesce ||
+	    ec->use_adaptive_tx_coalesce ||
+	    ec->pkt_rate_low ||
+	    ec->rx_coalesce_usecs_low ||
+	    ec->rx_max_coalesced_frames_low ||
+	    ec->tx_coalesce_usecs_low ||
+	    ec->tx_max_coalesced_frames_low ||
+	    ec->pkt_rate_high ||
+	    ec->rx_coalesce_usecs_high ||
+	    ec->rx_max_coalesced_frames_high ||
+	    ec->tx_coalesce_usecs_high ||
+	    ec->tx_max_coalesced_frames_high ||
+	    ec->rate_sample_interval)
+		return -ENOTSUPP;
+
 	if ((ec->rx_coalesce_usecs > IGB_MAX_ITR_USECS) ||
 	    ((ec->rx_coalesce_usecs > 3) &&
 	     (ec->rx_coalesce_usecs < IGB_MIN_ITR_USECS)) ||
-- 
2.4.3

  parent reply	other threads:[~2015-07-23 13:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-23 13:52 [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-07-23 Jeff Kirsher
2015-07-23 13:52 ` [net-next 01/15] ixgbevf: add support for reporting RSS key and hash table for X550 Jeff Kirsher
2015-07-23 13:52 ` [net-next 02/15] e1000e: Cleanup qos request in error handling of e1000_open Jeff Kirsher
2015-07-23 13:52 ` Jeff Kirsher [this message]
2015-07-23 13:52 ` [net-next 04/15] igb: use ARRAY_SIZE to replace calculating sizeof(a)/sizeof(a[0]) Jeff Kirsher
2015-07-23 13:52 ` [net-next 05/15] igb: bump version to igb-5.3.0 Jeff Kirsher
2015-07-23 13:52 ` [net-next 06/15] i40e/i40evf: Fix and refactor dynamic ITR code Jeff Kirsher
2015-07-23 13:52 ` [net-next 07/15] i40e: clean up unneeded gotos Jeff Kirsher
2015-07-23 13:52 ` [net-next 08/15] i40e: add VF capabilities to virtual channel interface Jeff Kirsher
2015-07-23 13:52 ` [net-next 09/15] i40e/i40evf: add macros for virtual channel API version and device capability Jeff Kirsher
2015-07-23 13:52 ` [net-next 10/15] i40e: support virtual channel API 1.1 Jeff Kirsher
2015-07-23 13:52 ` [net-next 11/15] i40evf: handle big resets Jeff Kirsher
2015-07-23 13:52 ` [net-next 12/15] i40evf: support virtual channel API version 1.1 Jeff Kirsher
2015-07-23 13:52 ` [net-next 13/15] i40e: provide correct API version to older VF drivers Jeff Kirsher
2015-07-23 13:52 ` [net-next 14/15] i40e: clean up error status messages Jeff Kirsher
2015-07-23 13:52 ` [net-next 15/15] i40e: use BIT and BIT_ULL macros Jeff Kirsher
2015-07-25  7:16 ` [net-next 00/15][pull request] Intel Wired LAN Driver Updates 2015-07-23 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=1437659564-48822-4-git-send-email-jeffrey.t.kirsher@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=davem@davemloft.net \
    --cc=jogreene@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@redhat.com \
    --cc=sassmann@redhat.com \
    --cc=todd.fujinaka@intel.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).