Skip to content

Commit 145684d

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-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>
2 parents aa3398f + 6456038 commit 145684d

4 files changed

Lines changed: 24 additions & 10 deletions

File tree

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

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2586,15 +2586,16 @@ static void i40e_diag_test(struct net_device *netdev,
25862586

25872587
set_bit(__I40E_TESTING, pf->state);
25882588

2589+
if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) ||
2590+
test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) {
2591+
dev_warn(&pf->pdev->dev,
2592+
"Cannot start offline testing when PF is in reset state.\n");
2593+
goto skip_ol_tests;
2594+
}
2595+
25892596
if (i40e_active_vfs(pf) || i40e_active_vmdqs(pf)) {
25902597
dev_warn(&pf->pdev->dev,
25912598
"Please take active VFs and Netqueues offline and restart the adapter before running NIC diagnostics\n");
2592-
data[I40E_ETH_TEST_REG] = 1;
2593-
data[I40E_ETH_TEST_EEPROM] = 1;
2594-
data[I40E_ETH_TEST_INTR] = 1;
2595-
data[I40E_ETH_TEST_LINK] = 1;
2596-
eth_test->flags |= ETH_TEST_FL_FAILED;
2597-
clear_bit(__I40E_TESTING, pf->state);
25982599
goto skip_ol_tests;
25992600
}
26002601

@@ -2641,9 +2642,17 @@ static void i40e_diag_test(struct net_device *netdev,
26412642
data[I40E_ETH_TEST_INTR] = 0;
26422643
}
26432644

2644-
skip_ol_tests:
2645-
26462645
netif_info(pf, drv, netdev, "testing finished\n");
2646+
return;
2647+
2648+
skip_ol_tests:
2649+
data[I40E_ETH_TEST_REG] = 1;
2650+
data[I40E_ETH_TEST_EEPROM] = 1;
2651+
data[I40E_ETH_TEST_INTR] = 1;
2652+
data[I40E_ETH_TEST_LINK] = 1;
2653+
eth_test->flags |= ETH_TEST_FL_FAILED;
2654+
clear_bit(__I40E_TESTING, pf->state);
2655+
netif_info(pf, drv, netdev, "testing failed\n");
26472656
}
26482657

26492658
static void i40e_get_wol(struct net_device *netdev,

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8542,6 +8542,11 @@ static int i40e_configure_clsflower(struct i40e_vsi *vsi,
85428542
return -EOPNOTSUPP;
85438543
}
85448544

8545+
if (!tc) {
8546+
dev_err(&pf->pdev->dev, "Unable to add filter because of invalid destination");
8547+
return -EINVAL;
8548+
}
8549+
85458550
if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) ||
85468551
test_bit(__I40E_RESET_INTR_RECEIVED, pf->state))
85478552
return -EBUSY;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2282,7 +2282,7 @@ static int i40e_vc_config_queues_msg(struct i40e_vf *vf, u8 *msg)
22822282
}
22832283

22842284
if (vf->adq_enabled) {
2285-
for (i = 0; i < I40E_MAX_VF_VSI; i++)
2285+
for (i = 0; i < vf->num_tc; i++)
22862286
num_qps_all += vf->ch[i].num_qps;
22872287
if (num_qps_all != qci->num_queue_pairs) {
22882288
aq_ret = I40E_ERR_PARAM;

drivers/net/ethernet/intel/iavf/iavf_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,7 @@ struct iavf_mac_filter *iavf_add_filter(struct iavf_adapter *adapter,
984984
list_add_tail(&f->list, &adapter->mac_filter_list);
985985
f->add = true;
986986
f->is_new_mac = true;
987-
f->is_primary = false;
987+
f->is_primary = ether_addr_equal(macaddr, adapter->hw.mac.addr);
988988
adapter->aq_required |= IAVF_FLAG_AQ_ADD_MAC_FILTER;
989989
} else {
990990
f->remove = false;

0 commit comments

Comments
 (0)