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()
21 set_bit(__ICE_DCBNL_DEVRESET, pf->state); in ice_dcbnl_devreset()
26 clear_bit(__ICE_DCBNL_DEVRESET, pf->state); in ice_dcbnl_devreset()
38 struct ice_pf *pf; in ice_dcbnl_getets() local
40 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getets()
41 pi = pf->hw.port_info; in ice_dcbnl_getets()
68 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setets() local
73 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_setets()
74 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) in ice_dcbnl_setets()
77 new_cfg = &pf->hw.port_info->desired_dcbx_cfg; in ice_dcbnl_setets()
79 mutex_lock(&pf->tc_mutex); in ice_dcbnl_setets()
96 if (ice_dcb_bwchk(pf, new_cfg)) { in ice_dcbnl_setets()
101 max_tc = 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()
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
170 if (mode == pf->dcbx_cap) in ice_dcbnl_setdcbx()
173 pf->dcbx_cap = mode; in ice_dcbnl_setdcbx()
175 pf->hw.port_info->local_dcbx_cfg.dcbx_mode = ICE_DCBX_MODE_CEE; in ice_dcbnl_setdcbx()
177 pf->hw.port_info->local_dcbx_cfg.dcbx_mode = ICE_DCBX_MODE_IEEE; in ice_dcbnl_setdcbx()
179 dev_info(ice_pf_to_dev(pf), "DCBx mode = 0x%x\n", mode); in ice_dcbnl_setdcbx()
190 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_perm_hw_addr() local
191 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_perm_hw_addr()
223 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfc() local
224 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_getpfc()
232 ice_get_pfc_delay(&pf->hw, &pfc->delay); in ice_dcbnl_getpfc()
235 pfc->requests[i] = pf->stats.priority_xoff_tx[i]; in ice_dcbnl_getpfc()
236 pfc->indications[i] = pf->stats.priority_xoff_rx[i]; in ice_dcbnl_getpfc()
249 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setpfc() local
253 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_setpfc()
254 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) in ice_dcbnl_setpfc()
257 mutex_lock(&pf->tc_mutex); in ice_dcbnl_setpfc()
259 new_cfg = &pf->hw.port_info->desired_dcbx_cfg; in ice_dcbnl_setpfc()
264 new_cfg->pfc.pfccap = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_setpfc()
268 err = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_setpfc()
273 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_setpfc()
286 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pfc_cfg() local
287 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pfc_cfg()
289 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pfc_cfg()
290 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pfc_cfg()
297 dev_dbg(ice_pf_to_dev(pf), "Get PFC Config up=%d, setting=%d, pfcenable=0x%x\n", in ice_dcbnl_get_pfc_cfg()
309 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pfc_cfg() local
312 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_set_pfc_cfg()
313 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_set_pfc_cfg()
319 new_cfg = &pf->hw.port_info->desired_dcbx_cfg; in ice_dcbnl_set_pfc_cfg()
321 new_cfg->pfc.pfccap = pf->hw.func_caps.common_cap.maxtc; in ice_dcbnl_set_pfc_cfg()
327 dev_dbg(ice_pf_to_dev(pf), "Set PFC config UP:%d set:%d pfcena:0x%x\n", in ice_dcbnl_set_pfc_cfg()
337 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getpfcstate() local
338 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_getpfcstate()
353 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getstate() local
356 state = test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags); in ice_dcbnl_getstate()
358 dev_dbg(ice_pf_to_dev(pf), "DCB enabled state = %d\n", state); in ice_dcbnl_getstate()
369 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setstate() local
371 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_setstate()
372 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_setstate()
376 if (!!state == test_bit(ICE_FLAG_DCB_ENA, pf->flags)) in ice_dcbnl_setstate()
380 set_bit(ICE_FLAG_DCB_ENA, pf->flags); in ice_dcbnl_setstate()
381 memcpy(&pf->hw.port_info->desired_dcbx_cfg, in ice_dcbnl_setstate()
382 &pf->hw.port_info->local_dcbx_cfg, in ice_dcbnl_setstate()
385 clear_bit(ICE_FLAG_DCB_ENA, pf->flags); in ice_dcbnl_setstate()
406 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_tx() local
407 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pg_tc_cfg_tx()
409 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_tc_cfg_tx()
410 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_tc_cfg_tx()
417 dev_dbg(ice_pf_to_dev(pf), "Get PG config prio=%d tc=%d\n", prio, in ice_dcbnl_get_pg_tc_cfg_tx()
436 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_tx() local
440 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_set_pg_tc_cfg_tx()
441 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_set_pg_tc_cfg_tx()
447 new_cfg = &pf->hw.port_info->desired_dcbx_cfg; in ice_dcbnl_set_pg_tc_cfg_tx()
467 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_tx() local
468 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pg_bwg_cfg_tx()
470 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_bwg_cfg_tx()
471 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_bwg_cfg_tx()
478 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()
491 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_tx() local
494 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_set_pg_bwg_cfg_tx()
495 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_set_pg_bwg_cfg_tx()
501 new_cfg = &pf->hw.port_info->desired_dcbx_cfg; in ice_dcbnl_set_pg_bwg_cfg_tx()
521 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_tc_cfg_rx() local
522 struct ice_port_info *pi = pf->hw.port_info; in ice_dcbnl_get_pg_tc_cfg_rx()
524 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_tc_cfg_rx()
525 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_tc_cfg_rx()
553 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_tc_cfg_rx() local
555 dev_dbg(ice_pf_to_dev(pf), "Rx TC PG Config Not Supported.\n"); in ice_dcbnl_set_pg_tc_cfg_rx()
568 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_pg_bwg_cfg_rx() local
570 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_get_pg_bwg_cfg_rx()
571 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_get_pg_bwg_cfg_rx()
589 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_pg_bwg_cfg_rx() local
591 dev_dbg(ice_pf_to_dev(pf), "Rx BWG PG Config Not Supported.\n"); in ice_dcbnl_set_pg_bwg_cfg_rx()
602 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_get_cap() local
604 if (!(test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags))) in ice_dcbnl_get_cap()
630 *cap = pf->dcbx_cap; in ice_dcbnl_get_cap()
637 dev_dbg(ice_pf_to_dev(pf), "DCBX Get Capability cap=%d capval=0x%x\n", in ice_dcbnl_get_cap()
650 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_getapp() local
656 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_getapp()
657 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_getapp()
691 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setapp() local
696 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_setapp()
697 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)) in ice_dcbnl_setapp()
700 mutex_lock(&pf->tc_mutex); in ice_dcbnl_setapp()
702 new_cfg = &pf->hw.port_info->desired_dcbx_cfg; in ice_dcbnl_setapp()
704 old_cfg = &pf->hw.port_info->local_dcbx_cfg; in ice_dcbnl_setapp()
724 ret = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_setapp()
732 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_setapp()
745 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_delapp() local
750 if (pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) in ice_dcbnl_delapp()
753 mutex_lock(&pf->tc_mutex); in ice_dcbnl_delapp()
754 old_cfg = &pf->hw.port_info->local_dcbx_cfg; in ice_dcbnl_delapp()
763 new_cfg = &pf->hw.port_info->desired_dcbx_cfg; in ice_dcbnl_delapp()
790 ret = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_delapp()
798 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_delapp()
808 struct ice_pf *pf = ice_netdev_to_pf(netdev); in ice_dcbnl_cee_set_all() local
812 if ((pf->dcbx_cap & DCB_CAP_DCBX_LLD_MANAGED) || in ice_dcbnl_cee_set_all()
813 !(pf->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) in ice_dcbnl_cee_set_all()
816 new_cfg = &pf->hw.port_info->desired_dcbx_cfg; in ice_dcbnl_cee_set_all()
818 mutex_lock(&pf->tc_mutex); in ice_dcbnl_cee_set_all()
820 err = ice_pf_dcb_cfg(pf, new_cfg, true); in ice_dcbnl_cee_set_all()
822 mutex_unlock(&pf->tc_mutex); in ice_dcbnl_cee_set_all()
870 struct ice_pf *pf; in ice_dcbnl_set_all() local
876 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_set_all()
877 pi = pf->hw.port_info; in ice_dcbnl_set_all()
880 if (pf->dcbx_cap & DCB_CAP_DCBX_HOST) in ice_dcbnl_set_all()
884 if (!test_bit(ICE_FLAG_DCB_ENA, pf->flags)) in ice_dcbnl_set_all()
912 * Delete given APP from all the VSIs for given PF
931 * @pf: the corresponding PF
939 ice_dcbnl_flush_apps(struct ice_pf *pf, struct ice_dcbx_cfg *old_cfg, in ice_dcbnl_flush_apps() argument
942 struct ice_vsi *main_vsi = ice_get_main_vsi(pf); in ice_dcbnl_flush_apps()
964 struct ice_pf *pf; in ice_dcbnl_setup() local
966 pf = ice_netdev_to_pf(netdev); in ice_dcbnl_setup()
967 if (!test_bit(ICE_FLAG_DCB_CAPABLE, pf->flags)) in ice_dcbnl_setup()