Lines Matching refs:pf

461 static void i40e_partition_setting_complaint(struct i40e_pf *pf)  in i40e_partition_setting_complaint()  argument
463 dev_info(&pf->pdev->dev, in i40e_partition_setting_complaint()
473 static void i40e_phy_type_to_ethtool(struct i40e_pf *pf, in i40e_phy_type_to_ethtool() argument
476 struct i40e_link_status *hw_link_info = &pf->hw.phy.link_info; in i40e_phy_type_to_ethtool()
477 u64 phy_types = pf->hw.phy.phy_types; in i40e_phy_type_to_ethtool()
488 if (pf->hw_features & I40E_HW_100M_SGMII_CAPABLE) { in i40e_phy_type_to_ethtool()
587 !(pf->hw_features & I40E_HW_HAVE_CRT_RETIMER)) { in i40e_phy_type_to_ethtool()
595 !(pf->hw_features & I40E_HW_HAVE_CRT_RETIMER)) { in i40e_phy_type_to_ethtool()
755 struct i40e_pf *pf) in i40e_get_settings_link_up() argument
903 if (pf->hw_features & I40E_HW_100M_SGMII_CAPABLE) { in i40e_get_settings_link_up()
983 i40e_phy_type_to_ethtool(pf, &cap_ksettings); in i40e_get_settings_link_up()
1029 struct i40e_pf *pf) in i40e_get_settings_link_down() argument
1034 i40e_phy_type_to_ethtool(pf, ks); in i40e_get_settings_link_down()
1052 struct i40e_pf *pf = np->vsi->back; in i40e_get_link_ksettings() local
1053 struct i40e_hw *hw = &pf->hw; in i40e_get_link_ksettings()
1061 i40e_get_settings_link_up(hw, ks, netdev, pf); in i40e_get_link_ksettings()
1063 i40e_get_settings_link_down(hw, ks, pf); in i40e_get_link_ksettings()
1143 struct i40e_pf *pf = np->vsi->back; in i40e_set_link_ksettings() local
1145 struct i40e_hw *hw = &pf->hw; in i40e_set_link_ksettings()
1156 i40e_partition_setting_complaint(pf); in i40e_set_link_ksettings()
1159 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_link_ksettings()
1208 while (test_and_set_bit(__I40E_CONFIG_BUSY, pf->state)) { in i40e_set_link_ksettings()
1370 clear_bit(__I40E_CONFIG_BUSY, pf->state); in i40e_set_link_ksettings()
1379 struct i40e_pf *pf = np->vsi->back; in i40e_set_fec_cfg() local
1380 struct i40e_hw *hw = &pf->hw; in i40e_set_fec_cfg()
1385 flags = READ_ONCE(pf->flags); in i40e_set_fec_cfg()
1418 pf->flags = flags; in i40e_set_fec_cfg()
1440 struct i40e_pf *pf = np->vsi->back; in i40e_get_fec_param() local
1441 struct i40e_hw *hw = &pf->hw; in i40e_get_fec_param()
1482 struct i40e_pf *pf = np->vsi->back; in i40e_set_fec_param() local
1483 struct i40e_hw *hw = &pf->hw; in i40e_set_fec_param()
1514 dev_warn(&pf->pdev->dev, "Unsupported FEC mode: %d", in i40e_set_fec_param()
1526 struct i40e_pf *pf = np->vsi->back; in i40e_nway_reset() local
1527 struct i40e_hw *hw = &pf->hw; in i40e_nway_reset()
1553 struct i40e_pf *pf = np->vsi->back; in i40e_get_pauseparam() local
1554 struct i40e_hw *hw = &pf->hw; in i40e_get_pauseparam()
1588 struct i40e_pf *pf = np->vsi->back; in i40e_set_pauseparam() local
1590 struct i40e_hw *hw = &pf->hw; in i40e_set_pauseparam()
1603 i40e_partition_setting_complaint(pf); in i40e_set_pauseparam()
1607 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_pauseparam()
1617 if (!test_bit(__I40E_DOWN, pf->state) && !is_an) { in i40e_set_pauseparam()
1668 if (!test_bit(__I40E_DOWN, pf->state) && is_an) { in i40e_set_pauseparam()
1671 if (!test_bit(__I40E_DOWN, pf->state)) in i40e_set_pauseparam()
1681 struct i40e_pf *pf = np->vsi->back; in i40e_get_msglevel() local
1682 u32 debug_mask = pf->hw.debug_mask; in i40e_get_msglevel()
1687 return pf->msg_enable; in i40e_get_msglevel()
1693 struct i40e_pf *pf = np->vsi->back; in i40e_set_msglevel() local
1696 pf->hw.debug_mask = data; in i40e_set_msglevel()
1698 pf->msg_enable = data; in i40e_set_msglevel()
1716 struct i40e_pf *pf = np->vsi->back; in i40e_get_regs() local
1717 struct i40e_hw *hw = &pf->hw; in i40e_get_regs()
1748 struct i40e_pf *pf = np->vsi->back; in i40e_get_eeprom() local
1768 else if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) || in i40e_get_eeprom()
1769 test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) in i40e_get_eeprom()
1775 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1793 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1813 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1819 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1824 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1862 struct i40e_pf *pf = np->vsi->back; in i40e_set_eeprom() local
1875 else if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) || in i40e_set_eeprom()
1876 test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) in i40e_set_eeprom()
1882 dev_info(&pf->pdev->dev, in i40e_set_eeprom()
1896 struct i40e_pf *pf = vsi->back; in i40e_get_drvinfo() local
1899 strlcpy(drvinfo->fw_version, i40e_nvm_version_str(&pf->hw), in i40e_get_drvinfo()
1901 strlcpy(drvinfo->bus_info, pci_name(pf->pdev), in i40e_get_drvinfo()
1904 if (pf->hw.pf_id == 0) in i40e_get_drvinfo()
1912 struct i40e_pf *pf = np->vsi->back; in i40e_get_ringparam() local
1913 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_get_ringparam()
1943 struct i40e_pf *pf = vsi->back; in i40e_set_ringparam() local
1978 while (test_and_set_bit(__I40E_CONFIG_BUSY, pf->state)) { in i40e_set_ringparam()
2150 clear_bit(__I40E_CONFIG_BUSY, pf->state); in i40e_set_ringparam()
2173 struct i40e_pf *pf = vsi->back; in i40e_get_stats_count() local
2176 if (vsi == pf->vsi[pf->lan_vsi] && pf->hw.partition_id == 1) in i40e_get_stats_count()
2204 struct i40e_pf *pf = vsi->back; in i40e_get_sset_count() local
2213 (pf->hw.pf_id == 0 ? I40E_GL_PRIV_FLAGS_STR_LEN : 0); in i40e_get_sset_count()
2229 i40e_get_pfc_stats(struct i40e_pf *pf, unsigned int i) in i40e_get_pfc_stats() argument
2232 .stat = pf->stats.stat[priority] in i40e_get_pfc_stats()
2263 struct i40e_pf *pf = vsi->back; in i40e_get_ethtool_stats() local
2283 if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1) in i40e_get_ethtool_stats()
2286 veb_stats = ((pf->lan_veb != I40E_NO_VEB) && in i40e_get_ethtool_stats()
2287 (pf->lan_veb < I40E_MAX_VEB) && in i40e_get_ethtool_stats()
2288 (pf->flags & I40E_FLAG_VEB_STATS_ENABLED)); in i40e_get_ethtool_stats()
2291 veb = pf->veb[pf->lan_veb]; in i40e_get_ethtool_stats()
2306 i40e_add_ethtool_stats(&data, pf, i40e_gstrings_stats); in i40e_get_ethtool_stats()
2309 struct i40e_pfc_stats pfc = i40e_get_pfc_stats(pf, i); in i40e_get_ethtool_stats()
2333 struct i40e_pf *pf = vsi->back; in i40e_get_stat_strings() local
2348 if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1) in i40e_get_stat_strings()
2370 struct i40e_pf *pf = vsi->back; in i40e_get_priv_flag_strings() local
2379 if (pf->hw.pf_id != 0) in i40e_get_priv_flag_strings()
2410 struct i40e_pf *pf = i40e_netdev_to_pf(dev); in i40e_get_ts_info() local
2413 if (!(pf->flags & I40E_FLAG_PTP)) in i40e_get_ts_info()
2423 if (pf->ptp_clock) in i40e_get_ts_info()
2424 info->phc_index = ptp_clock_index(pf->ptp_clock); in i40e_get_ts_info()
2435 if (pf->hw_features & I40E_HW_PTP_L4_CAPABLE) in i40e_get_ts_info()
2451 struct i40e_pf *pf = np->vsi->back; in i40e_link_test() local
2455 netif_info(pf, hw, netdev, "link test\n"); in i40e_link_test()
2456 status = i40e_get_link_status(&pf->hw, &link_up); in i40e_link_test()
2458 netif_err(pf, drv, netdev, "link query timed out, please retry test\n"); in i40e_link_test()
2474 struct i40e_pf *pf = np->vsi->back; in i40e_reg_test() local
2476 netif_info(pf, hw, netdev, "register test\n"); in i40e_reg_test()
2477 *data = i40e_diag_reg_test(&pf->hw); in i40e_reg_test()
2485 struct i40e_pf *pf = np->vsi->back; in i40e_eeprom_test() local
2487 netif_info(pf, hw, netdev, "eeprom test\n"); in i40e_eeprom_test()
2488 *data = i40e_diag_eeprom_test(&pf->hw); in i40e_eeprom_test()
2491 pf->hw.nvmupd_state = I40E_NVMUPD_STATE_INIT; in i40e_eeprom_test()
2499 struct i40e_pf *pf = np->vsi->back; in i40e_intr_test() local
2500 u16 swc_old = pf->sw_int_count; in i40e_intr_test()
2502 netif_info(pf, hw, netdev, "interrupt test\n"); in i40e_intr_test()
2503 wr32(&pf->hw, I40E_PFINT_DYN_CTL0, in i40e_intr_test()
2510 *data = (swc_old == pf->sw_int_count); in i40e_intr_test()
2515 static inline bool i40e_active_vfs(struct i40e_pf *pf) in i40e_active_vfs() argument
2517 struct i40e_vf *vfs = pf->vf; in i40e_active_vfs()
2520 for (i = 0; i < pf->num_alloc_vfs; i++) in i40e_active_vfs()
2526 static inline bool i40e_active_vmdqs(struct i40e_pf *pf) in i40e_active_vmdqs() argument
2528 return !!i40e_find_vsi_by_type(pf, I40E_VSI_VMDQ2); in i40e_active_vmdqs()
2536 struct i40e_pf *pf = np->vsi->back; in i40e_diag_test() local
2540 netif_info(pf, drv, netdev, "offline testing starting\n"); in i40e_diag_test()
2542 set_bit(__I40E_TESTING, pf->state); in i40e_diag_test()
2544 if (i40e_active_vfs(pf) || i40e_active_vmdqs(pf)) { in i40e_diag_test()
2545 dev_warn(&pf->pdev->dev, in i40e_diag_test()
2552 clear_bit(__I40E_TESTING, pf->state); in i40e_diag_test()
2566 i40e_do_reset(pf, BIT(__I40E_PF_RESET_REQUESTED), true); in i40e_diag_test()
2581 clear_bit(__I40E_TESTING, pf->state); in i40e_diag_test()
2582 i40e_do_reset(pf, BIT(__I40E_PF_RESET_REQUESTED), true); in i40e_diag_test()
2588 netif_info(pf, drv, netdev, "online testing starting\n"); in i40e_diag_test()
2601 netif_info(pf, drv, netdev, "testing finished\n"); in i40e_diag_test()
2608 struct i40e_pf *pf = np->vsi->back; in i40e_get_wol() local
2609 struct i40e_hw *hw = &pf->hw; in i40e_get_wol()
2619 wol->wolopts = (pf->wol_en ? WAKE_MAGIC : 0); in i40e_get_wol()
2631 struct i40e_pf *pf = np->vsi->back; in i40e_set_wol() local
2633 struct i40e_hw *hw = &pf->hw; in i40e_set_wol()
2638 i40e_partition_setting_complaint(pf); in i40e_set_wol()
2642 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_wol()
2655 if (pf->wol_en != !!wol->wolopts) { in i40e_set_wol()
2656 pf->wol_en = !!wol->wolopts; in i40e_set_wol()
2657 device_set_wakeup_enable(&pf->pdev->dev, pf->wol_en); in i40e_set_wol()
2668 struct i40e_pf *pf = np->vsi->back; in i40e_set_phys_id() local
2669 struct i40e_hw *hw = &pf->hw; in i40e_set_phys_id()
2675 if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) { in i40e_set_phys_id()
2676 pf->led_status = i40e_led_get(hw); in i40e_set_phys_id()
2682 &pf->phy_led_val); in i40e_set_phys_id()
2683 pf->led_status = temp_status; in i40e_set_phys_id()
2687 if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) in i40e_set_phys_id()
2690 ret = i40e_led_set_phy(hw, true, pf->led_status, 0); in i40e_set_phys_id()
2693 if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) in i40e_set_phys_id()
2696 ret = i40e_led_set_phy(hw, false, pf->led_status, 0); in i40e_set_phys_id()
2699 if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) { in i40e_set_phys_id()
2700 i40e_led_set(hw, pf->led_status, false); in i40e_set_phys_id()
2702 ret = i40e_led_set_phy(hw, false, pf->led_status, in i40e_set_phys_id()
2703 (pf->phy_led_val | in i40e_set_phys_id()
2819 struct i40e_pf *pf = vsi->back; in i40e_set_itr_per_queue() local
2820 struct i40e_hw *hw = &pf->hw; in i40e_set_itr_per_queue()
2869 struct i40e_pf *pf = vsi->back; in __i40e_set_coalesce() local
2882 netif_info(pf, drv, netdev, "Invalid queue value, queue range is 0 - %d\n", in __i40e_set_coalesce()
2892 netif_info(pf, drv, netdev, "tx-usecs-high is not used, please program rx-usecs-high\n"); in __i40e_set_coalesce()
2897 netif_info(pf, drv, netdev, "Invalid value, rx-usecs-high range is 0-%lu\n", in __i40e_set_coalesce()
2904 …netif_info(pf, drv, netdev, "RX interrupt moderation cannot be changed if adaptive-rx is enabled.\… in __i40e_set_coalesce()
2909 netif_info(pf, drv, netdev, "Invalid value, rx-usecs range is 0-8160\n"); in __i40e_set_coalesce()
2915 …netif_info(pf, drv, netdev, "TX interrupt moderation cannot be changed if adaptive-tx is enabled.\… in __i40e_set_coalesce()
2920 netif_info(pf, drv, netdev, "Invalid value, tx-usecs range is 0-8160\n"); in __i40e_set_coalesce()
2933 netif_info(pf, drv, netdev, "Interrupt rate limit rounded down to %d\n", in __i40e_set_coalesce()
2984 static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd) in i40e_get_rss_hash_opts() argument
2986 struct i40e_hw *hw = &pf->hw; in i40e_get_rss_hash_opts()
3163 static int i40e_get_ethtool_fdir_all(struct i40e_pf *pf, in i40e_get_ethtool_fdir_all() argument
3172 cmd->data = i40e_get_fd_cnt_all(pf); in i40e_get_ethtool_fdir_all()
3175 &pf->fdir_filter_list, fdir_node) { in i40e_get_ethtool_fdir_all()
3198 static int i40e_get_ethtool_fdir_entry(struct i40e_pf *pf, in i40e_get_ethtool_fdir_entry() argument
3210 &pf->fdir_filter_list, fdir_node) { in i40e_get_ethtool_fdir_entry()
3258 input_set = i40e_read_fd_input_set(pf, index); in i40e_get_ethtool_fdir_entry()
3278 if (rule->dest_vsi != pf->vsi[pf->lan_vsi]->id) { in i40e_get_ethtool_fdir_entry()
3281 vsi = i40e_find_vsi_from_id(pf, rule->dest_vsi); in i40e_get_ethtool_fdir_entry()
3317 struct i40e_pf *pf = vsi->back; in i40e_get_rxnfc() local
3326 ret = i40e_get_rss_hash_opts(pf, cmd); in i40e_get_rxnfc()
3329 cmd->rule_cnt = pf->fdir_pf_active_filters; in i40e_get_rxnfc()
3331 cmd->data = i40e_get_fd_cnt_all(pf); in i40e_get_rxnfc()
3335 ret = i40e_get_ethtool_fdir_entry(pf, cmd); in i40e_get_rxnfc()
3338 ret = i40e_get_ethtool_fdir_all(pf, cmd, rule_locs); in i40e_get_rxnfc()
3399 static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc) in i40e_set_rss_hash_opt() argument
3401 struct i40e_hw *hw = &pf->hw; in i40e_set_rss_hash_opt()
3407 if (pf->flags & I40E_FLAG_MFP_ENABLED) { in i40e_set_rss_hash_opt()
3408 dev_err(&pf->pdev->dev, in i40e_set_rss_hash_opt()
3423 if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) in i40e_set_rss_hash_opt()
3429 if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) in i40e_set_rss_hash_opt()
3432 if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) in i40e_set_rss_hash_opt()
3438 if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) in i40e_set_rss_hash_opt()
3447 if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) in i40e_set_rss_hash_opt()
3522 struct i40e_pf *pf = vsi->back; in i40e_update_ethtool_fdir_entry() local
3530 &pf->fdir_filter_list, fdir_node) { in i40e_update_ethtool_fdir_entry()
3545 pf->fdir_pf_active_filters--; in i40e_update_ethtool_fdir_entry()
3562 &pf->fdir_filter_list); in i40e_update_ethtool_fdir_entry()
3565 pf->fdir_pf_active_filters++; in i40e_update_ethtool_fdir_entry()
3578 static void i40e_prune_flex_pit_list(struct i40e_pf *pf) in i40e_prune_flex_pit_list() argument
3584 list_for_each_entry_safe(entry, tmp, &pf->l3_flex_pit_list, list) { in i40e_prune_flex_pit_list()
3587 hlist_for_each_entry(rule, &pf->fdir_filter_list, fdir_node) { in i40e_prune_flex_pit_list()
3607 list_for_each_entry_safe(entry, tmp, &pf->l4_flex_pit_list, list) { in i40e_prune_flex_pit_list()
3610 hlist_for_each_entry(rule, &pf->fdir_filter_list, fdir_node) { in i40e_prune_flex_pit_list()
3648 struct i40e_pf *pf = vsi->back; in i40e_del_fdir_entry() local
3651 if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) || in i40e_del_fdir_entry()
3652 test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) in i40e_del_fdir_entry()
3655 if (test_bit(__I40E_FD_FLUSH_REQUESTED, pf->state)) in i40e_del_fdir_entry()
3660 i40e_prune_flex_pit_list(pf); in i40e_del_fdir_entry()
3662 i40e_fdir_check_and_reenable(pf); in i40e_del_fdir_entry()
3675 static u8 i40e_unused_pit_index(struct i40e_pf *pf) in i40e_unused_pit_index() argument
3685 list_for_each_entry(entry, &pf->l4_flex_pit_list, list) in i40e_unused_pit_index()
3688 list_for_each_entry(entry, &pf->l3_flex_pit_list, list) in i40e_unused_pit_index()
3811 static void __i40e_reprogram_flex_pit(struct i40e_pf *pf, in __i40e_reprogram_flex_pit() argument
3845 i40e_write_rx_ctl(&pf->hw, in __i40e_reprogram_flex_pit()
3853 i40e_write_rx_ctl(&pf->hw, in __i40e_reprogram_flex_pit()
3871 i40e_write_rx_ctl(&pf->hw, in __i40e_reprogram_flex_pit()
3886 static void i40e_reprogram_flex_pit(struct i40e_pf *pf) in i40e_reprogram_flex_pit() argument
3888 __i40e_reprogram_flex_pit(pf, &pf->l3_flex_pit_list, in i40e_reprogram_flex_pit()
3891 __i40e_reprogram_flex_pit(pf, &pf->l4_flex_pit_list, in i40e_reprogram_flex_pit()
3895 i40e_write_rx_ctl(&pf->hw, in i40e_reprogram_flex_pit()
3900 i40e_write_rx_ctl(&pf->hw, in i40e_reprogram_flex_pit()
3972 struct i40e_pf *pf = vsi->back; in i40e_print_input_set() local
3979 netif_info(pf, drv, vsi->netdev, "L3 source address: %s -> %s\n", in i40e_print_input_set()
3986 netif_info(pf, drv, vsi->netdev, "L3 destination address: %s -> %s\n", in i40e_print_input_set()
3993 netif_info(pf, drv, vsi->netdev, "L4 source port: %s -> %s\n", in i40e_print_input_set()
4000 netif_info(pf, drv, vsi->netdev, "L4 destination port: %s -> %s\n", in i40e_print_input_set()
4007 netif_info(pf, drv, vsi->netdev, "SCTP verification tag: %s -> %s\n", in i40e_print_input_set()
4018 netif_info(pf, drv, vsi->netdev, "FLEX index %d: %s -> %s\n", in i40e_print_input_set()
4024 netif_info(pf, drv, vsi->netdev, " Current input set: %0llx\n", in i40e_print_input_set()
4026 netif_info(pf, drv, vsi->netdev, "Requested input set: %0llx\n", in i40e_print_input_set()
4059 struct i40e_pf *pf = vsi->back; in i40e_check_fdir_input_set() local
4073 fdir_filter_count = &pf->fd_sctp4_filter_cnt; in i40e_check_fdir_input_set()
4077 fdir_filter_count = &pf->fd_tcp4_filter_cnt; in i40e_check_fdir_input_set()
4081 fdir_filter_count = &pf->fd_udp4_filter_cnt; in i40e_check_fdir_input_set()
4085 fdir_filter_count = &pf->fd_ip4_filter_cnt; in i40e_check_fdir_input_set()
4093 current_mask = i40e_read_fd_input_set(pf, index); in i40e_check_fdir_input_set()
4209 dev_warn(&pf->pdev->dev, in i40e_check_fdir_input_set()
4218 dev_warn(&pf->pdev->dev, in i40e_check_fdir_input_set()
4228 flex_pit = i40e_find_flex_offset(&pf->l4_flex_pit_list, in i40e_check_fdir_input_set()
4242 i40e_find_flex_offset(&pf->l3_flex_pit_list, in i40e_check_fdir_input_set()
4272 pit_index = i40e_unused_pit_index(pf); in i40e_check_fdir_input_set()
4288 netif_info(pf, drv, vsi->netdev, "Input set change requested for %s flows:\n", in i40e_check_fdir_input_set()
4292 netif_info(pf, drv, vsi->netdev, "FLEX index %d: Offset -> %d", in i40e_check_fdir_input_set()
4300 if (pf->flags & I40E_FLAG_MFP_ENABLED) { in i40e_check_fdir_input_set()
4301 netif_err(pf, drv, vsi->netdev, "Cannot change Flow Director input sets while MFP is enabled\n"); in i40e_check_fdir_input_set()
4315 …netif_err(pf, drv, vsi->netdev, "Cannot change input set for %s flows until %d preexisting filters… in i40e_check_fdir_input_set()
4321 i40e_write_fd_input_set(pf, index, new_mask); in i40e_check_fdir_input_set()
4330 i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_FRAG_IPV4, in i40e_check_fdir_input_set()
4335 err = i40e_add_flex_offset(&pf->l4_flex_pit_list, src_offset, in i40e_check_fdir_input_set()
4341 err = i40e_add_flex_offset(&pf->l3_flex_pit_list, in i40e_check_fdir_input_set()
4348 i40e_reprogram_flex_pit(pf); in i40e_check_fdir_input_set()
4407 struct i40e_pf *pf = vsi->back; in i40e_disallow_matching_filters() local
4413 &pf->fdir_filter_list, fdir_node) { in i40e_disallow_matching_filters()
4425 dev_warn(&pf->pdev->dev, in i40e_disallow_matching_filters()
4450 struct i40e_pf *pf; in i40e_add_fdir_ethtool() local
4456 pf = vsi->back; in i40e_add_fdir_ethtool()
4458 if (!(pf->flags & I40E_FLAG_FD_SB_ENABLED)) in i40e_add_fdir_ethtool()
4461 if (test_bit(__I40E_FD_SB_AUTO_DISABLED, pf->state)) in i40e_add_fdir_ethtool()
4464 if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) || in i40e_add_fdir_ethtool()
4465 test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) in i40e_add_fdir_ethtool()
4468 if (test_bit(__I40E_FD_FLUSH_REQUESTED, pf->state)) in i40e_add_fdir_ethtool()
4485 if (fsp->location >= (pf->hw.func_caps.fd_filters_best_effort + in i40e_add_fdir_ethtool()
4486 pf->hw.func_caps.fd_filters_guaranteed)) { in i40e_add_fdir_ethtool()
4507 if (vf >= pf->num_alloc_vfs) in i40e_add_fdir_ethtool()
4509 if (ring >= pf->vf[vf].num_queue_pairs) in i40e_add_fdir_ethtool()
4511 dest_vsi = pf->vf[vf].lan_vsi_id; in i40e_add_fdir_ethtool()
4527 input->cnt_index = I40E_FD_SB_STAT_IDX(pf->hw.pf_id); in i40e_add_fdir_ethtool()
4564 pf->fdir_pf_active_filters--; in i40e_add_fdir_ethtool()
4581 struct i40e_pf *pf = vsi->back; in i40e_set_rxnfc() local
4586 ret = i40e_set_rss_hash_opt(pf, cmd); in i40e_set_rxnfc()
4626 struct i40e_pf *pf = vsi->back; in i40e_get_channels() local
4632 ch->other_count = (pf->flags & I40E_FLAG_FD_SB_ENABLED) ? 1 : 0; in i40e_get_channels()
4654 struct i40e_pf *pf = vsi->back; in i40e_set_channels() local
4667 if (pf->flags & I40E_FLAG_TC_MQPRIO) in i40e_set_channels()
4675 if (ch->other_count != ((pf->flags & I40E_FLAG_FD_SB_ENABLED) ? 1 : 0)) in i40e_set_channels()
4686 &pf->fdir_filter_list, fdir_node) { in i40e_set_channels()
4688 dev_warn(&pf->pdev->dev, in i40e_set_channels()
4696 dev_err(&pf->pdev->dev, in i40e_set_channels()
4708 new_count = i40e_reconfig_rss_queues(pf, count); in i40e_set_channels()
4793 struct i40e_pf *pf = vsi->back; in i40e_set_rxfh() local
4821 i40e_fill_rss_lut(pf, vsi->rss_lut_user, I40E_HLUT_ARRAY_SIZE, in i40e_set_rxfh()
4842 struct i40e_pf *pf = vsi->back; in i40e_get_priv_flags() local
4850 if (priv_flags->flag & pf->flags) in i40e_get_priv_flags()
4854 if (pf->hw.pf_id != 0) in i40e_get_priv_flags()
4862 if (priv_flags->flag & pf->flags) in i40e_get_priv_flags()
4880 struct i40e_pf *pf = vsi->back; in i40e_set_priv_flags() local
4885 orig_flags = READ_ONCE(pf->flags); in i40e_set_priv_flags()
4904 if (pf->hw.pf_id != 0) in i40e_set_priv_flags()
4936 !(pf->hw_features & I40E_HW_ATR_EVICT_CAPABLE)) in i40e_set_priv_flags()
4948 if (!(pf->hw.flags & I40E_HW_FLAG_FW_LLDP_STOPPABLE)) { in i40e_set_priv_flags()
4949 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
4956 pf->hw.device_id != I40E_DEV_ID_25G_SFP28 && in i40e_set_priv_flags()
4957 pf->hw.device_id != I40E_DEV_ID_25G_B) { in i40e_set_priv_flags()
4958 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
4964 pf->hw.device_id != I40E_DEV_ID_25G_SFP28 && in i40e_set_priv_flags()
4965 pf->hw.device_id != I40E_DEV_ID_25G_B && in i40e_set_priv_flags()
4966 pf->hw.device_id != I40E_DEV_ID_KX_X722) { in i40e_set_priv_flags()
4967 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
4980 set_bit(__I40E_FD_ATR_AUTO_DISABLED, pf->state); in i40e_set_priv_flags()
4981 set_bit(__I40E_FD_FLUSH_REQUESTED, pf->state); in i40e_set_priv_flags()
4991 ret = i40e_aq_set_switch_config(&pf->hw, sw_flags, valid_flags, in i40e_set_priv_flags()
4993 if (ret && pf->hw.aq.asq_last_status != I40E_AQ_RC_ESRCH) { in i40e_set_priv_flags()
4994 dev_info(&pf->pdev->dev, in i40e_set_priv_flags()
4996 i40e_stat_str(&pf->hw, ret), in i40e_set_priv_flags()
4997 i40e_aq_str(&pf->hw, in i40e_set_priv_flags()
4998 pf->hw.aq.asq_last_status)); in i40e_set_priv_flags()
5018 dev_warn(&pf->pdev->dev, "Cannot change FEC config\n"); in i40e_set_priv_flags()
5023 dev_err(&pf->pdev->dev, in i40e_set_priv_flags()
5031 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5038 i40e_aq_stop_lldp(&pf->hw, true, false, NULL); in i40e_set_priv_flags()
5039 i40e_aq_set_dcb_parameters(&pf->hw, true, NULL); in i40e_set_priv_flags()
5041 dcbcfg = &pf->hw.local_dcbx_config; in i40e_set_priv_flags()
5053 status = i40e_aq_start_lldp(&pf->hw, false, NULL); in i40e_set_priv_flags()
5055 adq_err = pf->hw.aq.asq_last_status; in i40e_set_priv_flags()
5058 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5063 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5067 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5069 i40e_stat_str(&pf->hw, in i40e_set_priv_flags()
5071 i40e_aq_str(&pf->hw, in i40e_set_priv_flags()
5084 pf->flags = new_flags; in i40e_set_priv_flags()
5090 i40e_do_reset(pf, BIT(__I40E_PF_RESET_REQUESTED), true); in i40e_set_priv_flags()
5105 struct i40e_pf *pf = vsi->back; in i40e_get_module_info() local
5106 struct i40e_hw *hw = &pf->hw; in i40e_get_module_info()
5212 struct i40e_pf *pf = vsi->back; in i40e_get_module_eeprom() local
5213 struct i40e_hw *hw = &pf->hw; in i40e_get_module_eeprom()
5326 struct i40e_pf *pf = np->vsi->back; in i40e_set_ethtool_ops() local
5328 if (!test_bit(__I40E_RECOVERY_MODE, pf->state)) in i40e_set_ethtool_ops()