Lines Matching refs: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 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_setets()
75 mutex_lock(&pf->tc_mutex); in ice_dcbnl_setets()
93 if (ice_dcb_bwchk(pf, new_cfg)) { in ice_dcbnl_setets()
98 new_cfg->etscfg.maxtcs = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_setets()
106 err = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_setets()
114 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_setets()
129 struct ice_pf *pf = ice_netdev_to_pf(dev); in ice_dcbnl_getnumtcs() local
131 if (!test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags)) in ice_dcbnl_getnumtcs()
134 *num = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_getnumtcs()
144 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getdcbx() local
146 return pf->dcbx_cap; in ice_dcbnl_getdcbx()
156 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setdcbx() local
160 if (test_bit(ICE_FLAG_FW_LLDP_AGENT, pf->flags)) in ice_dcbnl_setdcbx()
170 if (mode == pf->dcbx_cap) in ice_dcbnl_setdcbx()
173 qos_cfg = &pf->hw.port_info->qos_cfg; in ice_dcbnl_setdcbx()
179 pf->dcbx_cap = mode; in ice_dcbnl_setdcbx()
186 dev_info(ice_pf_to_dev(pf), "DCBx mode = 0x%x\n", mode); in ice_dcbnl_setdcbx()
197 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_perm_hw_addr() local
198 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_perm_hw_addr()
230 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfc() local
231 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_getpfc()
239 ice_get_pfc_delay(&pf->hw, &pfc->delay); in ice_dcbnl_getpfc()
242 pfc->requests[i] = pf->stats.priority_xoff_tx[i]; in ice_dcbnl_getpfc()
243 pfc->indications[i] = pf->stats.priority_xoff_rx[i]; in ice_dcbnl_getpfc()
256 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setpfc() local
260 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_setpfc()
261 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) in ice_dcbnl_setpfc()
264 mutex_lock(&pf->tc_mutex); in ice_dcbnl_setpfc()
266 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_setpfc()
271 new_cfg->pfc.pfccap = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_setpfc()
275 err = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_setpfc()
280 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_setpfc()
293 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pfc_cfg() local
294 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pfc_cfg()
296 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pfc_cfg()
297 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pfc_cfg()
304 dev_dbg(ice_pf_to_dev(pf), "Get PFC Config up=%d, setting=%d, pfcenable=0x%x\n", in ice_dcbnl_get_pfc_cfg()
316 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pfc_cfg() local
319 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_set_pfc_cfg()
320 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_set_pfc_cfg()
326 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_set_pfc_cfg()
328 new_cfg->pfc.pfccap = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_set_pfc_cfg()
334 dev_dbg(ice_pf_to_dev(pf), "Set PFC config UP:%d set:%d pfcena:0x%x\n", in ice_dcbnl_set_pfc_cfg()
344 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfcstate() local
345 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_getpfcstate()
360 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getstate() local
363 state = test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags); in ice_dcbnl_getstate()
365 dev_dbg(ice_pf_to_dev(pf), "DCB enabled state = %d\n", state); in ice_dcbnl_getstate()
376 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setstate() local
378 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_setstate()
379 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_setstate()
383 if (!!state == test_bit(ICE_FLAG_DCB_ENA, pf->flags)) in ice_dcbnl_setstate()
387 set_bit(ICE_FLAG_DCB_ENA, pf->flags); in ice_dcbnl_setstate()
388 memcpy(&pf->hw.port_info->qos_cfg.desired_dcbx_cfg, in ice_dcbnl_setstate()
389 &pf->hw.port_info->qos_cfg.local_dcbx_cfg, in ice_dcbnl_setstate()
392 clear_bit(ICE_FLAG_DCB_ENA, pf->flags); in ice_dcbnl_setstate()
413 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_tx() local
414 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pg_tc_cfg_tx()
416 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_tc_cfg_tx()
417 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_tc_cfg_tx()
424 dev_dbg(ice_pf_to_dev(pf), "Get PG config prio=%d tc=%d\n", prio, in ice_dcbnl_get_pg_tc_cfg_tx()
443 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_tx() local
447 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_set_pg_tc_cfg_tx()
448 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_set_pg_tc_cfg_tx()
454 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_set_pg_tc_cfg_tx()
474 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_tx() local
475 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pg_bwg_cfg_tx()
477 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_bwg_cfg_tx()
478 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_bwg_cfg_tx()
485 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()
498 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_tx() local
501 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_set_pg_bwg_cfg_tx()
502 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_set_pg_bwg_cfg_tx()
508 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_set_pg_bwg_cfg_tx()
528 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_rx() local
529 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pg_tc_cfg_rx()
531 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_tc_cfg_rx()
532 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_tc_cfg_rx()
560 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_rx() local
562 dev_dbg(ice_pf_to_dev(pf), "Rx TC PG Config Not Supported.\n"); in ice_dcbnl_set_pg_tc_cfg_rx()
575 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_rx() local
577 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_bwg_cfg_rx()
578 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_bwg_cfg_rx()
596 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_rx() local
598 dev_dbg(ice_pf_to_dev(pf), "Rx BWG PG Config Not Supported.\n"); in ice_dcbnl_set_pg_bwg_cfg_rx()
609 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_cap() local
611 if (!(test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags))) in ice_dcbnl_get_cap()
637 *cap = pf->dcbx_cap; in ice_dcbnl_get_cap()
644 dev_dbg(ice_pf_to_dev(pf), "DCBX Get Capability cap=%d capval=0x%x\n", in ice_dcbnl_get_cap()
657 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getapp() local
663 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_getapp()
664 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_getapp()
700 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setapp() local
711 if (pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) { in ice_dcbnl_setapp()
716 if (!(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) in ice_dcbnl_setapp()
719 if (!ice_is_feature_supported(pf, ICE_F_DSCP)) in ice_dcbnl_setapp()
728 max_tc = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_setapp()
736 mutex_lock(&pf->tc_mutex); in ice_dcbnl_setapp()
738 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_setapp()
739 old_cfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg; in ice_dcbnl_setapp()
764 ret = ice_aq_set_pfc_mode(&pf->hw, ICE_AQC_PFC_DSCP_BASED_PFC, in ice_dcbnl_setapp()
808 ret = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_setapp()
816 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_setapp()
829 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_delapp() local
834 if (pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) { in ice_dcbnl_delapp()
839 mutex_lock(&pf->tc_mutex); in ice_dcbnl_delapp()
840 old_cfg = &pf->hw.port_info->qos_cfg.local_dcbx_cfg; in ice_dcbnl_delapp()
846 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_delapp()
875 !ice_is_feature_supported(pf, ICE_F_DSCP)) { in ice_dcbnl_delapp()
891 ret = ice_aq_set_pfc_mode(&pf->hw, in ice_dcbnl_delapp()
903 ret = ice_dcb_sw_dflt_cfg(pf, true, true); in ice_dcbnl_delapp()
905 ret = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_delapp()
922 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_delapp()
932 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_cee_set_all() local
936 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_cee_set_all()
937 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_cee_set_all()
940 new_cfg = &pf->hw.port_info->qos_cfg.desired_dcbx_cfg; in ice_dcbnl_cee_set_all()
942 mutex_lock(&pf->tc_mutex); in ice_dcbnl_cee_set_all()
944 err = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_cee_set_all()
946 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_cee_set_all()
994 struct ice_pf *pf; in ice_dcbnl_set_all() local
1000 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_all()
1001 pi = pf->hw.port_info; in ice_dcbnl_set_all()
1004 if (pf->dcbx_cap & DCB_CAP_DCBX_HOST) in ice_dcbnl_set_all()
1008 if (!test_bit(ICE_FLAG_DCB_ENA, pf->flags)) in ice_dcbnl_set_all()
1063 ice_dcbnl_flush_apps(struct ice_pf *pf, struct ice_dcbx_cfg *old_cfg, in ice_dcbnl_flush_apps() argument
1066 struct ice_vsi *main_vsi = ice_get_main_vsi(pf); in ice_dcbnl_flush_apps()
1088 struct ice_pf *pf; in ice_dcbnl_setup() local
1090 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setup()
1091 if (!test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags)) in ice_dcbnl_setup()