Skip to content

Commit de7a7e3

Browse files
Alexander DuyckJeff Kirsher
authored andcommitted
ixgbe: Move ipsec init function to before reset call
This patch moves the IPsec init function in ixgbe_sw_init. This way it is a bit more consistent with the placement of similar initialization functions and is placed before the reset_hw call which should allow us to clean up any link issues that may be introduced by the fact that we force the link up if somehow the device had IPsec still enabled before the driver was loaded. In addition to the function move it is necessary to change the assignment of netdev->features. The easiest way to do this is to just test for the existence of adapter->ipsec and if it is present we set the feature bits. Fixes: 49a94d7 ("ixgbe: add ipsec engine start and stop routines") Reported-by: Andre Tomt <[email protected]> Signed-off-by: Alexander Duyck <[email protected]> Acked-by: Shannon Nelson <[email protected]> Tested-by: Andrew Bowers <[email protected]> Signed-off-by: Jeff Kirsher <[email protected]>
1 parent e433f3a commit de7a7e3

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

drivers/net/ethernet/intel/ixgbe/ixgbe_ipsec.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,13 +1001,6 @@ void ixgbe_init_ipsec_offload(struct ixgbe_adapter *adapter)
10011001

10021002
adapter->netdev->xfrmdev_ops = &ixgbe_xfrmdev_ops;
10031003

1004-
#define IXGBE_ESP_FEATURES (NETIF_F_HW_ESP | \
1005-
NETIF_F_HW_ESP_TX_CSUM | \
1006-
NETIF_F_GSO_ESP)
1007-
1008-
adapter->netdev->features |= IXGBE_ESP_FEATURES;
1009-
adapter->netdev->hw_enc_features |= IXGBE_ESP_FEATURES;
1010-
10111004
return;
10121005

10131006
err2:

drivers/net/ethernet/intel/ixgbe/ixgbe_main.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6117,6 +6117,7 @@ static int ixgbe_sw_init(struct ixgbe_adapter *adapter,
61176117
#ifdef CONFIG_IXGBE_DCB
61186118
ixgbe_init_dcb(adapter);
61196119
#endif
6120+
ixgbe_init_ipsec_offload(adapter);
61206121

61216122
/* default flow control settings */
61226123
hw->fc.requested_mode = ixgbe_fc_full;
@@ -10429,6 +10430,14 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1042910430
if (hw->mac.type >= ixgbe_mac_82599EB)
1043010431
netdev->features |= NETIF_F_SCTP_CRC;
1043110432

10433+
#ifdef CONFIG_XFRM_OFFLOAD
10434+
#define IXGBE_ESP_FEATURES (NETIF_F_HW_ESP | \
10435+
NETIF_F_HW_ESP_TX_CSUM | \
10436+
NETIF_F_GSO_ESP)
10437+
10438+
if (adapter->ipsec)
10439+
netdev->features |= IXGBE_ESP_FEATURES;
10440+
#endif
1043210441
/* copy netdev features into list of user selectable features */
1043310442
netdev->hw_features |= netdev->features |
1043410443
NETIF_F_HW_VLAN_CTAG_FILTER |
@@ -10491,8 +10500,6 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
1049110500
NETIF_F_FCOE_MTU;
1049210501
}
1049310502
#endif /* IXGBE_FCOE */
10494-
ixgbe_init_ipsec_offload(adapter);
10495-
1049610503
if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)
1049710504
netdev->hw_features |= NETIF_F_LRO;
1049810505
if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)

0 commit comments

Comments
 (0)