* [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e)
@ 2022-12-05 21:25 Tony Nguyen
2022-12-05 21:25 ` [PATCH net 1/3] i40e: Fix not setting default xps_cpus after reset Tony Nguyen
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Tony Nguyen @ 2022-12-05 21:25 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet; +Cc: Tony Nguyen, netdev
This series contains updates to i40e driver only.
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.
The following are changes since commit e8b4fc13900b8e8be48debffd0dfd391772501f7:
net: mvneta: Prevent out of bounds read in mvneta_config_rss()
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 40GbE
Michal Jaron (1):
i40e: Fix not setting default xps_cpus after reset
Przemyslaw Patynowski (1):
i40e: Disallow ip4 and ip6 l4_4_bytes
Sylwester Dziedziuch (1):
i40e: Fix for VF MAC address 0
.../net/ethernet/intel/i40e/i40e_ethtool.c | 12 ++----------
drivers/net/ethernet/intel/i40e/i40e_main.c | 19 ++++++++++++++++++-
.../ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++
3 files changed, 22 insertions(+), 11 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH net 1/3] i40e: Fix not setting default xps_cpus after reset
2022-12-05 21:25 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e) Tony Nguyen
@ 2022-12-05 21:25 ` Tony Nguyen
2022-12-05 21:25 ` [PATCH net 2/3] i40e: Fix for VF MAC address 0 Tony Nguyen
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Tony Nguyen @ 2022-12-05 21:25 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Michal Jaron, netdev, anthony.l.nguyen, Kamil Maziarz, Gurucharan
From: Michal Jaron <michalx.jaron@intel.com>
During tx rings configuration default XPS queue config is set and
__I40E_TX_XPS_INIT_DONE is locked. __I40E_TX_XPS_INIT_DONE state is
cleared and set again with default mapping only during queues build,
it means after first setup or reset with queues rebuild. (i.e.
ethtool -L <interface> combined <number>) After other resets (i.e.
ethtool -t <interface>) XPS_INIT_DONE is not cleared and those default
maps cannot be set again. It results in cleared xps_cpus mapping
until queues are not rebuild or mapping is not set by user.
Add clearing __I40E_TX_XPS_INIT_DONE state during reset to let
the driver set xps_cpus to defaults again after it was cleared.
Fixes: 6f853d4f8e93 ("i40e: allow XPS with QoS enabled")
Signed-off-by: Michal Jaron <michalx.jaron@intel.com>
Signed-off-by: Kamil Maziarz <kamil.maziarz@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index b3cb587a2032..6416322d7c18 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -10654,6 +10654,21 @@ static int i40e_rebuild_channels(struct i40e_vsi *vsi)
return 0;
}
+/**
+ * i40e_clean_xps_state - clean xps state for every tx_ring
+ * @vsi: ptr to the VSI
+ **/
+static void i40e_clean_xps_state(struct i40e_vsi *vsi)
+{
+ int i;
+
+ if (vsi->tx_rings)
+ for (i = 0; i < vsi->num_queue_pairs; i++)
+ if (vsi->tx_rings[i])
+ clear_bit(__I40E_TX_XPS_INIT_DONE,
+ vsi->tx_rings[i]->state);
+}
+
/**
* i40e_prep_for_reset - prep for the core to reset
* @pf: board private structure
@@ -10678,8 +10693,10 @@ static void i40e_prep_for_reset(struct i40e_pf *pf)
i40e_pf_quiesce_all_vsi(pf);
for (v = 0; v < pf->num_alloc_vsi; v++) {
- if (pf->vsi[v])
+ if (pf->vsi[v]) {
+ i40e_clean_xps_state(pf->vsi[v]);
pf->vsi[v]->seid = 0;
+ }
}
i40e_shutdown_adminq(&pf->hw);
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 2/3] i40e: Fix for VF MAC address 0
2022-12-05 21:25 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e) Tony Nguyen
2022-12-05 21:25 ` [PATCH net 1/3] i40e: Fix not setting default xps_cpus after reset Tony Nguyen
@ 2022-12-05 21:25 ` Tony Nguyen
2022-12-05 21:25 ` [PATCH net 3/3] i40e: Disallow ip4 and ip6 l4_4_bytes Tony Nguyen
2022-12-07 4:50 ` [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e) patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Tony Nguyen @ 2022-12-05 21:25 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Sylwester Dziedziuch, netdev, anthony.l.nguyen, Jan Sokolowski,
Konrad Jankowski
From: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
After spawning max VFs on a PF, some VFs were not getting resources and
their MAC addresses were 0. This was caused by PF sleeping before flushing
HW registers which caused VIRTCHNL_VFR_VFACTIVE to not be set in time for
VF.
Fix by adding a sleep after hw flush.
Fixes: e4b433f4a741 ("i40e: reset all VFs in parallel when rebuilding PF")
Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Jan Sokolowski <jan.sokolowski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 72ddcefc45b1..635f93d60318 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -1578,6 +1578,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
i40e_cleanup_reset_vf(vf);
i40e_flush(hw);
+ usleep_range(20000, 40000);
clear_bit(I40E_VF_STATE_RESETTING, &vf->vf_states);
return true;
@@ -1701,6 +1702,7 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr)
}
i40e_flush(hw);
+ usleep_range(20000, 40000);
clear_bit(__I40E_VF_DISABLE, pf->state);
return true;
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH net 3/3] i40e: Disallow ip4 and ip6 l4_4_bytes
2022-12-05 21:25 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e) Tony Nguyen
2022-12-05 21:25 ` [PATCH net 1/3] i40e: Fix not setting default xps_cpus after reset Tony Nguyen
2022-12-05 21:25 ` [PATCH net 2/3] i40e: Fix for VF MAC address 0 Tony Nguyen
@ 2022-12-05 21:25 ` Tony Nguyen
2022-12-07 4:50 ` [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e) patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: Tony Nguyen @ 2022-12-05 21:25 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Przemyslaw Patynowski, netdev, anthony.l.nguyen, Kamil Maziarz,
Jacob Keller, Gurucharan G
From: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Return -EOPNOTSUPP, when user requests l4_4_bytes for raw IP4 or
IP6 flow director filters. Flow director does not support filtering
on l4 bytes for PCTYPEs used by IP4 and IP6 filters.
Without this patch, user could create filters with l4_4_bytes fields,
which did not do any filtering on L4, but only on L3 fields.
Fixes: 36777d9fa24c ("i40e: check current configured input set when adding ntuple filters")
Signed-off-by: Przemyslaw Patynowski <przemyslawx.patynowski@intel.com>
Signed-off-by: Kamil Maziarz <kamil.maziarz@intel.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_ethtool.c | 12 ++----------
1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 4a6a6e48c615..f6fa63e4253c 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -4464,11 +4464,7 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi,
return -EOPNOTSUPP;
/* First 4 bytes of L4 header */
- if (usr_ip4_spec->l4_4_bytes == htonl(0xFFFFFFFF))
- new_mask |= I40E_L4_SRC_MASK | I40E_L4_DST_MASK;
- else if (!usr_ip4_spec->l4_4_bytes)
- new_mask &= ~(I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
- else
+ if (usr_ip4_spec->l4_4_bytes)
return -EOPNOTSUPP;
/* Filtering on Type of Service is not supported. */
@@ -4507,11 +4503,7 @@ static int i40e_check_fdir_input_set(struct i40e_vsi *vsi,
else
return -EOPNOTSUPP;
- if (usr_ip6_spec->l4_4_bytes == htonl(0xFFFFFFFF))
- new_mask |= I40E_L4_SRC_MASK | I40E_L4_DST_MASK;
- else if (!usr_ip6_spec->l4_4_bytes)
- new_mask &= ~(I40E_L4_SRC_MASK | I40E_L4_DST_MASK);
- else
+ if (usr_ip6_spec->l4_4_bytes)
return -EOPNOTSUPP;
/* Filtering on Traffic class is not supported. */
--
2.35.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e)
2022-12-05 21:25 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e) Tony Nguyen
` (2 preceding siblings ...)
2022-12-05 21:25 ` [PATCH net 3/3] i40e: Disallow ip4 and ip6 l4_4_bytes Tony Nguyen
@ 2022-12-07 4:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-12-07 4:50 UTC (permalink / raw)
To: Tony Nguyen; +Cc: davem, kuba, pabeni, edumazet, netdev
Hello:
This series was applied to netdev/net.git (master)
by Tony Nguyen <anthony.l.nguyen@intel.com>:
On Mon, 5 Dec 2022 13:25:20 -0800 you wrote:
> This series contains updates to i40e driver only.
>
> 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.
>
> [...]
Here is the summary with links:
- [net,1/3] i40e: Fix not setting default xps_cpus after reset
https://git.kernel.org/netdev/net/c/82e0572b2302
- [net,2/3] i40e: Fix for VF MAC address 0
https://git.kernel.org/netdev/net/c/085019704720
- [net,3/3] i40e: Disallow ip4 and ip6 l4_4_bytes
https://git.kernel.org/netdev/net/c/d64aaf3f7869
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-12-07 4:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-05 21:25 [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e) Tony Nguyen
2022-12-05 21:25 ` [PATCH net 1/3] i40e: Fix not setting default xps_cpus after reset Tony Nguyen
2022-12-05 21:25 ` [PATCH net 2/3] i40e: Fix for VF MAC address 0 Tony Nguyen
2022-12-05 21:25 ` [PATCH net 3/3] i40e: Disallow ip4 and ip6 l4_4_bytes Tony Nguyen
2022-12-07 4:50 ` [PATCH net 0/3][pull request] Intel Wired LAN Driver Updates 2022-12-05 (i40e) patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).