Lines Matching full:pf

16 	struct ice_pf *pf = ice_netdev_to_pf(netdev);  in ice_dcbnl_devreset()  local
18 while (ice_is_reset_in_progress(pf->state)) in ice_dcbnl_devreset()
35 struct ice_pf *pf; in ice_dcbnl_getets() local
37 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getets()
38 dcbxcfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg; in ice_dcbnl_getets()
64 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setets() local
69 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_setets()
70 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) in ice_dcbnl_setets()
73 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setets()
78 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_setets()
80 mutex_lock(&pf->tc_mutex); in ice_dcbnl_setets()
98 if (ice_dcb_bwchk(pf, new_cfg)) { in ice_dcbnl_setets()
103 new_cfg->etscfg.maxtcs = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_setets()
111 err = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_setets()
119 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_setets()
134 struct ice_pf *pf = ice_netdev_to_pf(dev); in ice_dcbnl_getnumtcs() local
136 if (!test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags)) in ice_dcbnl_getnumtcs()
139 *num = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_getnumtcs()
149 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getdcbx() local
151 return pf->dcbx_cap; in ice_dcbnl_getdcbx()
161 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setdcbx() local
165 if (test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags)) in ice_dcbnl_setdcbx()
175 if (mode == pf->dcbx_cap) in ice_dcbnl_setdcbx()
178 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setdcbx()
183 qos_cfg = &pf->hw.port_info->qos_cfg; in ice_dcbnl_setdcbx()
189 pf->dcbx_cap = mode; in ice_dcbnl_setdcbx()
196 dev_info(ice_pf_to_dev(pf), "DCBx mode = 0x%x\n", mode); in ice_dcbnl_setdcbx()
207 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_perm_hw_addr() local
208 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_perm_hw_addr()
240 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfc() local
241 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_getpfc()
249 ice_get_pfc_delay(&pf->hw, &pfc->delay); in ice_dcbnl_getpfc()
252 pfc->requests[i] = pf->stats.priority_xoff_tx[i]; in ice_dcbnl_getpfc()
253 pfc->indications[i] = pf->stats.priority_xoff_rx[i]; in ice_dcbnl_getpfc()
266 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setpfc() local
270 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_setpfc()
271 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) in ice_dcbnl_setpfc()
274 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setpfc()
279 mutex_lock(&pf->tc_mutex); in ice_dcbnl_setpfc()
281 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_setpfc()
286 new_cfg->pfc.pfccap = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_setpfc()
290 err = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_setpfc()
295 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_setpfc()
308 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pfc_cfg() local
309 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pfc_cfg()
311 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pfc_cfg()
312 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pfc_cfg()
319 dev_dbg(ice_pf_to_dev(pf), "Get PFC Config up=%d, setting=%d, pfcenable=0x%x\n", in ice_dcbnl_get_pfc_cfg()
331 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pfc_cfg() local
334 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_set_pfc_cfg()
335 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_set_pfc_cfg()
341 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_set_pfc_cfg()
346 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_set_pfc_cfg()
348 new_cfg->pfc.pfccap = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_set_pfc_cfg()
354 dev_dbg(ice_pf_to_dev(pf), "Set PFC config UP:%d set:%d pfcena:0x%x\n", in ice_dcbnl_set_pfc_cfg()
364 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfcstate() local
365 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_getpfcstate()
380 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getstate() local
383 state = test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags); in ice_dcbnl_getstate()
385 dev_dbg(ice_pf_to_dev(pf), "DCB enabled state = %d\n", state); in ice_dcbnl_getstate()
396 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setstate() local
398 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_setstate()
399 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_setstate()
402 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setstate()
408 if (!!state == test_bit(ICE_FLAG_DCB_ENA, pf->flags)) in ice_dcbnl_setstate()
412 set_bit(ICE_FLAG_DCB_ENA, pf->flags); in ice_dcbnl_setstate()
413 memcpy(&pf->hw.port_info->qos_cfg.desired_dcbx_cfg, in ice_dcbnl_setstate()
414 &pf->hw.port_info->qos_cfg.local_dcbx_cfg, in ice_dcbnl_setstate()
417 clear_bit(ICE_FLAG_DCB_ENA, pf->flags); in ice_dcbnl_setstate()
438 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_tx() local
439 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pg_tc_cfg_tx()
441 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_tc_cfg_tx()
442 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_tc_cfg_tx()
449 dev_dbg(ice_pf_to_dev(pf), "Get PG config prio=%d tc=%d\n", prio, in ice_dcbnl_get_pg_tc_cfg_tx()
468 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_tx() local
472 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_set_pg_tc_cfg_tx()
473 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_set_pg_tc_cfg_tx()
479 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_set_pg_tc_cfg_tx()
484 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_set_pg_tc_cfg_tx()
504 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_tx() local
505 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pg_bwg_cfg_tx()
507 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_bwg_cfg_tx()
508 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_bwg_cfg_tx()
515 dev_dbg(ice_pf_to_dev(pf), "Get PG BW config tc=%d bw_pct=%d\n", in ice_dcbnl_get_pg_bwg_cfg_tx()
528 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_tx() local
531 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_set_pg_bwg_cfg_tx()
532 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_set_pg_bwg_cfg_tx()
538 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_set_pg_bwg_cfg_tx()
543 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_set_pg_bwg_cfg_tx()
563 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_rx() local
564 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pg_tc_cfg_rx()
566 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_tc_cfg_rx()
567 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_tc_cfg_rx()
595 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_rx() local
597 dev_dbg(ice_pf_to_dev(pf), "Rx TC PG Config Not Supported.\n"); in ice_dcbnl_set_pg_tc_cfg_rx()
610 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_rx() local
612 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_bwg_cfg_rx()
613 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_bwg_cfg_rx()
631 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_rx() local
633 dev_dbg(ice_pf_to_dev(pf), "Rx BWG PG Config Not Supported.\n"); in ice_dcbnl_set_pg_bwg_cfg_rx()
644 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_cap() local
646 if (!(test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags))) in ice_dcbnl_get_cap()
672 *cap = pf->dcbx_cap; in ice_dcbnl_get_cap()
679 dev_dbg(ice_pf_to_dev(pf), "DCBX Get Capability cap=%d capval=0x%x\n", in ice_dcbnl_get_cap()
692 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getapp() local
698 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_getapp()
699 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_getapp()
735 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setapp() local
746 if (pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) { in ice_dcbnl_setapp()
751 if (!(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) in ice_dcbnl_setapp()
754 if (!ice_is_feature_supported(pf, ICE_F_DSCP)) in ice_dcbnl_setapp()
763 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_setapp()
768 max_tc = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_setapp()
776 mutex_lock(&pf->tc_mutex); in ice_dcbnl_setapp()
778 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_setapp()
779 old_cfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg; in ice_dcbnl_setapp()
804 ret = ice_aq_set_pfc_mode(&pf->hw, ICE_AQC_PFC_DSCP_BASED_PFC, in ice_dcbnl_setapp()
848 ret = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_setapp()
856 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_setapp()
869 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_delapp() local
874 if (pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) { in ice_dcbnl_delapp()
879 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_delapp()
884 mutex_lock(&pf->tc_mutex); in ice_dcbnl_delapp()
885 old_cfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg; in ice_dcbnl_delapp()
891 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_delapp()
920 !ice_is_feature_supported(pf, ICE_F_DSCP)) { in ice_dcbnl_delapp()
936 ret = ice_aq_set_pfc_mode(&pf->hw, in ice_dcbnl_delapp()
948 ret = ice_dcb_sw_dflt_cfg(pf, true, true); in ice_dcbnl_delapp()
950 ret = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_delapp()
967 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_delapp()
977 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_cee_set_all() local
981 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_cee_set_all()
982 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_cee_set_all()
985 if (pf->lag && pf->lag->bonded) { in ice_dcbnl_cee_set_all()
990 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_cee_set_all()
992 mutex_lock(&pf->tc_mutex); in ice_dcbnl_cee_set_all()
994 err = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_cee_set_all()
996 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_cee_set_all()
1044 struct ice_pf *pf; in ice_dcbnl_set_all() local
1050 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_all()
1051 pi = pf->hw.port_info; in ice_dcbnl_set_all()
1054 if (pf->dcbx_cap & DCB_CAP_DCBX_HOST) in ice_dcbnl_set_all()
1058 if (!test_bit(ICE_FLAG_DCB_ENA, pf->flags)) in ice_dcbnl_set_all()
1086 * Delete given APP from all the VSIs for given PF
1105 * @pf: the corresponding PF
1113 ice_dcbnl_flush_apps(struct ice_pf *pf, struct ice_dcbx_cfg *old_cfg, in ice_dcbnl_flush_apps() argument
1116 struct ice_vsi *main_vsi = ice_get_main_vsi(pf); in ice_dcbnl_flush_apps()
1138 struct ice_pf *pf; in ice_dcbnl_setup() local
1140 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setup()
1141 if (!test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags)) in ice_dcbnl_setup()