|
@@ -39,7 +39,7 @@ static const char i40e_driver_string[] =
|
|
|
|
|
|
#define DRV_VERSION_MAJOR 1
|
|
|
#define DRV_VERSION_MINOR 3
|
|
|
-#define DRV_VERSION_BUILD 4
|
|
|
+#define DRV_VERSION_BUILD 6
|
|
|
#define DRV_VERSION __stringify(DRV_VERSION_MAJOR) "." \
|
|
|
__stringify(DRV_VERSION_MINOR) "." \
|
|
|
__stringify(DRV_VERSION_BUILD) DRV_KERN
|
|
@@ -1123,6 +1123,18 @@ static void i40e_update_pf_stats(struct i40e_pf *pf)
|
|
|
pf->stat_offsets_loaded,
|
|
|
&osd->rx_lpi_count, &nsd->rx_lpi_count);
|
|
|
|
|
|
+ if (pf->flags & I40E_FLAG_FD_SB_ENABLED &&
|
|
|
+ !(pf->auto_disable_flags & I40E_FLAG_FD_SB_ENABLED))
|
|
|
+ nsd->fd_sb_status = true;
|
|
|
+ else
|
|
|
+ nsd->fd_sb_status = false;
|
|
|
+
|
|
|
+ if (pf->flags & I40E_FLAG_FD_ATR_ENABLED &&
|
|
|
+ !(pf->auto_disable_flags & I40E_FLAG_FD_ATR_ENABLED))
|
|
|
+ nsd->fd_atr_status = true;
|
|
|
+ else
|
|
|
+ nsd->fd_atr_status = false;
|
|
|
+
|
|
|
pf->stat_offsets_loaded = true;
|
|
|
}
|
|
|
|
|
@@ -7673,7 +7685,7 @@ static int i40e_sw_init(struct i40e_pf *pf)
|
|
|
}
|
|
|
|
|
|
/* MFP mode enabled */
|
|
|
- if (pf->hw.func_caps.npar_enable || pf->hw.func_caps.mfp_mode_1) {
|
|
|
+ if (pf->hw.func_caps.npar_enable || pf->hw.func_caps.flex10_enable) {
|
|
|
pf->flags |= I40E_FLAG_MFP_ENABLED;
|
|
|
dev_info(&pf->pdev->dev, "MFP mode Enabled\n");
|
|
|
if (i40e_get_npar_bw_setting(pf))
|
|
@@ -7981,7 +7993,6 @@ static int i40e_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
|
|
|
return err;
|
|
|
}
|
|
|
|
|
|
-#ifdef HAVE_BRIDGE_ATTRIBS
|
|
|
/**
|
|
|
* i40e_ndo_bridge_setlink - Set the hardware bridge mode
|
|
|
* @dev: the netdev being configured
|
|
@@ -7995,7 +8006,8 @@ static int i40e_ndo_fdb_add(struct ndmsg *ndm, struct nlattr *tb[],
|
|
|
* bridge mode enabled.
|
|
|
**/
|
|
|
static int i40e_ndo_bridge_setlink(struct net_device *dev,
|
|
|
- struct nlmsghdr *nlh)
|
|
|
+ struct nlmsghdr *nlh,
|
|
|
+ u16 flags)
|
|
|
{
|
|
|
struct i40e_netdev_priv *np = netdev_priv(dev);
|
|
|
struct i40e_vsi *vsi = np->vsi;
|
|
@@ -8066,14 +8078,9 @@ static int i40e_ndo_bridge_setlink(struct net_device *dev,
|
|
|
* Return the mode in which the hardware bridge is operating in
|
|
|
* i.e VEB or VEPA.
|
|
|
**/
|
|
|
-#ifdef HAVE_BRIDGE_FILTER
|
|
|
static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
|
|
|
struct net_device *dev,
|
|
|
u32 filter_mask, int nlflags)
|
|
|
-#else
|
|
|
-static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
|
|
|
- struct net_device *dev, int nlflags)
|
|
|
-#endif /* HAVE_BRIDGE_FILTER */
|
|
|
{
|
|
|
struct i40e_netdev_priv *np = netdev_priv(dev);
|
|
|
struct i40e_vsi *vsi = np->vsi;
|
|
@@ -8097,7 +8104,25 @@ static int i40e_ndo_bridge_getlink(struct sk_buff *skb, u32 pid, u32 seq,
|
|
|
return ndo_dflt_bridge_getlink(skb, pid, seq, dev, veb->bridge_mode,
|
|
|
nlflags, 0, 0, filter_mask, NULL);
|
|
|
}
|
|
|
-#endif /* HAVE_BRIDGE_ATTRIBS */
|
|
|
+
|
|
|
+#define I40E_MAX_TUNNEL_HDR_LEN 80
|
|
|
+/**
|
|
|
+ * i40e_features_check - Validate encapsulated packet conforms to limits
|
|
|
+ * @skb: skb buff
|
|
|
+ * @netdev: This physical port's netdev
|
|
|
+ * @features: Offload features that the stack believes apply
|
|
|
+ **/
|
|
|
+static netdev_features_t i40e_features_check(struct sk_buff *skb,
|
|
|
+ struct net_device *dev,
|
|
|
+ netdev_features_t features)
|
|
|
+{
|
|
|
+ if (skb->encapsulation &&
|
|
|
+ (skb_inner_mac_header(skb) - skb_transport_header(skb) >
|
|
|
+ I40E_MAX_TUNNEL_HDR_LEN))
|
|
|
+ return features & ~(NETIF_F_ALL_CSUM | NETIF_F_GSO_MASK);
|
|
|
+
|
|
|
+ return features;
|
|
|
+}
|
|
|
|
|
|
static const struct net_device_ops i40e_netdev_ops = {
|
|
|
.ndo_open = i40e_open,
|
|
@@ -8133,10 +8158,9 @@ static const struct net_device_ops i40e_netdev_ops = {
|
|
|
#endif
|
|
|
.ndo_get_phys_port_id = i40e_get_phys_port_id,
|
|
|
.ndo_fdb_add = i40e_ndo_fdb_add,
|
|
|
-#ifdef HAVE_BRIDGE_ATTRIBS
|
|
|
+ .ndo_features_check = i40e_features_check,
|
|
|
.ndo_bridge_getlink = i40e_ndo_bridge_getlink,
|
|
|
.ndo_bridge_setlink = i40e_ndo_bridge_setlink,
|
|
|
-#endif /* HAVE_BRIDGE_ATTRIBS */
|
|
|
};
|
|
|
|
|
|
/**
|
|
@@ -9743,7 +9767,8 @@ static int i40e_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
|
|
|
|
|
err = i40e_init_shared_code(hw);
|
|
|
if (err) {
|
|
|
- dev_info(&pdev->dev, "init_shared_code failed: %d\n", err);
|
|
|
+ dev_warn(&pdev->dev, "unidentified MAC or BLANK NVM: %d\n",
|
|
|
+ err);
|
|
|
goto err_pf_reset;
|
|
|
}
|
|
|
|