Lines Matching refs:dcbcfg

37 				       struct i40e_dcbx_config *dcbcfg)  in i40e_parse_ieee_etscfg_tlv()  argument
52 etscfg = &dcbcfg->etscfg; in i40e_parse_ieee_etscfg_tlv()
108 struct i40e_dcbx_config *dcbcfg) in i40e_parse_ieee_etsrec_tlv() argument
129 dcbcfg->etsrec.prioritytable[i*2] = priority; in i40e_parse_ieee_etsrec_tlv()
132 dcbcfg->etsrec.prioritytable[i*2 + 1] = priority; in i40e_parse_ieee_etsrec_tlv()
143 dcbcfg->etsrec.tcbwtable[i] = buf[offset++]; in i40e_parse_ieee_etsrec_tlv()
152 dcbcfg->etsrec.tsatable[i] = buf[offset++]; in i40e_parse_ieee_etsrec_tlv()
163 struct i40e_dcbx_config *dcbcfg) in i40e_parse_ieee_pfccfg_tlv() argument
173 dcbcfg->pfc.willing = (u8)((buf[0] & I40E_IEEE_PFC_WILLING_MASK) >> in i40e_parse_ieee_pfccfg_tlv()
175 dcbcfg->pfc.mbc = (u8)((buf[0] & I40E_IEEE_PFC_MBC_MASK) >> in i40e_parse_ieee_pfccfg_tlv()
177 dcbcfg->pfc.pfccap = (u8)((buf[0] & I40E_IEEE_PFC_CAP_MASK) >> in i40e_parse_ieee_pfccfg_tlv()
179 dcbcfg->pfc.pfcenable = buf[1]; in i40e_parse_ieee_pfccfg_tlv()
190 struct i40e_dcbx_config *dcbcfg) in i40e_parse_ieee_app_tlv() argument
218 dcbcfg->app[i].priority = (u8)((buf[offset] & in i40e_parse_ieee_app_tlv()
221 dcbcfg->app[i].selector = (u8)((buf[offset] & in i40e_parse_ieee_app_tlv()
224 dcbcfg->app[i].protocolid = (buf[offset + 1] << 0x8) | in i40e_parse_ieee_app_tlv()
233 dcbcfg->numapps = i; in i40e_parse_ieee_app_tlv()
245 struct i40e_dcbx_config *dcbcfg) in i40e_parse_ieee_tlv() argument
255 i40e_parse_ieee_etscfg_tlv(tlv, dcbcfg); in i40e_parse_ieee_tlv()
258 i40e_parse_ieee_etsrec_tlv(tlv, dcbcfg); in i40e_parse_ieee_tlv()
261 i40e_parse_ieee_pfccfg_tlv(tlv, dcbcfg); in i40e_parse_ieee_tlv()
264 i40e_parse_ieee_app_tlv(tlv, dcbcfg); in i40e_parse_ieee_tlv()
279 struct i40e_dcbx_config *dcbcfg) in i40e_parse_cee_pgcfg_tlv() argument
287 etscfg = &dcbcfg->etscfg; in i40e_parse_cee_pgcfg_tlv()
332 struct i40e_dcbx_config *dcbcfg) in i40e_parse_cee_pfccfg_tlv() argument
337 dcbcfg->pfc.willing = 1; in i40e_parse_cee_pfccfg_tlv()
344 dcbcfg->pfc.pfcenable = buf[0]; in i40e_parse_cee_pfccfg_tlv()
345 dcbcfg->pfc.pfccap = buf[1]; in i40e_parse_cee_pfccfg_tlv()
356 struct i40e_dcbx_config *dcbcfg) in i40e_parse_cee_app_tlv() argument
366 dcbcfg->numapps = length / sizeof(*app); in i40e_parse_cee_app_tlv()
368 if (!dcbcfg->numapps) in i40e_parse_cee_app_tlv()
370 if (dcbcfg->numapps > I40E_DCBX_MAX_APPS) in i40e_parse_cee_app_tlv()
371 dcbcfg->numapps = I40E_DCBX_MAX_APPS; in i40e_parse_cee_app_tlv()
373 for (i = 0; i < dcbcfg->numapps; i++) { in i40e_parse_cee_app_tlv()
381 dcbcfg->app[i].priority = up; in i40e_parse_cee_app_tlv()
387 dcbcfg->app[i].selector = I40E_APP_SEL_ETHTYPE; in i40e_parse_cee_app_tlv()
390 dcbcfg->app[i].selector = I40E_APP_SEL_TCPIP; in i40e_parse_cee_app_tlv()
394 dcbcfg->app[i].selector = selector; in i40e_parse_cee_app_tlv()
397 dcbcfg->app[i].protocolid = ntohs(app->protocol); in i40e_parse_cee_app_tlv()
412 struct i40e_dcbx_config *dcbcfg) in i40e_parse_cee_tlv() argument
445 i40e_parse_cee_pgcfg_tlv(sub_tlv, dcbcfg); in i40e_parse_cee_tlv()
448 i40e_parse_cee_pfccfg_tlv(sub_tlv, dcbcfg); in i40e_parse_cee_tlv()
451 i40e_parse_cee_app_tlv(sub_tlv, dcbcfg); in i40e_parse_cee_tlv()
473 struct i40e_dcbx_config *dcbcfg) in i40e_parse_org_tlv() argument
483 i40e_parse_ieee_tlv(tlv, dcbcfg); in i40e_parse_org_tlv()
486 i40e_parse_cee_tlv(tlv, dcbcfg); in i40e_parse_org_tlv()
501 struct i40e_dcbx_config *dcbcfg) in i40e_lldp_to_dcb_config() argument
510 if (!lldpmib || !dcbcfg) in i40e_lldp_to_dcb_config()
530 i40e_parse_org_tlv(tlv, dcbcfg); in i40e_lldp_to_dcb_config()
556 struct i40e_dcbx_config *dcbcfg) in i40e_aq_get_dcb_config() argument
575 ret = i40e_lldp_to_dcb_config(lldpmib, dcbcfg); in i40e_aq_get_dcb_config()
591 struct i40e_dcbx_config *dcbcfg) in i40e_cee_to_dcb_v1_config() argument
598 dcbcfg->etscfg.maxtcs = cee_cfg->oper_num_tc; in i40e_cee_to_dcb_v1_config()
607 dcbcfg->etscfg.prioritytable[i * 2] = tc; in i40e_cee_to_dcb_v1_config()
611 dcbcfg->etscfg.prioritytable[i*2 + 1] = tc; in i40e_cee_to_dcb_v1_config()
615 dcbcfg->etscfg.tcbwtable[i] = cee_cfg->oper_tc_bw[i]; in i40e_cee_to_dcb_v1_config()
618 if (dcbcfg->etscfg.prioritytable[i] == I40E_CEE_PGID_STRICT) { in i40e_cee_to_dcb_v1_config()
620 dcbcfg->etscfg.prioritytable[i] = in i40e_cee_to_dcb_v1_config()
622 dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_STRICT; in i40e_cee_to_dcb_v1_config()
624 dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_ETS; in i40e_cee_to_dcb_v1_config()
629 dcbcfg->pfc.pfcenable = cee_cfg->oper_pfc_en; in i40e_cee_to_dcb_v1_config()
630 dcbcfg->pfc.pfccap = I40E_MAX_TRAFFIC_CLASS; in i40e_cee_to_dcb_v1_config()
638 dcbcfg->numapps = I40E_CEE_OPER_MAX_APPS; in i40e_cee_to_dcb_v1_config()
641 dcbcfg->app[0].priority = in i40e_cee_to_dcb_v1_config()
644 dcbcfg->app[0].selector = I40E_APP_SEL_ETHTYPE; in i40e_cee_to_dcb_v1_config()
645 dcbcfg->app[0].protocolid = I40E_APP_PROTOID_FCOE; in i40e_cee_to_dcb_v1_config()
648 dcbcfg->app[1].priority = in i40e_cee_to_dcb_v1_config()
651 dcbcfg->app[1].selector = I40E_APP_SEL_TCPIP; in i40e_cee_to_dcb_v1_config()
652 dcbcfg->app[1].protocolid = I40E_APP_PROTOID_ISCSI; in i40e_cee_to_dcb_v1_config()
655 dcbcfg->app[2].priority = in i40e_cee_to_dcb_v1_config()
658 dcbcfg->app[2].selector = I40E_APP_SEL_ETHTYPE; in i40e_cee_to_dcb_v1_config()
659 dcbcfg->app[2].protocolid = I40E_APP_PROTOID_FIP; in i40e_cee_to_dcb_v1_config()
672 struct i40e_dcbx_config *dcbcfg) in i40e_cee_to_dcb_config() argument
679 dcbcfg->etscfg.maxtcs = cee_cfg->oper_num_tc; in i40e_cee_to_dcb_config()
688 dcbcfg->etscfg.prioritytable[i * 2] = tc; in i40e_cee_to_dcb_config()
692 dcbcfg->etscfg.prioritytable[i * 2 + 1] = tc; in i40e_cee_to_dcb_config()
696 dcbcfg->etscfg.tcbwtable[i] = cee_cfg->oper_tc_bw[i]; in i40e_cee_to_dcb_config()
699 if (dcbcfg->etscfg.prioritytable[i] == I40E_CEE_PGID_STRICT) { in i40e_cee_to_dcb_config()
701 dcbcfg->etscfg.prioritytable[i] = in i40e_cee_to_dcb_config()
703 dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_STRICT; in i40e_cee_to_dcb_config()
705 dcbcfg->etscfg.tsatable[i] = I40E_IEEE_TSA_ETS; in i40e_cee_to_dcb_config()
710 dcbcfg->pfc.pfcenable = cee_cfg->oper_pfc_en; in i40e_cee_to_dcb_config()
711 dcbcfg->pfc.pfccap = I40E_MAX_TRAFFIC_CLASS; in i40e_cee_to_dcb_config()
722 dcbcfg->app[i].priority = in i40e_cee_to_dcb_config()
725 dcbcfg->app[i].selector = I40E_APP_SEL_ETHTYPE; in i40e_cee_to_dcb_config()
726 dcbcfg->app[i].protocolid = I40E_APP_PROTOID_FCOE; in i40e_cee_to_dcb_config()
738 dcbcfg->app[i].priority = in i40e_cee_to_dcb_config()
741 dcbcfg->app[i].selector = I40E_APP_SEL_TCPIP; in i40e_cee_to_dcb_config()
742 dcbcfg->app[i].protocolid = I40E_APP_PROTOID_ISCSI; in i40e_cee_to_dcb_config()
754 dcbcfg->app[i].priority = in i40e_cee_to_dcb_config()
757 dcbcfg->app[i].selector = I40E_APP_SEL_ETHTYPE; in i40e_cee_to_dcb_config()
758 dcbcfg->app[i].protocolid = I40E_APP_PROTOID_FIP; in i40e_cee_to_dcb_config()
761 dcbcfg->numapps = i; in i40e_cee_to_dcb_config()
986 struct i40e_dcbx_config *dcbcfg) in i40e_add_ieee_ets_tlv() argument
1009 etscfg = &dcbcfg->etscfg; in i40e_add_ieee_ets_tlv()
1061 struct i40e_dcbx_config *dcbcfg) in i40e_add_ieee_etsrec_tlv() argument
1077 etsrec = &dcbcfg->etsrec; in i40e_add_ieee_etsrec_tlv()
1125 struct i40e_dcbx_config *dcbcfg) in i40e_add_ieee_pfc_tlv() argument
1145 if (dcbcfg->pfc.willing) in i40e_add_ieee_pfc_tlv()
1148 if (dcbcfg->pfc.mbc) in i40e_add_ieee_pfc_tlv()
1151 buf[0] |= dcbcfg->pfc.pfccap & 0xF; in i40e_add_ieee_pfc_tlv()
1152 buf[1] = dcbcfg->pfc.pfcenable; in i40e_add_ieee_pfc_tlv()
1163 struct i40e_dcbx_config *dcbcfg) in i40e_add_ieee_app_pri_tlv() argument
1171 if (dcbcfg->numapps == 0) in i40e_add_ieee_app_pri_tlv()
1187 while (i < dcbcfg->numapps) { in i40e_add_ieee_app_pri_tlv()
1188 priority = dcbcfg->app[i].priority & 0x7; in i40e_add_ieee_app_pri_tlv()
1189 selector = dcbcfg->app[i].selector & 0x7; in i40e_add_ieee_app_pri_tlv()
1191 buf[offset + 1] = (dcbcfg->app[i].protocolid >> 0x8) & 0xFF; in i40e_add_ieee_app_pri_tlv()
1192 buf[offset + 2] = dcbcfg->app[i].protocolid & 0xFF; in i40e_add_ieee_app_pri_tlv()
1214 struct i40e_dcbx_config *dcbcfg, in i40e_add_dcb_tlv() argument
1219 i40e_add_ieee_ets_tlv(tlv, dcbcfg); in i40e_add_dcb_tlv()
1222 i40e_add_ieee_etsrec_tlv(tlv, dcbcfg); in i40e_add_dcb_tlv()
1225 i40e_add_ieee_pfc_tlv(tlv, dcbcfg); in i40e_add_dcb_tlv()
1228 i40e_add_ieee_app_pri_tlv(tlv, dcbcfg); in i40e_add_dcb_tlv()
1243 struct i40e_dcbx_config *dcbcfg; in i40e_set_dcb_config() local
1250 dcbcfg = &hw->local_dcbx_config; in i40e_set_dcb_config()
1257 if (dcbcfg->app_mode == I40E_DCBX_APPS_NON_WILLING) { in i40e_set_dcb_config()
1262 i40e_dcb_config_to_lldp(lldpmib, &miblen, dcbcfg); in i40e_set_dcb_config()
1278 struct i40e_dcbx_config *dcbcfg) in i40e_dcb_config_to_lldp() argument
1286 i40e_add_dcb_tlv(tlv, dcbcfg, tlvid++); in i40e_dcb_config_to_lldp()