• Home
  • Raw
  • Download

Lines Matching refs:pf

472 static void i40e_partition_setting_complaint(struct i40e_pf *pf)  in i40e_partition_setting_complaint()  argument
474 dev_info(&pf->pdev->dev, in i40e_partition_setting_complaint()
484 static void i40e_phy_type_to_ethtool(struct i40e_pf *pf, in i40e_phy_type_to_ethtool() argument
487 struct i40e_link_status *hw_link_info = &pf->hw.phy.link_info; in i40e_phy_type_to_ethtool()
488 u64 phy_types = pf->hw.phy.phy_types; in i40e_phy_type_to_ethtool()
499 if (pf->hw_features & I40E_HW_100M_SGMII_CAPABLE) { in i40e_phy_type_to_ethtool()
598 !(pf->hw_features & I40E_HW_HAVE_CRT_RETIMER)) { in i40e_phy_type_to_ethtool()
606 !(pf->hw_features & I40E_HW_HAVE_CRT_RETIMER)) { in i40e_phy_type_to_ethtool()
766 struct i40e_pf *pf) in i40e_get_settings_link_up() argument
914 if (pf->hw_features & I40E_HW_100M_SGMII_CAPABLE) { in i40e_get_settings_link_up()
994 i40e_phy_type_to_ethtool(pf, &cap_ksettings); in i40e_get_settings_link_up()
1040 struct i40e_pf *pf) in i40e_get_settings_link_down() argument
1045 i40e_phy_type_to_ethtool(pf, ks); in i40e_get_settings_link_down()
1063 struct i40e_pf *pf = np->vsi->back; in i40e_get_link_ksettings() local
1064 struct i40e_hw *hw = &pf->hw; in i40e_get_link_ksettings()
1072 i40e_get_settings_link_up(hw, ks, netdev, pf); in i40e_get_link_ksettings()
1074 i40e_get_settings_link_down(hw, ks, pf); in i40e_get_link_ksettings()
1155 struct i40e_pf *pf = np->vsi->back; in i40e_set_link_ksettings() local
1157 struct i40e_hw *hw = &pf->hw; in i40e_set_link_ksettings()
1168 i40e_partition_setting_complaint(pf); in i40e_set_link_ksettings()
1171 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_link_ksettings()
1220 while (test_and_set_bit(__I40E_CONFIG_BUSY, pf->state)) { in i40e_set_link_ksettings()
1381 clear_bit(__I40E_CONFIG_BUSY, pf->state); in i40e_set_link_ksettings()
1390 struct i40e_pf *pf = np->vsi->back; in i40e_set_fec_cfg() local
1391 struct i40e_hw *hw = &pf->hw; in i40e_set_fec_cfg()
1396 flags = READ_ONCE(pf->flags); in i40e_set_fec_cfg()
1430 pf->flags = flags; in i40e_set_fec_cfg()
1452 struct i40e_pf *pf = np->vsi->back; in i40e_get_fec_param() local
1453 struct i40e_hw *hw = &pf->hw; in i40e_get_fec_param()
1494 struct i40e_pf *pf = np->vsi->back; in i40e_set_fec_param() local
1495 struct i40e_hw *hw = &pf->hw; in i40e_set_fec_param()
1526 dev_warn(&pf->pdev->dev, "Unsupported FEC mode: %d", in i40e_set_fec_param()
1538 struct i40e_pf *pf = np->vsi->back; in i40e_nway_reset() local
1539 struct i40e_hw *hw = &pf->hw; in i40e_nway_reset()
1565 struct i40e_pf *pf = np->vsi->back; in i40e_get_pauseparam() local
1566 struct i40e_hw *hw = &pf->hw; in i40e_get_pauseparam()
1600 struct i40e_pf *pf = np->vsi->back; in i40e_set_pauseparam() local
1602 struct i40e_hw *hw = &pf->hw; in i40e_set_pauseparam()
1615 i40e_partition_setting_complaint(pf); in i40e_set_pauseparam()
1619 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_pauseparam()
1629 if (!test_bit(__I40E_DOWN, pf->state) && !is_an) { in i40e_set_pauseparam()
1680 if (!test_bit(__I40E_DOWN, pf->state) && is_an) { in i40e_set_pauseparam()
1683 if (!test_bit(__I40E_DOWN, pf->state)) in i40e_set_pauseparam()
1693 struct i40e_pf *pf = np->vsi->back; in i40e_get_msglevel() local
1694 u32 debug_mask = pf->hw.debug_mask; in i40e_get_msglevel()
1699 return pf->msg_enable; in i40e_get_msglevel()
1705 struct i40e_pf *pf = np->vsi->back; in i40e_set_msglevel() local
1708 pf->hw.debug_mask = data; in i40e_set_msglevel()
1710 pf->msg_enable = data; in i40e_set_msglevel()
1728 struct i40e_pf *pf = np->vsi->back; in i40e_get_regs() local
1729 struct i40e_hw *hw = &pf->hw; in i40e_get_regs()
1760 struct i40e_pf *pf = np->vsi->back; in i40e_get_eeprom() local
1780 else if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) || in i40e_get_eeprom()
1781 test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) in i40e_get_eeprom()
1787 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1805 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1825 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1831 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1836 dev_info(&pf->pdev->dev, in i40e_get_eeprom()
1874 struct i40e_pf *pf = np->vsi->back; in i40e_set_eeprom() local
1887 else if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) || in i40e_set_eeprom()
1888 test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) in i40e_set_eeprom()
1894 dev_info(&pf->pdev->dev, in i40e_set_eeprom()
1908 struct i40e_pf *pf = vsi->back; in i40e_get_drvinfo() local
1911 strlcpy(drvinfo->fw_version, i40e_nvm_version_str(&pf->hw), in i40e_get_drvinfo()
1913 strlcpy(drvinfo->bus_info, pci_name(pf->pdev), in i40e_get_drvinfo()
1916 if (pf->hw.pf_id == 0) in i40e_get_drvinfo()
1924 struct i40e_pf *pf = np->vsi->back; in i40e_get_ringparam() local
1925 struct i40e_vsi *vsi = pf->vsi[pf->lan_vsi]; in i40e_get_ringparam()
1955 struct i40e_pf *pf = vsi->back; in i40e_set_ringparam() local
1990 while (test_and_set_bit(__I40E_CONFIG_BUSY, pf->state)) { in i40e_set_ringparam()
2159 clear_bit(__I40E_CONFIG_BUSY, pf->state); in i40e_set_ringparam()
2182 struct i40e_pf *pf = vsi->back; in i40e_get_stats_count() local
2185 if (vsi == pf->vsi[pf->lan_vsi] && pf->hw.partition_id == 1) in i40e_get_stats_count()
2213 struct i40e_pf *pf = vsi->back; in i40e_get_sset_count() local
2222 (pf->hw.pf_id == 0 ? I40E_GL_PRIV_FLAGS_STR_LEN : 0); in i40e_get_sset_count()
2261 i40e_get_pfc_stats(struct i40e_pf *pf, unsigned int i) in i40e_get_pfc_stats() argument
2264 .stat = pf->stats.stat[priority] in i40e_get_pfc_stats()
2295 struct i40e_pf *pf = vsi->back; in i40e_get_ethtool_stats() local
2315 if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1) in i40e_get_ethtool_stats()
2318 veb_stats = ((pf->lan_veb != I40E_NO_VEB) && in i40e_get_ethtool_stats()
2319 (pf->lan_veb < I40E_MAX_VEB) && in i40e_get_ethtool_stats()
2320 (pf->flags & I40E_FLAG_VEB_STATS_ENABLED)); in i40e_get_ethtool_stats()
2323 veb = pf->veb[pf->lan_veb]; in i40e_get_ethtool_stats()
2346 i40e_add_ethtool_stats(&data, pf, i40e_gstrings_stats); in i40e_get_ethtool_stats()
2349 struct i40e_pfc_stats pfc = i40e_get_pfc_stats(pf, i); in i40e_get_ethtool_stats()
2373 struct i40e_pf *pf = vsi->back; in i40e_get_stat_strings() local
2388 if (vsi != pf->vsi[pf->lan_vsi] || pf->hw.partition_id != 1) in i40e_get_stat_strings()
2410 struct i40e_pf *pf = vsi->back; in i40e_get_priv_flag_strings() local
2416 if (pf->hw.pf_id != 0) in i40e_get_priv_flag_strings()
2444 struct i40e_pf *pf = i40e_netdev_to_pf(dev); in i40e_get_ts_info() local
2447 if (!(pf->flags & I40E_FLAG_PTP)) in i40e_get_ts_info()
2457 if (pf->ptp_clock) in i40e_get_ts_info()
2458 info->phc_index = ptp_clock_index(pf->ptp_clock); in i40e_get_ts_info()
2469 if (pf->hw_features & I40E_HW_PTP_L4_CAPABLE) in i40e_get_ts_info()
2485 struct i40e_pf *pf = np->vsi->back; in i40e_link_test() local
2489 netif_info(pf, hw, netdev, "link test\n"); in i40e_link_test()
2490 status = i40e_get_link_status(&pf->hw, &link_up); in i40e_link_test()
2492 netif_err(pf, drv, netdev, "link query timed out, please retry test\n"); in i40e_link_test()
2508 struct i40e_pf *pf = np->vsi->back; in i40e_reg_test() local
2510 netif_info(pf, hw, netdev, "register test\n"); in i40e_reg_test()
2511 *data = i40e_diag_reg_test(&pf->hw); in i40e_reg_test()
2519 struct i40e_pf *pf = np->vsi->back; in i40e_eeprom_test() local
2521 netif_info(pf, hw, netdev, "eeprom test\n"); in i40e_eeprom_test()
2522 *data = i40e_diag_eeprom_test(&pf->hw); in i40e_eeprom_test()
2525 pf->hw.nvmupd_state = I40E_NVMUPD_STATE_INIT; in i40e_eeprom_test()
2533 struct i40e_pf *pf = np->vsi->back; in i40e_intr_test() local
2534 u16 swc_old = pf->sw_int_count; in i40e_intr_test()
2536 netif_info(pf, hw, netdev, "interrupt test\n"); in i40e_intr_test()
2537 wr32(&pf->hw, I40E_PFINT_DYN_CTL0, in i40e_intr_test()
2544 *data = (swc_old == pf->sw_int_count); in i40e_intr_test()
2549 static inline bool i40e_active_vfs(struct i40e_pf *pf) in i40e_active_vfs() argument
2551 struct i40e_vf *vfs = pf->vf; in i40e_active_vfs()
2554 for (i = 0; i < pf->num_alloc_vfs; i++) in i40e_active_vfs()
2560 static inline bool i40e_active_vmdqs(struct i40e_pf *pf) in i40e_active_vmdqs() argument
2562 return !!i40e_find_vsi_by_type(pf, I40E_VSI_VMDQ2); in i40e_active_vmdqs()
2570 struct i40e_pf *pf = np->vsi->back; in i40e_diag_test() local
2574 netif_info(pf, drv, netdev, "offline testing starting\n"); in i40e_diag_test()
2576 set_bit(__I40E_TESTING, pf->state); in i40e_diag_test()
2578 if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) || in i40e_diag_test()
2579 test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) { in i40e_diag_test()
2580 dev_warn(&pf->pdev->dev, in i40e_diag_test()
2585 if (i40e_active_vfs(pf) || i40e_active_vmdqs(pf)) { in i40e_diag_test()
2586 dev_warn(&pf->pdev->dev, in i40e_diag_test()
2601 i40e_do_reset(pf, BIT(__I40E_PF_RESET_REQUESTED), true); in i40e_diag_test()
2616 clear_bit(__I40E_TESTING, pf->state); in i40e_diag_test()
2617 i40e_do_reset(pf, BIT(__I40E_PF_RESET_REQUESTED), true); in i40e_diag_test()
2623 netif_info(pf, drv, netdev, "online testing starting\n"); in i40e_diag_test()
2634 netif_info(pf, drv, netdev, "testing finished\n"); in i40e_diag_test()
2643 clear_bit(__I40E_TESTING, pf->state); in i40e_diag_test()
2644 netif_info(pf, drv, netdev, "testing failed\n"); in i40e_diag_test()
2651 struct i40e_pf *pf = np->vsi->back; in i40e_get_wol() local
2652 struct i40e_hw *hw = &pf->hw; in i40e_get_wol()
2662 wol->wolopts = (pf->wol_en ? WAKE_MAGIC : 0); in i40e_get_wol()
2674 struct i40e_pf *pf = np->vsi->back; in i40e_set_wol() local
2676 struct i40e_hw *hw = &pf->hw; in i40e_set_wol()
2681 i40e_partition_setting_complaint(pf); in i40e_set_wol()
2685 if (vsi != pf->vsi[pf->lan_vsi]) in i40e_set_wol()
2698 if (pf->wol_en != !!wol->wolopts) { in i40e_set_wol()
2699 pf->wol_en = !!wol->wolopts; in i40e_set_wol()
2700 device_set_wakeup_enable(&pf->pdev->dev, pf->wol_en); in i40e_set_wol()
2710 struct i40e_pf *pf = np->vsi->back; in i40e_set_phys_id() local
2711 struct i40e_hw *hw = &pf->hw; in i40e_set_phys_id()
2718 if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) { in i40e_set_phys_id()
2719 pf->led_status = i40e_led_get(hw); in i40e_set_phys_id()
2725 &pf->phy_led_val); in i40e_set_phys_id()
2726 pf->led_status = temp_status; in i40e_set_phys_id()
2730 if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) in i40e_set_phys_id()
2733 ret = i40e_led_set_phy(hw, true, pf->led_status, 0); in i40e_set_phys_id()
2736 if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) in i40e_set_phys_id()
2739 ret = i40e_led_set_phy(hw, false, pf->led_status, 0); in i40e_set_phys_id()
2742 if (!(pf->hw_features & I40E_HW_PHY_CONTROLS_LEDS)) { in i40e_set_phys_id()
2743 i40e_led_set(hw, pf->led_status, false); in i40e_set_phys_id()
2745 ret = i40e_led_set_phy(hw, false, pf->led_status, in i40e_set_phys_id()
2746 (pf->phy_led_val | in i40e_set_phys_id()
2866 struct i40e_pf *pf = vsi->back; in i40e_set_itr_per_queue() local
2867 struct i40e_hw *hw = &pf->hw; in i40e_set_itr_per_queue()
2916 struct i40e_pf *pf = vsi->back; in __i40e_set_coalesce() local
2929 netif_info(pf, drv, netdev, "Invalid queue value, queue range is 0 - %d\n", in __i40e_set_coalesce()
2939 netif_info(pf, drv, netdev, "tx-usecs-high is not used, please program rx-usecs-high\n"); in __i40e_set_coalesce()
2944 netif_info(pf, drv, netdev, "Invalid value, rx-usecs-high range is 0-%lu\n", in __i40e_set_coalesce()
2951 …netif_info(pf, drv, netdev, "RX interrupt moderation cannot be changed if adaptive-rx is enabled.\… in __i40e_set_coalesce()
2956 netif_info(pf, drv, netdev, "Invalid value, rx-usecs range is 0-8160\n"); in __i40e_set_coalesce()
2962 …netif_info(pf, drv, netdev, "TX interrupt moderation cannot be changed if adaptive-tx is enabled.\… in __i40e_set_coalesce()
2967 netif_info(pf, drv, netdev, "Invalid value, tx-usecs range is 0-8160\n"); in __i40e_set_coalesce()
2980 netif_info(pf, drv, netdev, "Interrupt rate limit rounded down to %d\n", in __i40e_set_coalesce()
3035 static int i40e_get_rss_hash_opts(struct i40e_pf *pf, struct ethtool_rxnfc *cmd) in i40e_get_rss_hash_opts() argument
3037 struct i40e_hw *hw = &pf->hw; in i40e_get_rss_hash_opts()
3221 static int i40e_get_ethtool_fdir_all(struct i40e_pf *pf, in i40e_get_ethtool_fdir_all() argument
3230 cmd->data = i40e_get_fd_cnt_all(pf); in i40e_get_ethtool_fdir_all()
3233 &pf->fdir_filter_list, fdir_node) { in i40e_get_ethtool_fdir_all()
3256 static int i40e_get_ethtool_fdir_entry(struct i40e_pf *pf, in i40e_get_ethtool_fdir_entry() argument
3268 &pf->fdir_filter_list, fdir_node) { in i40e_get_ethtool_fdir_entry()
3345 input_set = i40e_read_fd_input_set(pf, index); in i40e_get_ethtool_fdir_entry()
3387 if (rule->dest_vsi != pf->vsi[pf->lan_vsi]->id) { in i40e_get_ethtool_fdir_entry()
3390 vsi = i40e_find_vsi_from_id(pf, rule->dest_vsi); in i40e_get_ethtool_fdir_entry()
3426 struct i40e_pf *pf = vsi->back; in i40e_get_rxnfc() local
3435 ret = i40e_get_rss_hash_opts(pf, cmd); in i40e_get_rxnfc()
3438 cmd->rule_cnt = pf->fdir_pf_active_filters; in i40e_get_rxnfc()
3440 cmd->data = i40e_get_fd_cnt_all(pf); in i40e_get_rxnfc()
3444 ret = i40e_get_ethtool_fdir_entry(pf, cmd); in i40e_get_rxnfc()
3447 ret = i40e_get_ethtool_fdir_all(pf, cmd, rule_locs); in i40e_get_rxnfc()
3517 static int i40e_set_rss_hash_opt(struct i40e_pf *pf, struct ethtool_rxnfc *nfc) in i40e_set_rss_hash_opt() argument
3519 struct i40e_hw *hw = &pf->hw; in i40e_set_rss_hash_opt()
3527 if (pf->flags & I40E_FLAG_MFP_ENABLED) { in i40e_set_rss_hash_opt()
3528 dev_err(&pf->pdev->dev, in i40e_set_rss_hash_opt()
3543 if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) in i40e_set_rss_hash_opt()
3549 if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) in i40e_set_rss_hash_opt()
3555 if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) { in i40e_set_rss_hash_opt()
3565 if (pf->hw_features & I40E_HW_MULTIPLE_TCP_UDP_RSS_PCTYPE) { in i40e_set_rss_hash_opt()
3609 i_set = i40e_get_rss_hash_bits(&pf->hw, nfc, i_setc); in i40e_set_rss_hash_opt()
3644 struct i40e_pf *pf = vsi->back; in i40e_update_ethtool_fdir_entry() local
3652 &pf->fdir_filter_list, fdir_node) { in i40e_update_ethtool_fdir_entry()
3667 pf->fdir_pf_active_filters--; in i40e_update_ethtool_fdir_entry()
3684 &pf->fdir_filter_list); in i40e_update_ethtool_fdir_entry()
3687 pf->fdir_pf_active_filters++; in i40e_update_ethtool_fdir_entry()
3700 static void i40e_prune_flex_pit_list(struct i40e_pf *pf) in i40e_prune_flex_pit_list() argument
3706 list_for_each_entry_safe(entry, tmp, &pf->l3_flex_pit_list, list) { in i40e_prune_flex_pit_list()
3709 hlist_for_each_entry(rule, &pf->fdir_filter_list, fdir_node) { in i40e_prune_flex_pit_list()
3729 list_for_each_entry_safe(entry, tmp, &pf->l4_flex_pit_list, list) { in i40e_prune_flex_pit_list()
3732 hlist_for_each_entry(rule, &pf->fdir_filter_list, fdir_node) { in i40e_prune_flex_pit_list()
3770 struct i40e_pf *pf = vsi->back; in i40e_del_fdir_entry() local
3773 if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) || in i40e_del_fdir_entry()
3774 test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) in i40e_del_fdir_entry()
3777 if (test_bit(__I40E_FD_FLUSH_REQUESTED, pf->state)) in i40e_del_fdir_entry()
3782 i40e_prune_flex_pit_list(pf); in i40e_del_fdir_entry()
3784 i40e_fdir_check_and_reenable(pf); in i40e_del_fdir_entry()
3797 static u8 i40e_unused_pit_index(struct i40e_pf *pf) in i40e_unused_pit_index() argument
3807 list_for_each_entry(entry, &pf->l4_flex_pit_list, list) in i40e_unused_pit_index()
3810 list_for_each_entry(entry, &pf->l3_flex_pit_list, list) in i40e_unused_pit_index()
3933 static void __i40e_reprogram_flex_pit(struct i40e_pf *pf, in __i40e_reprogram_flex_pit() argument
3967 i40e_write_rx_ctl(&pf->hw, in __i40e_reprogram_flex_pit()
3975 i40e_write_rx_ctl(&pf->hw, in __i40e_reprogram_flex_pit()
3993 i40e_write_rx_ctl(&pf->hw, in __i40e_reprogram_flex_pit()
4008 static void i40e_reprogram_flex_pit(struct i40e_pf *pf) in i40e_reprogram_flex_pit() argument
4010 __i40e_reprogram_flex_pit(pf, &pf->l3_flex_pit_list, in i40e_reprogram_flex_pit()
4013 __i40e_reprogram_flex_pit(pf, &pf->l4_flex_pit_list, in i40e_reprogram_flex_pit()
4017 i40e_write_rx_ctl(&pf->hw, in i40e_reprogram_flex_pit()
4022 i40e_write_rx_ctl(&pf->hw, in i40e_reprogram_flex_pit()
4102 struct i40e_pf *pf = vsi->back; in i40e_print_input_set() local
4109 netif_info(pf, drv, vsi->netdev, "L3 source address: %s -> %s\n", in i40e_print_input_set()
4116 netif_info(pf, drv, vsi->netdev, "L3 destination address: %s -> %s\n", in i40e_print_input_set()
4123 netif_info(pf, drv, vsi->netdev, "L4 source port: %s -> %s\n", in i40e_print_input_set()
4130 netif_info(pf, drv, vsi->netdev, "L4 destination port: %s -> %s\n", in i40e_print_input_set()
4137 netif_info(pf, drv, vsi->netdev, "SCTP verification tag: %s -> %s\n", in i40e_print_input_set()
4148 netif_info(pf, drv, vsi->netdev, "FLEX index %d: %s -> %s\n", in i40e_print_input_set()
4154 netif_info(pf, drv, vsi->netdev, " Current input set: %0llx\n", in i40e_print_input_set()
4156 netif_info(pf, drv, vsi->netdev, "Requested input set: %0llx\n", in i40e_print_input_set()
4196 struct i40e_pf *pf = vsi->back; in i40e_check_fdir_input_set() local
4208 fdir_filter_count = &pf->fd_sctp4_filter_cnt; in i40e_check_fdir_input_set()
4212 fdir_filter_count = &pf->fd_tcp4_filter_cnt; in i40e_check_fdir_input_set()
4216 fdir_filter_count = &pf->fd_udp4_filter_cnt; in i40e_check_fdir_input_set()
4220 fdir_filter_count = &pf->fd_sctp6_filter_cnt; in i40e_check_fdir_input_set()
4224 fdir_filter_count = &pf->fd_tcp6_filter_cnt; in i40e_check_fdir_input_set()
4228 fdir_filter_count = &pf->fd_udp6_filter_cnt; in i40e_check_fdir_input_set()
4232 fdir_filter_count = &pf->fd_ip4_filter_cnt; in i40e_check_fdir_input_set()
4237 fdir_filter_count = &pf->fd_ip6_filter_cnt; in i40e_check_fdir_input_set()
4245 current_mask = i40e_read_fd_input_set(pf, index); in i40e_check_fdir_input_set()
4452 dev_warn(&pf->pdev->dev, in i40e_check_fdir_input_set()
4461 dev_warn(&pf->pdev->dev, in i40e_check_fdir_input_set()
4471 flex_pit = i40e_find_flex_offset(&pf->l4_flex_pit_list, in i40e_check_fdir_input_set()
4485 i40e_find_flex_offset(&pf->l3_flex_pit_list, in i40e_check_fdir_input_set()
4515 pit_index = i40e_unused_pit_index(pf); in i40e_check_fdir_input_set()
4531 netif_info(pf, drv, vsi->netdev, "Input set change requested for %s flows:\n", in i40e_check_fdir_input_set()
4535 netif_info(pf, drv, vsi->netdev, "FLEX index %d: Offset -> %d", in i40e_check_fdir_input_set()
4543 if (pf->flags & I40E_FLAG_MFP_ENABLED) { in i40e_check_fdir_input_set()
4544 netif_err(pf, drv, vsi->netdev, "Cannot change Flow Director input sets while MFP is enabled\n"); in i40e_check_fdir_input_set()
4558 …netif_err(pf, drv, vsi->netdev, "Cannot change input set for %s flows until %d preexisting filters… in i40e_check_fdir_input_set()
4564 i40e_write_fd_input_set(pf, index, new_mask); in i40e_check_fdir_input_set()
4573 i40e_write_fd_input_set(pf, I40E_FILTER_PCTYPE_FRAG_IPV4, in i40e_check_fdir_input_set()
4578 err = i40e_add_flex_offset(&pf->l4_flex_pit_list, src_offset, in i40e_check_fdir_input_set()
4584 err = i40e_add_flex_offset(&pf->l3_flex_pit_list, in i40e_check_fdir_input_set()
4591 i40e_reprogram_flex_pit(pf); in i40e_check_fdir_input_set()
4652 struct i40e_pf *pf = vsi->back; in i40e_disallow_matching_filters() local
4658 &pf->fdir_filter_list, fdir_node) { in i40e_disallow_matching_filters()
4670 dev_warn(&pf->pdev->dev, in i40e_disallow_matching_filters()
4695 struct i40e_pf *pf; in i40e_add_fdir_ethtool() local
4701 pf = vsi->back; in i40e_add_fdir_ethtool()
4703 if (!(pf->flags & I40E_FLAG_FD_SB_ENABLED)) in i40e_add_fdir_ethtool()
4706 if (test_bit(__I40E_FD_SB_AUTO_DISABLED, pf->state)) in i40e_add_fdir_ethtool()
4709 if (test_bit(__I40E_RESET_RECOVERY_PENDING, pf->state) || in i40e_add_fdir_ethtool()
4710 test_bit(__I40E_RESET_INTR_RECEIVED, pf->state)) in i40e_add_fdir_ethtool()
4713 if (test_bit(__I40E_FD_FLUSH_REQUESTED, pf->state)) in i40e_add_fdir_ethtool()
4730 if (fsp->location >= (pf->hw.func_caps.fd_filters_best_effort + in i40e_add_fdir_ethtool()
4731 pf->hw.func_caps.fd_filters_guaranteed)) { in i40e_add_fdir_ethtool()
4752 if (vf >= pf->num_alloc_vfs) in i40e_add_fdir_ethtool()
4754 if (ring >= pf->vf[vf].num_queue_pairs) in i40e_add_fdir_ethtool()
4756 dest_vsi = pf->vf[vf].lan_vsi_id; in i40e_add_fdir_ethtool()
4772 input->cnt_index = I40E_FD_SB_STAT_IDX(pf->hw.pf_id); in i40e_add_fdir_ethtool()
4832 pf->fdir_pf_active_filters--; in i40e_add_fdir_ethtool()
4849 struct i40e_pf *pf = vsi->back; in i40e_set_rxnfc() local
4854 ret = i40e_set_rss_hash_opt(pf, cmd); in i40e_set_rxnfc()
4894 struct i40e_pf *pf = vsi->back; in i40e_get_channels() local
4900 ch->other_count = (pf->flags & I40E_FLAG_FD_SB_ENABLED) ? 1 : 0; in i40e_get_channels()
4922 struct i40e_pf *pf = vsi->back; in i40e_set_channels() local
4935 if (i40e_is_tc_mqprio_enabled(pf)) in i40e_set_channels()
4943 if (ch->other_count != ((pf->flags & I40E_FLAG_FD_SB_ENABLED) ? 1 : 0)) in i40e_set_channels()
4954 &pf->fdir_filter_list, fdir_node) { in i40e_set_channels()
4956 dev_warn(&pf->pdev->dev, in i40e_set_channels()
4964 dev_err(&pf->pdev->dev, in i40e_set_channels()
4976 new_count = i40e_reconfig_rss_queues(pf, count); in i40e_set_channels()
5061 struct i40e_pf *pf = vsi->back; in i40e_set_rxfh() local
5089 i40e_fill_rss_lut(pf, vsi->rss_lut_user, I40E_HLUT_ARRAY_SIZE, in i40e_set_rxfh()
5110 struct i40e_pf *pf = vsi->back; in i40e_get_priv_flags() local
5118 if (priv_flags->flag & pf->flags) in i40e_get_priv_flags()
5122 if (pf->hw.pf_id != 0) in i40e_get_priv_flags()
5130 if (priv_flags->flag & pf->flags) in i40e_get_priv_flags()
5148 struct i40e_pf *pf = vsi->back; in i40e_set_priv_flags() local
5153 orig_flags = READ_ONCE(pf->flags); in i40e_set_priv_flags()
5172 if (pf->hw.pf_id != 0) in i40e_set_priv_flags()
5206 !(pf->hw_features & I40E_HW_ATR_EVICT_CAPABLE)) in i40e_set_priv_flags()
5218 if (!(pf->hw.flags & I40E_HW_FLAG_FW_LLDP_STOPPABLE)) { in i40e_set_priv_flags()
5219 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5226 pf->hw.device_id != I40E_DEV_ID_25G_SFP28 && in i40e_set_priv_flags()
5227 pf->hw.device_id != I40E_DEV_ID_25G_B) { in i40e_set_priv_flags()
5228 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5234 pf->hw.device_id != I40E_DEV_ID_25G_SFP28 && in i40e_set_priv_flags()
5235 pf->hw.device_id != I40E_DEV_ID_25G_B && in i40e_set_priv_flags()
5236 pf->hw.device_id != I40E_DEV_ID_KX_X722) { in i40e_set_priv_flags()
5237 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5250 set_bit(__I40E_FD_ATR_AUTO_DISABLED, pf->state); in i40e_set_priv_flags()
5251 set_bit(__I40E_FD_FLUSH_REQUESTED, pf->state); in i40e_set_priv_flags()
5261 ret = i40e_aq_set_switch_config(&pf->hw, sw_flags, valid_flags, in i40e_set_priv_flags()
5263 if (ret && pf->hw.aq.asq_last_status != I40E_AQ_RC_ESRCH) { in i40e_set_priv_flags()
5264 dev_info(&pf->pdev->dev, in i40e_set_priv_flags()
5267 i40e_aq_str(&pf->hw, in i40e_set_priv_flags()
5268 pf->hw.aq.asq_last_status)); in i40e_set_priv_flags()
5288 dev_warn(&pf->pdev->dev, "Cannot change FEC config\n"); in i40e_set_priv_flags()
5293 dev_err(&pf->pdev->dev, in i40e_set_priv_flags()
5299 pf->num_alloc_vfs) { in i40e_set_priv_flags()
5300 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5308 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5314 i40e_dcb_sw_default_config(pf); in i40e_set_priv_flags()
5316 i40e_aq_cfg_lldp_mib_change_event(&pf->hw, false, NULL); in i40e_set_priv_flags()
5317 i40e_aq_stop_lldp(&pf->hw, true, false, NULL); in i40e_set_priv_flags()
5319 status = i40e_aq_start_lldp(&pf->hw, false, NULL); in i40e_set_priv_flags()
5321 adq_err = pf->hw.aq.asq_last_status; in i40e_set_priv_flags()
5324 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5329 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5333 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5337 dev_warn(&pf->pdev->dev, in i40e_set_priv_flags()
5340 i40e_aq_str(&pf->hw, in i40e_set_priv_flags()
5353 pf->flags = new_flags; in i40e_set_priv_flags()
5359 i40e_do_reset(pf, reset_needed, true); in i40e_set_priv_flags()
5374 struct i40e_pf *pf = vsi->back; in i40e_get_module_info() local
5375 struct i40e_hw *hw = &pf->hw; in i40e_get_module_info()
5481 struct i40e_pf *pf = vsi->back; in i40e_get_module_eeprom() local
5482 struct i40e_hw *hw = &pf->hw; in i40e_get_module_eeprom()
5527 struct i40e_pf *pf = vsi->back; in i40e_get_eee() local
5528 struct i40e_hw *hw = &pf->hw; in i40e_get_eee()
5552 edata->tx_lpi_enabled = pf->stats.tx_lpi_status; in i40e_get_eee()
5554 edata->eee_active = pf->stats.tx_lpi_status && pf->stats.rx_lpi_status; in i40e_get_eee()
5564 struct i40e_pf *pf = vsi->back; in i40e_is_eee_param_supported() local
5571 {edata->tx_lpi_enabled != pf->stats.tx_lpi_status, "tx-lpi"} in i40e_is_eee_param_supported()
5593 struct i40e_pf *pf = vsi->back; in i40e_set_eee() local
5594 struct i40e_hw *hw = &pf->hw; in i40e_set_eee()
5714 struct i40e_pf *pf = np->vsi->back; in i40e_set_ethtool_ops() local
5716 if (!test_bit(__I40E_RECOVERY_MODE, pf->state)) in i40e_set_ethtool_ops()