ixgbe: fix ethtool loopback diagnostic with DCB enabled
authorEmil Tantilov <emil.s.tantilov@intel.com>
Tue, 23 Jul 2013 01:56:58 +0000 (01:56 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 13 Sep 2013 16:41:33 +0000 (09:41 -0700)
This patch disables DCB prior to running the loopback test.
When DCB is enabled the frames may be modified on Tx (by adding vlan tag)
which will fail the check on Rx.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Jack Morgan <jack.morgan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c

index 0e1b973659b0a006377fc2f4e84526266cdaecff..08efc253fb8d2886fda86249e3d38a07a1a495d4 100644 (file)
@@ -1805,6 +1805,10 @@ static int ixgbe_run_loopback_test(struct ixgbe_adapter *adapter)
        unsigned int size = 1024;
        netdev_tx_t tx_ret_val;
        struct sk_buff *skb;
+       u32 flags_orig = adapter->flags;
+
+       /* DCB can modify the frames on Tx */
+       adapter->flags &= ~IXGBE_FLAG_DCB_ENABLED;
 
        /* allocate test skb */
        skb = alloc_skb(size, GFP_KERNEL);
@@ -1857,6 +1861,7 @@ static int ixgbe_run_loopback_test(struct ixgbe_adapter *adapter)
 
        /* free the original skb */
        kfree_skb(skb);
+       adapter->flags = flags_orig;
 
        return ret_val;
 }
This page took 0.039837 seconds and 5 git commands to generate.