Patchwork ixgbe: RX ntuple feature must check num_rx_queues

login
register
mail settings
Submitter Sebastian.Poehn@Belden.com
Date May 10, 2011, 2:21 p.m.
Message ID <OFA595D9DB.234DFCEB-ON8525788C.004ED485-8525788C.004ED485@BeldenCDT.com>
Download mbox | patch
Permalink /patch/94993/
State Awaiting Upstream
Delegated to: David Miller
Headers show

Comments

Sebastian.Poehn@Belden.com - May 10, 2011, 2:21 p.m.
The driver must check how much RX queues there are, not TX queues.

Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>

DISCLAIMER:

Privileged and/or Confidential information may be contained in this
message. If you are not the addressee of this message, you may not
copy, use or deliver this message to anyone. In such event, you
should destroy the message and kindly notify the sender by reply
e-mail. It is understood that opinions or conclusions that do not
relate to the official business of the company are neither given
nor endorsed by the company.

Thank You.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Kirsher - May 10, 2011, 6:52 p.m.
On Tue, May 10, 2011 at 07:21,  <Sebastian.Poehn@belden.com> wrote:
> The driver must check how much RX queues there are, not TX queues.
>
> --- ixgbe_ethtool.c.orig    2011-05-10 16:18:00.313745560 +0200
> +++ ixgbe_ethtool.c    2011-05-10 16:18:23.285747635 +0200
> @@ -2349,9 +2349,9 @@ static int ixgbe_set_rx_ntuple(struct ne
>
>      /*
>       * Don't allow programming if the action is a queue greater than
> -     * the number of online Tx queues.
> +     * the number of online Rx queues.
>       */
> -    if ((fs->action >= adapter->num_tx_queues) ||
> +    if ((fs->action >= adapter->num_rx_queues) ||
>          (fs->action < ETHTOOL_RXNTUPLE_ACTION_DROP))
>          return -EINVAL;
>
> Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>

Thanks Sebastian, I have added the patch to my queue of patches.

Patch

--- ixgbe_ethtool.c.orig    2011-05-10 16:18:00.313745560 +0200
+++ ixgbe_ethtool.c    2011-05-10 16:18:23.285747635 +0200
@@ -2349,9 +2349,9 @@  static int ixgbe_set_rx_ntuple(struct ne
 
     /*
      * Don't allow programming if the action is a queue greater than
-     * the number of online Tx queues.
+     * the number of online Rx queues.
      */
-    if ((fs->action >= adapter->num_tx_queues) ||
+    if ((fs->action >= adapter->num_rx_queues) ||
         (fs->action < ETHTOOL_RXNTUPLE_ACTION_DROP))
         return -EINVAL;