Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
authorJakub Kicinski <kuba@kernel.org>
Sat, 11 Jun 2022 05:10:30 +0000 (22:10 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 11 Jun 2022 05:10:30 +0000 (22:10 -0700)
Tony Nguyen says:

====================
Intel Wired LAN Driver Updates 2022-06-09

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.

* '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  iavf: Fix issue with MAC address of VF shown as zero
  i40e: Fix call trace in setup_tx_descriptors
  i40e: Fix calculating the number of queue pairs
  i40e: Fix adding ADQ filter to TC0
====================

Link: https://lore.kernel.org/r/20220609162620.2619258-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_ethtool.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
drivers/net/ethernet/intel/iavf/iavf_main.c

index 610f00cbaff9857cccb127741477293821270ee2..19704f5c8291c7ca1ec5f492d50542bdee8faa9b 100644 (file)
@@ -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,
index 332a608dbaa68c48a9c5a6dd5ceaa734bf30d411..72576bb3e94d45e93158415d8840654e3e86f45d 100644 (file)
@@ -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;
index 2606e8f0f19be4764d48ec0cbe28850e3735d5d3..033ea71763e3de4437800fc83a5e9366107ef7da 100644 (file)
@@ -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;
index 7dfcf78b57fb54dbe67a69ecf1ac8be9acf8b339..f3ecb3bca33dde77895c7742861940c9675e9249 100644 (file)
@@ -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;