Skip to content

Commit 1799c1b

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2022-12-05 (i40e) Michal clears XPS init flag on reset to allow for updated values to be written. Sylwester adds sleep to VF reset to resolve issue of VFs not getting resources. Przemyslaw rejects filters for raw IPv4 or IPv6 l4_4_bytes filters as they are not supported. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue: i40e: Disallow ip4 and ip6 l4_4_bytes i40e: Fix for VF MAC address 0 i40e: Fix not setting default xps_cpus after reset ==================== Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
2 parents 78a9ea4 + d64aaf3 commit 1799c1b

File tree

3 files changed

+22
-11
lines changed

3 files changed

+22
-11
lines changed

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

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4464,11 +4464,7 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi,
44644464
return -EOPNOTSUPP;
44654465

44664466
/* First 4 bytes of L4 header */
4467-
if (usr_ip4_spec->l4_4_bytes == htonl(0xFFFFFFFF))
4468-
new_mask |= I40E_L4_SRC_MASK | I40E_L4_DST_MASK;
4469-
else if (!usr_ip4_spec->l4_4_bytes)
4470-
new_mask &= ~(I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
4471-
else
4467+
if (usr_ip4_spec->l4_4_bytes)
44724468
return -EOPNOTSUPP;
44734469

44744470
/* Filtering on Type of Service is not supported. */
@@ -4507,11 +4503,7 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi,
45074503
else
45084504
return -EOPNOTSUPP;
45094505

4510-
if (usr_ip6_spec->l4_4_bytes == htonl(0xFFFFFFFF))
4511-
new_mask |= I40E_L4_SRC_MASK | I40E_L4_DST_MASK;
4512-
else if (!usr_ip6_spec->l4_4_bytes)
4513-
new_mask &= ~(I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
4514-
else
4506+
if (usr_ip6_spec->l4_4_bytes)
45154507
return -EOPNOTSUPP;
45164508

45174509
/* Filtering on Traffic class is not supported. */

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10654,6 +10654,21 @@ static int i40e_rebuild_channels(struct i40e_vsi *vsi)
1065410654
return 0;
1065510655
}
1065610656

10657+
/**
10658+
* i40e_clean_xps_state - clean xps state for every tx_ring
10659+
* @vsi: ptr to the VSI
10660+
**/
10661+
static void i40e_clean_xps_state(struct i40e_vsi *vsi)
10662+
{
10663+
int i;
10664+
10665+
if (vsi->tx_rings)
10666+
for (i = 0; i < vsi->num_queue_pairs; i++)
10667+
if (vsi->tx_rings[i])
10668+
clear_bit(__I40E_TX_XPS_INIT_DONE,
10669+
vsi->tx_rings[i]->state);
10670+
}
10671+
1065710672
/**
1065810673
* i40e_prep_for_reset - prep for the core to reset
1065910674
* @pf: board private structure
@@ -10678,8 +10693,10 @@ static void i40e_prep_for_reset(struct i40e_pf *pf)
1067810693
i40e_pf_quiesce_all_vsi(pf);
1067910694

1068010695
for (v = 0; v < pf->num_alloc_vsi; v++) {
10681-
if (pf->vsi[v])
10696+
if (pf->vsi[v]) {
10697+
i40e_clean_xps_state(pf->vsi[v]);
1068210698
pf->vsi[v]->seid = 0;
10699+
}
1068310700
}
1068410701

1068510702
i40e_shutdown_adminq(&pf->hw);

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,6 +1578,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
15781578
i40e_cleanup_reset_vf(vf);
15791579

15801580
i40e_flush(hw);
1581+
usleep_range(20000, 40000);
15811582
clear_bit(I40E_VF_STATE_RESETTING, &vf->vf_states);
15821583

15831584
return true;
@@ -1701,6 +1702,7 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr)
17011702
}
17021703

17031704
i40e_flush(hw);
1705+
usleep_range(20000, 40000);
17041706
clear_bit(__I40E_VF_DISABLE, pf->state);
17051707

17061708
return true;

0 commit comments

Comments
 (0)