Skip to content

Commit e109a69

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue
Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates 2015-10-15 This series contains updates to i40e, i40evf and ixgbe. Emil changes the ixgbe driver to disable LRO by default in favor or GRO. Mark provides two changes for ixgbe, first fixes a semaphore issue when a reset never completes, it is necessary to retake the semaphore before returning. Jesse fixes up a missing function header comment variable reference. Then enables ethtool priv flags to control flow director at runtime. Neerav changes several i40e error messages to debug only since the messages were printing when there was no functional issue and were meant for debug only. Catherine changes the i40e driver to make only X722 support 100M SGMII, since it is the only device to actually support it. Anjali modifies the i40e/i40evf driver to add writeback on ITR offload support for X722 since the device has a way to work around the descriptor writeback issue. Mitch cleans up obsolete code. Also reduces the i40evf init time by shortening up the delays in the init task to aid in performance in load/unload tests and mitigates DMAR errors in VF enable/disable tests. Shannon modifies i40e to allow flow director sideband when the device is in MFP mode and only has one partition enabled, since we still have plenty of interrupts for managing the flow director activity. Also cleaned up flow director ATR control in debugfs since the priv flag has been added to our ethtool interface. Makes several general code cleanups of redundant or unnecessary code for i40e. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2 parents f6bba89 + a85ce53 commit e109a69

14 files changed

Lines changed: 153 additions & 104 deletions

‎drivers/net/ethernet/intel/i40e/i40e.h‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
/* Ethtool Private Flags */
103103
#define I40E_PRIV_FLAGS_NPAR_FLAG BIT(0)
104104
#define I40E_PRIV_FLAGS_LINKPOLL_FLAG BIT(1)
105+
#define I40E_PRIV_FLAGS_FD_ATR BIT(2)
105106

106107
#define I40E_NVM_VERSION_LO_SHIFT 0
107108
#define I40E_NVM_VERSION_LO_MASK (0xff << I40E_NVM_VERSION_LO_SHIFT)
@@ -332,6 +333,7 @@ struct i40e_pf {
332333
#define I40E_FLAG_MULTIPLE_TCP_UDP_RSS_PCTYPE BIT_ULL(38)
333334
#define I40E_FLAG_LINK_POLLING_ENABLED BIT_ULL(39)
334335
#define I40E_FLAG_VEB_MODE_ENABLED BIT_ULL(40)
336+
#define I40E_FLAG_NO_PCI_LINK_CHECK BIT_ULL(42)
335337

336338
/* tracks features that get auto disabled by errors */
337339
u64 auto_disable_flags;

‎drivers/net/ethernet/intel/i40e/i40e_common.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,6 +1617,9 @@ i40e_status i40e_aq_get_phy_capabilities(struct i40e_hw *hw,
16171617
if (hw->aq.asq_last_status == I40E_AQ_RC_EIO)
16181618
status = I40E_ERR_UNKNOWN_PHY;
16191619

1620+
if (report_init)
1621+
hw->phy.phy_types = le32_to_cpu(abilities->phy_type);
1622+
16201623
return status;
16211624
}
16221625

‎drivers/net/ethernet/intel/i40e/i40e_dcb_nl.c‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,10 +240,9 @@ static void i40e_dcbnl_del_app(struct i40e_pf *pf,
240240
for (v = 0; v < pf->num_alloc_vsi; v++) {
241241
if (pf->vsi[v] && pf->vsi[v]->netdev) {
242242
err = i40e_dcbnl_vsi_del_app(pf->vsi[v], app);
243-
if (err)
244-
dev_info(&pf->pdev->dev, "Failed deleting app for VSI seid=%d err=%d sel=%d proto=0x%x prio=%d\n",
245-
pf->vsi[v]->seid, err, app->selector,
246-
app->protocolid, app->priority);
243+
dev_dbg(&pf->pdev->dev, "Deleting app for VSI seid=%d err=%d sel=%d proto=0x%x prio=%d\n",
244+
pf->vsi[v]->seid, err, app->selector,
245+
app->protocolid, app->priority);
247246
}
248247
}
249248
}

‎drivers/net/ethernet/intel/i40e/i40e_debugfs.c‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -953,24 +953,6 @@ static void i40e_dbg_dump_veb_all(struct i40e_pf *pf)
953953
}
954954
}
955955

956-
/**
957-
* i40e_dbg_cmd_fd_ctrl - Enable/disable FD sideband/ATR
958-
* @pf: the PF that would be altered
959-
* @flag: flag that needs enabling or disabling
960-
* @enable: Enable/disable FD SD/ATR
961-
**/
962-
static void i40e_dbg_cmd_fd_ctrl(struct i40e_pf *pf, u64 flag, bool enable)
963-
{
964-
if (enable) {
965-
pf->flags |= flag;
966-
} else {
967-
pf->flags &= ~flag;
968-
pf->auto_disable_flags |= flag;
969-
}
970-
dev_info(&pf->pdev->dev, "requesting a PF reset\n");
971-
i40e_do_reset_safe(pf, BIT(__I40E_PF_RESET_REQUESTED));
972-
}
973-
974956
#define I40E_MAX_DEBUG_OUT_BUFFER (4096*4)
975957
/**
976958
* i40e_dbg_command_write - write into command datum
@@ -1759,10 +1741,6 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
17591741
raw_packet = NULL;
17601742
kfree(asc_packet);
17611743
asc_packet = NULL;
1762-
} else if (strncmp(cmd_buf, "fd-atr off", 10) == 0) {
1763-
i40e_dbg_cmd_fd_ctrl(pf, I40E_FLAG_FD_ATR_ENABLED, false);
1764-
} else if (strncmp(cmd_buf, "fd-atr on", 9) == 0) {
1765-
i40e_dbg_cmd_fd_ctrl(pf, I40E_FLAG_FD_ATR_ENABLED, true);
17661744
} else if (strncmp(cmd_buf, "fd current cnt", 14) == 0) {
17671745
dev_info(&pf->pdev->dev, "FD current total filter count for this interface: %d\n",
17681746
i40e_get_current_fd_count(pf));
@@ -1989,8 +1967,6 @@ static ssize_t i40e_dbg_command_write(struct file *filp,
19891967
dev_info(&pf->pdev->dev, " send indirect aq_cmd <flags> <opcode> <datalen> <retval> <cookie_h> <cookie_l> <param0> <param1> <param2> <param3> <buffer_len>\n");
19901968
dev_info(&pf->pdev->dev, " add fd_filter <dest q_index> <flex_off> <pctype> <dest_vsi> <dest_ctl> <fd_status> <cnt_index> <fd_id> <packet_len> <packet>\n");
19911969
dev_info(&pf->pdev->dev, " rem fd_filter <dest q_index> <flex_off> <pctype> <dest_vsi> <dest_ctl> <fd_status> <cnt_index> <fd_id> <packet_len> <packet>\n");
1992-
dev_info(&pf->pdev->dev, " fd-atr off\n");
1993-
dev_info(&pf->pdev->dev, " fd-atr on\n");
19941970
dev_info(&pf->pdev->dev, " fd current cnt");
19951971
dev_info(&pf->pdev->dev, " lldp start\n");
19961972
dev_info(&pf->pdev->dev, " lldp stop\n");

‎drivers/net/ethernet/intel/i40e/i40e_ethtool.c‎

Lines changed: 40 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,6 @@ static const struct i40e_stats i40e_gstrings_misc_stats[] = {
9090
I40E_VSI_STAT("tx_linearize", tx_linearize),
9191
};
9292

93-
static int i40e_add_fdir_ethtool(struct i40e_vsi *vsi,
94-
struct ethtool_rxnfc *cmd);
95-
9693
/* These PF_STATs might look like duplicates of some NETDEV_STATs,
9794
* but they are separate. This device supports Virtualization, and
9895
* as such might have several netdevs supporting VMDq and FCoE going
@@ -231,6 +228,7 @@ static const char i40e_gstrings_test[][ETH_GSTRING_LEN] = {
231228
static const char i40e_priv_flags_strings[][ETH_GSTRING_LEN] = {
232229
"NPAR",
233230
"LinkPolling",
231+
"flow-director-atr",
234232
};
235233

236234
#define I40E_PRIV_FLAGS_STR_LEN ARRAY_SIZE(i40e_priv_flags_strings)
@@ -254,7 +252,8 @@ static void i40e_partition_setting_complaint(struct i40e_pf *pf)
254252
**/
255253
static void i40e_get_settings_link_up(struct i40e_hw *hw,
256254
struct ethtool_cmd *ecmd,
257-
struct net_device *netdev)
255+
struct net_device *netdev,
256+
struct i40e_pf *pf)
258257
{
259258
struct i40e_link_status *hw_link_info = &hw->phy.link_info;
260259
u32 link_speed = hw_link_info->link_speed;
@@ -298,16 +297,18 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
298297
break;
299298
case I40E_PHY_TYPE_10GBASE_T:
300299
case I40E_PHY_TYPE_1000BASE_T:
301-
case I40E_PHY_TYPE_100BASE_TX:
302300
ecmd->supported = SUPPORTED_Autoneg |
303301
SUPPORTED_10000baseT_Full |
304-
SUPPORTED_1000baseT_Full |
305-
SUPPORTED_100baseT_Full;
302+
SUPPORTED_1000baseT_Full;
306303
ecmd->advertising = ADVERTISED_Autoneg;
307304
if (hw_link_info->requested_speeds & I40E_LINK_SPEED_10GB)
308305
ecmd->advertising |= ADVERTISED_10000baseT_Full;
309306
if (hw_link_info->requested_speeds & I40E_LINK_SPEED_1GB)
310307
ecmd->advertising |= ADVERTISED_1000baseT_Full;
308+
break;
309+
case I40E_PHY_TYPE_100BASE_TX:
310+
ecmd->supported = SUPPORTED_Autoneg |
311+
SUPPORTED_100baseT_Full;
311312
if (hw_link_info->requested_speeds & I40E_LINK_SPEED_100MB)
312313
ecmd->advertising |= ADVERTISED_100baseT_Full;
313314
break;
@@ -327,12 +328,15 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
327328
break;
328329
case I40E_PHY_TYPE_SGMII:
329330
ecmd->supported = SUPPORTED_Autoneg |
330-
SUPPORTED_1000baseT_Full |
331-
SUPPORTED_100baseT_Full;
331+
SUPPORTED_1000baseT_Full;
332332
if (hw_link_info->requested_speeds & I40E_LINK_SPEED_1GB)
333333
ecmd->advertising |= ADVERTISED_1000baseT_Full;
334-
if (hw_link_info->requested_speeds & I40E_LINK_SPEED_100MB)
335-
ecmd->advertising |= ADVERTISED_100baseT_Full;
334+
if (pf->hw.mac.type == I40E_MAC_X722) {
335+
ecmd->supported |= SUPPORTED_100baseT_Full;
336+
if (hw_link_info->requested_speeds &
337+
I40E_LINK_SPEED_100MB)
338+
ecmd->advertising |= ADVERTISED_100baseT_Full;
339+
}
336340
break;
337341
/* Backplane is set based on supported phy types in get_settings
338342
* so don't set anything here but don't warn either
@@ -380,7 +384,8 @@ static void i40e_get_settings_link_up(struct i40e_hw *hw,
380384
* Reports link settings that can be determined when link is down
381385
**/
382386
static void i40e_get_settings_link_down(struct i40e_hw *hw,
383-
struct ethtool_cmd *ecmd)
387+
struct ethtool_cmd *ecmd,
388+
struct i40e_pf *pf)
384389
{
385390
enum i40e_aq_capabilities_phy_type phy_types = hw->phy.phy_types;
386391

@@ -391,11 +396,13 @@ static void i40e_get_settings_link_down(struct i40e_hw *hw,
391396
ecmd->advertising = 0x0;
392397
if (phy_types & I40E_CAP_PHY_TYPE_SGMII) {
393398
ecmd->supported |= SUPPORTED_Autoneg |
394-
SUPPORTED_1000baseT_Full |
395-
SUPPORTED_100baseT_Full;
399+
SUPPORTED_1000baseT_Full;
396400
ecmd->advertising |= ADVERTISED_Autoneg |
397-
ADVERTISED_1000baseT_Full |
398-
ADVERTISED_100baseT_Full;
401+
ADVERTISED_1000baseT_Full;
402+
if (pf->hw.mac.type == I40E_MAC_X722) {
403+
ecmd->supported |= SUPPORTED_100baseT_Full;
404+
ecmd->advertising |= ADVERTISED_100baseT_Full;
405+
}
399406
}
400407
if (phy_types & I40E_CAP_PHY_TYPE_XAUI ||
401408
phy_types & I40E_CAP_PHY_TYPE_XFI ||
@@ -424,7 +431,8 @@ static void i40e_get_settings_link_down(struct i40e_hw *hw,
424431
ecmd->advertising |= ADVERTISED_Autoneg |
425432
ADVERTISED_40000baseCR4_Full;
426433
}
427-
if (phy_types & I40E_CAP_PHY_TYPE_100BASE_TX) {
434+
if ((phy_types & I40E_CAP_PHY_TYPE_100BASE_TX) &&
435+
!(phy_types & I40E_CAP_PHY_TYPE_1000BASE_T)) {
428436
ecmd->supported |= SUPPORTED_Autoneg |
429437
SUPPORTED_100baseT_Full;
430438
ecmd->advertising |= ADVERTISED_Autoneg |
@@ -466,9 +474,9 @@ static int i40e_get_settings(struct net_device *netdev,
466474
bool link_up = hw_link_info->link_info & I40E_AQ_LINK_UP;
467475

468476
if (link_up)
469-
i40e_get_settings_link_up(hw, ecmd, netdev);
477+
i40e_get_settings_link_up(hw, ecmd, netdev, pf);
470478
else
471-
i40e_get_settings_link_down(hw, ecmd);
479+
i40e_get_settings_link_down(hw, ecmd, pf);
472480

473481
/* Now set the settings that don't rely on link being up/down */
474482

@@ -2666,6 +2674,8 @@ static u32 i40e_get_priv_flags(struct net_device *dev)
26662674
I40E_PRIV_FLAGS_NPAR_FLAG : 0;
26672675
ret_flags |= pf->flags & I40E_FLAG_LINK_POLLING_ENABLED ?
26682676
I40E_PRIV_FLAGS_LINKPOLL_FLAG : 0;
2677+
ret_flags |= pf->flags & I40E_FLAG_FD_ATR_ENABLED ?
2678+
I40E_PRIV_FLAGS_FD_ATR : 0;
26692679

26702680
return ret_flags;
26712681
}
@@ -2686,6 +2696,17 @@ static int i40e_set_priv_flags(struct net_device *dev, u32 flags)
26862696
else
26872697
pf->flags &= ~I40E_FLAG_LINK_POLLING_ENABLED;
26882698

2699+
/* allow the user to control the state of the Flow
2700+
* Director ATR (Application Targeted Routing) feature
2701+
* of the driver
2702+
*/
2703+
if (flags & I40E_PRIV_FLAGS_FD_ATR) {
2704+
pf->flags |= I40E_FLAG_FD_ATR_ENABLED;
2705+
} else {
2706+
pf->flags &= ~I40E_FLAG_FD_ATR_ENABLED;
2707+
pf->auto_disable_flags |= I40E_FLAG_FD_ATR_ENABLED;
2708+
}
2709+
26892710
return 0;
26902711
}
26912712

‎drivers/net/ethernet/intel/i40e/i40e_fcoe.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ void i40e_init_pf_fcoe(struct i40e_pf *pf)
284284
pf->fcoe_hmc_filt_num = 0;
285285

286286
if (!pf->hw.func_caps.fcoe) {
287-
dev_info(&pf->pdev->dev, "FCoE capability is disabled\n");
287+
dev_dbg(&pf->pdev->dev, "FCoE capability is disabled\n");
288288
return;
289289
}
290290

0 commit comments

Comments
 (0)