Commit 782dbbf5 authored by Alexander Lobakin's avatar Alexander Lobakin Committed by Paolo Abeni
Browse files

netdev_features: convert NETIF_F_FCOE_MTU to dev->fcoe_mtu



Ability to handle maximum FCoE frames of 2158 bytes can never be changed
and thus more of an attribute, not a toggleable feature.
Move it from netdev_features_t to "cold" priv flags (bitfield bool) and
free yet another feature bit.

Signed-off-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
parent 05c1280a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -167,6 +167,7 @@ unsigned:1 threaded -
unsigned_long:1                     see_all_hwtstamp_requests                                       
unsigned_long:1                     change_proto_down                                               
unsigned_long:1                     netns_local                                                     
unsigned_long:1                     fcoe_mtu                                                        
struct_list_head                    net_notifier_list                                               
struct_macsec_ops*                  macsec_ops                                                      
struct_udp_tunnel_nic_info*         udp_tunnel_nic_info                                             
+2 −4
Original line number Diff line number Diff line
@@ -81,8 +81,7 @@ int cxgb_fcoe_enable(struct net_device *netdev)

	netdev->features |= NETIF_F_FCOE_CRC;
	netdev->vlan_features |= NETIF_F_FCOE_CRC;
	netdev->features |= NETIF_F_FCOE_MTU;
	netdev->vlan_features |= NETIF_F_FCOE_MTU;
	netdev->fcoe_mtu = true;

	netdev_features_change(netdev);

@@ -112,8 +111,7 @@ int cxgb_fcoe_disable(struct net_device *netdev)

	netdev->features &= ~NETIF_F_FCOE_CRC;
	netdev->vlan_features &= ~NETIF_F_FCOE_CRC;
	netdev->features &= ~NETIF_F_FCOE_MTU;
	netdev->vlan_features &= ~NETIF_F_FCOE_MTU;
	netdev->fcoe_mtu = false;

	netdev_features_change(netdev);

+1 −1
Original line number Diff line number Diff line
@@ -317,7 +317,7 @@ static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
		int max_frame = adapter->netdev->mtu + ETH_HLEN + ETH_FCS_LEN;

#ifdef IXGBE_FCOE
		if (adapter->netdev->features & NETIF_F_FCOE_MTU)
		if (adapter->netdev->fcoe_mtu)
			max_frame = max(max_frame, IXGBE_FCOE_JUMBO_FRAME_SIZE);
#endif

+2 −2
Original line number Diff line number Diff line
@@ -858,7 +858,7 @@ int ixgbe_fcoe_enable(struct net_device *netdev)

	/* enable FCoE and notify stack */
	adapter->flags |= IXGBE_FLAG_FCOE_ENABLED;
	netdev->features |= NETIF_F_FCOE_MTU;
	netdev->fcoe_mtu = true;
	netdev_features_change(netdev);

	/* release existing queues and reallocate them */
@@ -898,7 +898,7 @@ int ixgbe_fcoe_disable(struct net_device *netdev)

	/* disable FCoE and notify stack */
	adapter->flags &= ~IXGBE_FLAG_FCOE_ENABLED;
	netdev->features &= ~NETIF_F_FCOE_MTU;
	netdev->fcoe_mtu = false;

	netdev_features_change(netdev);

+1 −1
Original line number Diff line number Diff line
@@ -981,7 +981,7 @@ static int ixgbe_alloc_q_vector(struct ixgbe_adapter *adapter,
			set_bit(__IXGBE_RX_CSUM_UDP_ZERO_ERR, &ring->state);

#ifdef IXGBE_FCOE
		if (adapter->netdev->features & NETIF_F_FCOE_MTU) {
		if (adapter->netdev->fcoe_mtu) {
			struct ixgbe_ring_feature *f;
			f = &adapter->ring_feature[RING_F_FCOE];
			if ((rxr_idx >= f->offset) &&
Loading