kni: fix build with 802.1p kernel support
PATCH 1/1 kni: fix build with 802.1p kernel support
C90 compilers forbid mixed declaration and code.
Signed-off-by Thomas Monjalon <[email protected]>
--- lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c +5 -2
@@ -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 */
Signature · 1 line
1.7.10.4
Adrien Mazarguil
Acked-byQuoted 6 lines · Thomas Monjalon
C90 compilers forbid mixed declaration and code.
Signed-off-by Thomas Monjalon <[email protected]>--- lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
Acked-by Adrien Mazarguil <[email protected]>
Signature · 2 lines
Adrien Mazarguil 6WIND
26/07/2013 14:12, Adrien Mazarguil :
Quoted 10 lines · Thomas Monjalon
Quoted 7 lines
C90 compilers forbid mixed declaration and code.
Signed-off-by Thomas Monjalon <[email protected]>---
lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)Acked-by Adrien Mazarguil <[email protected]>
pushed
Signature · 1 line
Thomas