summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Monjalon <thomas.monjalon@6wind.com>2013-02-07 14:07:47 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2013-09-17 14:46:08 +0200
commit35f32b73d28a1a33d248e8c149337b1063548826 (patch)
treefb116518f716f84f8e351ce4a5830ff49804d658
parentb13ebd6a9ed540b1b1371490d052d2edd47c23bb (diff)
downloaddpdk-35f32b73d28a1a33d248e8c149337b1063548826.zip
dpdk-35f32b73d28a1a33d248e8c149337b1063548826.tar.gz
dpdk-35f32b73d28a1a33d248e8c149337b1063548826.tar.xz
kni: fix build with 802.1p kernel support
C90 compilers forbid mixed declaration and code. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
-rwxr-xr-xlib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
index 85de817..947be44 100755
--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
@@ -314,6 +314,9 @@ void ixgbe_vlan_mode(struct net_device *netdev, u32 features)
#endif
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
+#ifdef HAVE_8021P_SUPPORT
+ bool enable;
+#endif
#ifdef HAVE_VLAN_RX_REGISTER
//if (!test_bit(__IXGBE_DOWN, &adapter->state))
@@ -326,9 +329,9 @@ void ixgbe_vlan_mode(struct net_device *netdev, u32 features)
#endif
#ifdef HAVE_8021P_SUPPORT
#ifdef HAVE_VLAN_RX_REGISTER
- bool enable = (grp || (adapter->flags & IXGBE_FLAG_DCB_ENABLED));
+ enable = (grp || (adapter->flags & IXGBE_FLAG_DCB_ENABLED));
#else
- bool enable = !!(features & NETIF_F_HW_VLAN_RX);
+ enable = !!(features & NETIF_F_HW_VLAN_RX);
#endif
if (enable)
/* enable VLAN tag insert/strip */