* [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09
@ 2022-06-09 16:26 Tony Nguyen
2022-06-09 16:26 ` [PATCH net 1/4] i40e: Fix adding ADQ filter to TC0 Tony Nguyen
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Tony Nguyen @ 2022-06-09 16:26 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet; +Cc: Tony Nguyen, netdev, sassmann
This series contains updates to i40e and iavf drivers.
Grzegorz prevents addition of TC flower filters to TC0 and fixes queue
iteration for VF ADQ to number of actual queues for i40e.
Aleksandr prevents running of ethtool tests when device is being reset
for i40e.
Michal resolves an issue where iavf does not report its MAC address
properly.
The following are changes since commit 647df0d41b6bd8f4987dde6e8d8d0aba5b082985:
net: amd-xgbe: fix clang -Wformat warning
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 40GbE
Aleksandr Loktionov (1):
i40e: Fix call trace in setup_tx_descriptors
Grzegorz Szczurek (2):
i40e: Fix adding ADQ filter to TC0
i40e: Fix calculating the number of queue pairs
Michal Wilczynski (1):
iavf: Fix issue with MAC address of VF shown as zero
.../net/ethernet/intel/i40e/i40e_ethtool.c | 25 +++++++++++++------
drivers/net/ethernet/intel/i40e/i40e_main.c | 5 ++++
.../ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +-
drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
4 files changed, 24 insertions(+), 10 deletions(-)
--
2.35.1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH net 1/4] i40e: Fix adding ADQ filter to TC0
2022-06-09 16:26 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09 Tony Nguyen
@ 2022-06-09 16:26 ` Tony Nguyen
2022-06-11 5:08 ` Jakub Kicinski
2022-06-09 16:26 ` [PATCH net 2/4] i40e: Fix calculating the number of queue pairs Tony Nguyen
` (3 subsequent siblings)
4 siblings, 1 reply; 8+ messages in thread
From: Tony Nguyen @ 2022-06-09 16:26 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Grzegorz Szczurek, netdev, anthony.l.nguyen, sassmann,
Jedrzej Jagielski, Bharathi Sreenivas
From: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Procedure of configure tc flower filters erroneously allows to create
filters on TC0 where unfiltered packets are also directed by default.
Issue was caused by insufficient checks of hw_tc parameter specifying
the hardware traffic class to pass matching packets to.
Fix checking hw_tc parameter which blocks creation of filters on TC0.
Fixes: 2f4b411a3d67 ("i40e: Enable cloud filters via tc-flower")
Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c
index 332a608dbaa6..72576bb3e94d 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_main.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
@@ -8542,6 +8542,11 @@ static int i40e_configure_clsflower(struct i40e_vsi *vsi,
return -EOPNOTSUPP;
}
+ if (!tc) {
+ dev_err(&pf->pdev->dev, "Unable to add filter because of invalid destination");
+ return -EINVAL;
+ }
+
if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) ||
test_bit(__I40E_RESET_INTR_RECEIVED, pf->state))
return -EBUSY;
--
2.35.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net 2/4] i40e: Fix calculating the number of queue pairs
2022-06-09 16:26 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09 Tony Nguyen
2022-06-09 16:26 ` [PATCH net 1/4] i40e: Fix adding ADQ filter to TC0 Tony Nguyen
@ 2022-06-09 16:26 ` Tony Nguyen
2022-06-09 16:26 ` [PATCH net 3/4] i40e: Fix call trace in setup_tx_descriptors Tony Nguyen
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2022-06-09 16:26 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Grzegorz Szczurek, netdev, anthony.l.nguyen, sassmann,
Jedrzej Jagielski, Bharathi Sreenivas
From: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
If ADQ is enabled for a VF, then actual number of queue pair
is a number of currently available traffic classes for this VF.
Without this change the configuration of the Rx/Tx queues
fails with error.
Fixes: d29e0d233e0d ("i40e: missing input validation on VF message handling by the PF")
Signed-off-by: Grzegorz Szczurek <grzegorzx.szczurek@intel.com>
Signed-off-by: Jedrzej Jagielski <jedrzej.jagielski@intel.com>
Tested-by: Bharathi Sreenivas <bharathi.sreenivas@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, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
index 2606e8f0f19b..033ea71763e3 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
@@ -2282,7 +2282,7 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg)
}
if (vf->adq_enabled) {
- for (i = 0; i < I40E_MAX_VF_VSI; i++)
+ for (i = 0; i < vf->num_tc; i++)
num_qps_all += vf->ch[i].num_qps;
if (num_qps_all != qci->num_queue_pairs) {
aq_ret = I40E_ERR_PARAM;
--
2.35.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net 3/4] i40e: Fix call trace in setup_tx_descriptors
2022-06-09 16:26 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09 Tony Nguyen
2022-06-09 16:26 ` [PATCH net 1/4] i40e: Fix adding ADQ filter to TC0 Tony Nguyen
2022-06-09 16:26 ` [PATCH net 2/4] i40e: Fix calculating the number of queue pairs Tony Nguyen
@ 2022-06-09 16:26 ` Tony Nguyen
2022-06-09 16:26 ` [PATCH net 4/4] iavf: Fix issue with MAC address of VF shown as zero Tony Nguyen
2022-06-11 5:20 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09 patchwork-bot+netdevbpf
4 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2022-06-09 16:26 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Aleksandr Loktionov, netdev, anthony.l.nguyen, sassmann,
Michal Jaron, Gurucharan
From: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
After PF reset and ethtool -t there was call trace in dmesg
sometimes leading to panic. When there was some time, around 5
seconds, between reset and test there were no errors.
Problem was that pf reset calls i40e_vsi_close in prep_for_reset
and ethtool -t calls i40e_vsi_close in diag_test. If there was not
enough time between those commands the second i40e_vsi_close starts
before previous i40e_vsi_close was done which leads to crash.
Add check to diag_test if pf is in reset and don't start offline
tests if it is true.
Add netif_info("testing failed") into unhappy path of i40e_diag_test()
Fixes: e17bc411aea8 ("i40e: Disable offline diagnostics if VFs are enabled")
Fixes: 510efb2682b3 ("i40e: Fix ethtool offline diagnostic with netqueues")
Signed-off-by: Michal Jaron <michalx.jaron@intel.com>
Signed-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Tested-by: Gurucharan <gurucharanx.g@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
.../net/ethernet/intel/i40e/i40e_ethtool.c | 25 +++++++++++++------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
index 610f00cbaff9..19704f5c8291 100644
--- a/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
+++ b/drivers/net/ethernet/intel/i40e/i40e_ethtool.c
@@ -2586,15 +2586,16 @@ static void i40e_diag_test(struct net_device *netdev,
set_bit(__I40E_TESTING, pf->state);
+ if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) ||
+ test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) {
+ dev_warn(&pf->pdev->dev,
+ "Cannot start offline testing when PF is in reset state.\n");
+ goto skip_ol_tests;
+ }
+
if (i40e_active_vfs(pf) || i40e_active_vmdqs(pf)) {
dev_warn(&pf->pdev->dev,
"Please take active VFs and Netqueues offline and restart the adapter before running NIC diagnostics\n");
- data[I40E_ETH_TEST_REG] = 1;
- data[I40E_ETH_TEST_EEPROM] = 1;
- data[I40E_ETH_TEST_INTR] = 1;
- data[I40E_ETH_TEST_LINK] = 1;
- eth_test->flags |= ETH_TEST_FL_FAILED;
- clear_bit(__I40E_TESTING, pf->state);
goto skip_ol_tests;
}
@@ -2641,9 +2642,17 @@ static void i40e_diag_test(struct net_device *netdev,
data[I40E_ETH_TEST_INTR] = 0;
}
-skip_ol_tests:
-
netif_info(pf, drv, netdev, "testing finished\n");
+ return;
+
+skip_ol_tests:
+ data[I40E_ETH_TEST_REG] = 1;
+ data[I40E_ETH_TEST_EEPROM] = 1;
+ data[I40E_ETH_TEST_INTR] = 1;
+ data[I40E_ETH_TEST_LINK] = 1;
+ eth_test->flags |= ETH_TEST_FL_FAILED;
+ clear_bit(__I40E_TESTING, pf->state);
+ netif_info(pf, drv, netdev, "testing failed\n");
}
static void i40e_get_wol(struct net_device *netdev,
--
2.35.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH net 4/4] iavf: Fix issue with MAC address of VF shown as zero
2022-06-09 16:26 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09 Tony Nguyen
` (2 preceding siblings ...)
2022-06-09 16:26 ` [PATCH net 3/4] i40e: Fix call trace in setup_tx_descriptors Tony Nguyen
@ 2022-06-09 16:26 ` Tony Nguyen
2022-06-11 5:20 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09 patchwork-bot+netdevbpf
4 siblings, 0 replies; 8+ messages in thread
From: Tony Nguyen @ 2022-06-09 16:26 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet
Cc: Michal Wilczynski, netdev, anthony.l.nguyen, sassmann,
Maciej Fijalkowski, Konrad Jankowski
From: Michal Wilczynski <michal.wilczynski@intel.com>
After reinitialization of iavf, ice driver gets VIRTCHNL_OP_ADD_ETH_ADDR
message with incorrectly set type of MAC address. Hardware address should
have is_primary flag set as true. This way ice driver knows what it has
to set as a MAC address.
Check if the address is primary in iavf_add_filter function and set flag
accordingly.
To test set all-zero MAC on a VF. This triggers iavf re-initialization
and VIRTCHNL_OP_ADD_ETH_ADDR message gets sent to PF.
For example:
ip link set dev ens785 vf 0 mac 00:00:00:00:00:00
This triggers re-initialization of iavf. New MAC should be assigned.
Now check if MAC is non-zero:
ip link show dev ens785
Fixes: a3e839d539e0 ("iavf: Add usage of new virtchnl format to set default MAC")
Signed-off-by: Michal Wilczynski <michal.wilczynski@intel.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/iavf/iavf_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/intel/iavf/iavf_main.c b/drivers/net/ethernet/intel/iavf/iavf_main.c
index 7dfcf78b57fb..f3ecb3bca33d 100644
--- a/drivers/net/ethernet/intel/iavf/iavf_main.c
+++ b/drivers/net/ethernet/intel/iavf/iavf_main.c
@@ -984,7 +984,7 @@ struct iavf_mac_filter *iavf_add_filter(struct iavf_adapter *adapter,
list_add_tail(&f->list, &adapter->mac_filter_list);
f->add = true;
f->is_new_mac = true;
- f->is_primary = false;
+ f->is_primary = ether_addr_equal(macaddr, adapter->hw.mac.addr);
adapter->aq_required |= IAVF_FLAG_AQ_ADD_MAC_FILTER;
} else {
f->remove = false;
--
2.35.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net 1/4] i40e: Fix adding ADQ filter to TC0
2022-06-09 16:26 ` [PATCH net 1/4] i40e: Fix adding ADQ filter to TC0 Tony Nguyen
@ 2022-06-11 5:08 ` Jakub Kicinski
2022-06-13 11:06 ` Jagielski, Jedrzej
0 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2022-06-11 5:08 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, pabeni, edumazet, Grzegorz Szczurek, netdev, sassmann,
Jedrzej Jagielski, Bharathi Sreenivas
On Thu, 9 Jun 2022 09:26:17 -0700 Tony Nguyen wrote:
> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
> @@ -8542,6 +8542,11 @@ static int i40e_configure_clsflower(struct i40e_vsi *vsi,
> return -EOPNOTSUPP;
> }
>
> + if (!tc) {
> + dev_err(&pf->pdev->dev, "Unable to add filter because of invalid destination");
> + return -EINVAL;
> + }
extacks please ?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09
2022-06-09 16:26 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09 Tony Nguyen
` (3 preceding siblings ...)
2022-06-09 16:26 ` [PATCH net 4/4] iavf: Fix issue with MAC address of VF shown as zero Tony Nguyen
@ 2022-06-11 5:20 ` patchwork-bot+netdevbpf
4 siblings, 0 replies; 8+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-06-11 5:20 UTC (permalink / raw)
To: Tony Nguyen; +Cc: davem, kuba, pabeni, edumazet, netdev, sassmann
Hello:
This series was applied to netdev/net.git (master)
by Tony Nguyen <anthony.l.nguyen@intel.com>:
On Thu, 9 Jun 2022 09:26:16 -0700 you wrote:
> This series contains updates to i40e and iavf drivers.
>
> Grzegorz prevents addition of TC flower filters to TC0 and fixes queue
> iteration for VF ADQ to number of actual queues for i40e.
>
> Aleksandr prevents running of ethtool tests when device is being reset
> for i40e.
>
> [...]
Here is the summary with links:
- [net,1/4] i40e: Fix adding ADQ filter to TC0
https://git.kernel.org/netdev/net/c/c3238d36c3a2
- [net,2/4] i40e: Fix calculating the number of queue pairs
https://git.kernel.org/netdev/net/c/0bb050670ac9
- [net,3/4] i40e: Fix call trace in setup_tx_descriptors
https://git.kernel.org/netdev/net/c/fd5855e6b135
- [net,4/4] iavf: Fix issue with MAC address of VF shown as zero
https://git.kernel.org/netdev/net/c/645603844270
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] 8+ messages in thread
* RE: [PATCH net 1/4] i40e: Fix adding ADQ filter to TC0
2022-06-11 5:08 ` Jakub Kicinski
@ 2022-06-13 11:06 ` Jagielski, Jedrzej
0 siblings, 0 replies; 8+ messages in thread
From: Jagielski, Jedrzej @ 2022-06-13 11:06 UTC (permalink / raw)
To: Jakub Kicinski, Nguyen, Anthony L
Cc: davem@davemloft.net, pabeni@redhat.com, edumazet@google.com,
Szczurek, GrzegorzX, netdev@vger.kernel.org, sassmann@redhat.com,
Sreenivas, Bharathi
>On Thu, 9 Jun 2022 09:26:17 -0700 Tony Nguyen wrote:
>> --- a/drivers/net/ethernet/intel/i40e/i40e_main.c
>> +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c
>> @@ -8542,6 +8542,11 @@ static int i40e_configure_clsflower(struct i40e_vsi *vsi,
>> return -EOPNOTSUPP;
>> }
>>
>> + if (!tc) {
>> + dev_err(&pf->pdev->dev, "Unable to add filter because of invalid destination");
>> + return -EINVAL;
>> + }
>
>extacks please ?
Do you mean that the trace should be more informative?
TC0 is a default queue so any filtering rule shouldn't be applied into it.
Thanks,
Jedrzej
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-06-13 12:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-09 16:26 [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09 Tony Nguyen
2022-06-09 16:26 ` [PATCH net 1/4] i40e: Fix adding ADQ filter to TC0 Tony Nguyen
2022-06-11 5:08 ` Jakub Kicinski
2022-06-13 11:06 ` Jagielski, Jedrzej
2022-06-09 16:26 ` [PATCH net 2/4] i40e: Fix calculating the number of queue pairs Tony Nguyen
2022-06-09 16:26 ` [PATCH net 3/4] i40e: Fix call trace in setup_tx_descriptors Tony Nguyen
2022-06-09 16:26 ` [PATCH net 4/4] iavf: Fix issue with MAC address of VF shown as zero Tony Nguyen
2022-06-11 5:20 ` [PATCH net 0/4][pull request] Intel Wired LAN Driver Updates 2022-06-09 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).