Lines Matching full:pf

22  * @pf: the PF structure to search for the vsi
25 static struct i40e_vsi *i40e_dbg_find_vsi(struct i40e_pf *pf, int seid) in i40e_dbg_find_vsi() argument
30 dev_info(&pf->pdev->dev, "%d: bad seid\n", seid); in i40e_dbg_find_vsi()
32 for (i = 0; i < pf->num_alloc_vsi; i++) in i40e_dbg_find_vsi()
33 if (pf->vsi[i] && (pf->vsi[i]->seid == seid)) in i40e_dbg_find_vsi()
34 return pf->vsi[i]; in i40e_dbg_find_vsi()
41 * @pf: the PF structure to search for the veb
44 static struct i40e_veb *i40e_dbg_find_veb(struct i40e_pf *pf, int seid) in i40e_dbg_find_veb() argument
49 if (pf->veb[i] && pf->veb[i]->seid == seid) in i40e_dbg_find_veb()
50 return pf->veb[i]; in i40e_dbg_find_veb()
73 struct i40e_pf *pf = filp->private_data; in i40e_dbg_command_read() local
90 pf->vsi[pf->lan_vsi]->netdev->name, in i40e_dbg_command_read()
114 * @pf: the i40e_pf created in command write
117 static void i40e_dbg_dump_vsi_seid(struct i40e_pf *pf, int seid) in i40e_dbg_dump_vsi_seid() argument
124 vsi = i40e_dbg_find_vsi(pf, seid); in i40e_dbg_dump_vsi_seid()
126 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
130 dev_info(&pf->pdev->dev, "vsi seid %d\n", seid); in i40e_dbg_dump_vsi_seid()
134 dev_info(&pf->pdev->dev, " netdev: name = %s, state = %lu, flags = 0x%08x\n", in i40e_dbg_dump_vsi_seid()
136 dev_info(&pf->pdev->dev, " features = 0x%08lx\n", in i40e_dbg_dump_vsi_seid()
138 dev_info(&pf->pdev->dev, " hw_features = 0x%08lx\n", in i40e_dbg_dump_vsi_seid()
140 dev_info(&pf->pdev->dev, " vlan_features = 0x%08lx\n", in i40e_dbg_dump_vsi_seid()
143 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
147 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
150 if (vsi == pf->vsi[pf->lan_vsi]) in i40e_dbg_dump_vsi_seid()
151 dev_info(&pf->pdev->dev, " MAC address: %pM SAN MAC: %pM Port MAC: %pM\n", in i40e_dbg_dump_vsi_seid()
152 pf->hw.mac.addr, in i40e_dbg_dump_vsi_seid()
153 pf->hw.mac.san_addr, in i40e_dbg_dump_vsi_seid()
154 pf->hw.mac.port_addr); in i40e_dbg_dump_vsi_seid()
156 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
161 dev_info(&pf->pdev->dev, " active_filters %u, promisc_threshold %u, overflow promisc %s\n", in i40e_dbg_dump_vsi_seid()
166 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
172 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
178 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
182 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
187 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
192 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
197 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
201 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
205 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
211 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
217 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
221 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
226 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
231 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
236 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
240 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
244 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
255 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
260 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
263 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
269 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
274 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
279 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
283 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
286 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
297 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
302 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
308 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
313 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
319 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
322 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
325 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
337 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
342 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
348 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
353 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
358 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
361 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
364 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
372 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
375 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
378 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
381 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
384 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
388 dev_info(&pf->pdev->dev, " type = %i\n", vsi->type); in i40e_dbg_dump_vsi_seid()
390 dev_info(&pf->pdev->dev, " VF ID = %i\n", vsi->vf_id); in i40e_dbg_dump_vsi_seid()
391 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
394 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
397 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
400 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
404 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
408 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
411 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
415 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
421 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
427 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
433 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
439 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
442 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
445 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
451 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
457 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
460 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
468 dev_info(&pf->pdev->dev, " idx = %d\n", vsi->idx); in i40e_dbg_dump_vsi_seid()
469 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
473 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
479 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
483 dev_info(&pf->pdev->dev, in i40e_dbg_dump_vsi_seid()
493 * @pf: the i40e_pf created in command write
495 static void i40e_dbg_dump_aq_desc(struct i40e_pf *pf) in i40e_dbg_dump_aq_desc() argument
498 struct i40e_hw *hw = &pf->hw; in i40e_dbg_dump_aq_desc()
503 dev_driver_string(&pf->pdev->dev), in i40e_dbg_dump_aq_desc()
504 dev_name(&pf->pdev->dev)); in i40e_dbg_dump_aq_desc()
507 dev_info(&pf->pdev->dev, "AdminQ Tx Ring\n"); in i40e_dbg_dump_aq_desc()
512 dev_info(&pf->pdev->dev, in i40e_dbg_dump_aq_desc()
520 dev_info(&pf->pdev->dev, "AdminQ Rx Ring\n"); in i40e_dbg_dump_aq_desc()
525 dev_info(&pf->pdev->dev, in i40e_dbg_dump_aq_desc()
540 * @pf: the i40e_pf created in command write
544 struct i40e_pf *pf, enum ring_type type) in i40e_dbg_dump_desc() argument
553 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_dump_desc()
555 dev_info(&pf->pdev->dev, "vsi %d not found\n", vsi_seid); in i40e_dbg_dump_desc()
561 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
567 dev_info(&pf->pdev->dev, "XDP not enabled on VSI %d\n", vsi_seid); in i40e_dbg_dump_desc()
571 dev_info(&pf->pdev->dev, "ring %d not found\n", ring_id); in i40e_dbg_dump_desc()
575 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
601 dev_info(&pf->pdev->dev, "VSI = %02i Rx ring = %02i\n", vsi_seid, ring_id); in i40e_dbg_dump_desc()
604 dev_info(&pf->pdev->dev, "VSI = %02i Tx ring = %02i\n", vsi_seid, ring_id); in i40e_dbg_dump_desc()
607 dev_info(&pf->pdev->dev, "VSI = %02i XDP ring = %02i\n", vsi_seid, ring_id); in i40e_dbg_dump_desc()
613 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
619 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
627 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
633 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
639 dev_info(&pf->pdev->dev, in i40e_dbg_dump_desc()
645 dev_info(&pf->pdev->dev, "dump desc rx/tx/xdp <vsi_seid> <ring_id> [<desc_n>]\n"); in i40e_dbg_dump_desc()
654 * @pf: the i40e_pf created in command write
656 static void i40e_dbg_dump_vsi_no_seid(struct i40e_pf *pf) in i40e_dbg_dump_vsi_no_seid() argument
660 for (i = 0; i < pf->num_alloc_vsi; i++) in i40e_dbg_dump_vsi_no_seid()
661 if (pf->vsi[i]) in i40e_dbg_dump_vsi_no_seid()
662 dev_info(&pf->pdev->dev, "dump vsi[%d]: %d\n", in i40e_dbg_dump_vsi_no_seid()
663 i, pf->vsi[i]->seid); in i40e_dbg_dump_vsi_no_seid()
668 * @pf: the i40e_pf created in command write
671 static void i40e_dbg_dump_eth_stats(struct i40e_pf *pf, in i40e_dbg_dump_eth_stats() argument
674 dev_info(&pf->pdev->dev, " ethstats:\n"); in i40e_dbg_dump_eth_stats()
675 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
678 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
681 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
684 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
687 dev_info(&pf->pdev->dev, in i40e_dbg_dump_eth_stats()
694 * @pf: the i40e_pf created in command write
697 static void i40e_dbg_dump_veb_seid(struct i40e_pf *pf, int seid) in i40e_dbg_dump_veb_seid() argument
701 veb = i40e_dbg_find_veb(pf, seid); in i40e_dbg_dump_veb_seid()
703 dev_info(&pf->pdev->dev, "can't find veb %d\n", seid); in i40e_dbg_dump_veb_seid()
706 dev_info(&pf->pdev->dev, in i40e_dbg_dump_veb_seid()
711 i40e_dbg_dump_eth_stats(pf, &veb->stats); in i40e_dbg_dump_veb_seid()
716 * @pf: the i40e_pf created in command write
718 static void i40e_dbg_dump_veb_all(struct i40e_pf *pf) in i40e_dbg_dump_veb_all() argument
724 veb = pf->veb[i]; in i40e_dbg_dump_veb_all()
726 i40e_dbg_dump_veb_seid(pf, veb->seid); in i40e_dbg_dump_veb_all()
732 * @pf: the i40e_pf created in command write
735 static void i40e_dbg_dump_vf(struct i40e_pf *pf, int vf_id) in i40e_dbg_dump_vf() argument
740 if (!pf->num_alloc_vfs) { in i40e_dbg_dump_vf()
741 dev_info(&pf->pdev->dev, "no VFs allocated\n"); in i40e_dbg_dump_vf()
742 } else if ((vf_id >= 0) && (vf_id < pf->num_alloc_vfs)) { in i40e_dbg_dump_vf()
743 vf = &pf->vf[vf_id]; in i40e_dbg_dump_vf()
744 vsi = pf->vsi[vf->lan_vsi_idx]; in i40e_dbg_dump_vf()
745 dev_info(&pf->pdev->dev, "vf %2d: VSI id=%d, seid=%d, qps=%d\n", in i40e_dbg_dump_vf()
747 dev_info(&pf->pdev->dev, " num MDD=%lld\n", in i40e_dbg_dump_vf()
750 dev_info(&pf->pdev->dev, "invalid VF id %d\n", vf_id); in i40e_dbg_dump_vf()
756 * @pf: the i40e_pf created in command write
758 static void i40e_dbg_dump_vf_all(struct i40e_pf *pf) in i40e_dbg_dump_vf_all() argument
762 if (!pf->num_alloc_vfs) in i40e_dbg_dump_vf_all()
763 dev_info(&pf->pdev->dev, "no VFs enabled!\n"); in i40e_dbg_dump_vf_all()
765 for (i = 0; i < pf->num_alloc_vfs; i++) in i40e_dbg_dump_vf_all()
766 i40e_dbg_dump_vf(pf, i); in i40e_dbg_dump_vf_all()
780 struct i40e_pf *pf = filp->private_data; in i40e_dbg_command_write() local
813 /* default to PF VSI */ in i40e_dbg_command_write()
814 vsi_seid = pf->vsi[pf->lan_vsi]->seid; in i40e_dbg_command_write()
816 dev_info(&pf->pdev->dev, "add VSI %d: bad vsi seid\n", in i40e_dbg_command_write()
824 if (!(pf->flags & I40E_FLAG_VEB_MODE_ENABLED)) { in i40e_dbg_command_write()
825 pf->flags |= I40E_FLAG_VEB_MODE_ENABLED; in i40e_dbg_command_write()
826 i40e_do_reset_safe(pf, I40E_PF_RESET_FLAG); in i40e_dbg_command_write()
829 vsi = i40e_vsi_setup(pf, I40E_VSI_VMDQ2, vsi_seid, 0); in i40e_dbg_command_write()
831 dev_info(&pf->pdev->dev, "added VSI %d to relay %d\n", in i40e_dbg_command_write()
834 dev_info(&pf->pdev->dev, "'%s' failed\n", cmd_buf); in i40e_dbg_command_write()
839 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
844 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
846 dev_info(&pf->pdev->dev, "del VSI %d: seid not found\n", in i40e_dbg_command_write()
851 dev_info(&pf->pdev->dev, "deleting VSI %d\n", vsi_seid); in i40e_dbg_command_write()
860 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
865 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
871 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
873 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
879 if (pf->veb[i] && pf->veb[i]->seid == uplink_seid) in i40e_dbg_command_write()
882 uplink_seid != pf->mac_seid) { in i40e_dbg_command_write()
883 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
889 veb = i40e_veb_setup(pf, 0, uplink_seid, vsi_seid, in i40e_dbg_command_write()
892 dev_info(&pf->pdev->dev, "added relay %d\n", veb->seid); in i40e_dbg_command_write()
894 dev_info(&pf->pdev->dev, "add relay failed\n"); in i40e_dbg_command_write()
900 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
905 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
912 if (pf->veb[i] && pf->veb[i]->seid == veb_seid) in i40e_dbg_command_write()
915 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
920 dev_info(&pf->pdev->dev, "deleting relay %d\n", veb_seid); in i40e_dbg_command_write()
921 i40e_veb_release(pf->veb[i]); in i40e_dbg_command_write()
929 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
934 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
936 dev_info(&pf->pdev->dev, "add pvid: VSI %d not found\n", in i40e_dbg_command_write()
944 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
948 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
956 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
962 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
964 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
970 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
975 i40e_fetch_switch_configuration(pf, true); in i40e_dbg_command_write()
979 i40e_dbg_dump_vsi_seid(pf, vsi_seid); in i40e_dbg_command_write()
981 i40e_dbg_dump_vsi_no_seid(pf); in i40e_dbg_command_write()
985 i40e_dbg_dump_veb_seid(pf, vsi_seid); in i40e_dbg_command_write()
987 i40e_dbg_dump_veb_all(pf); in i40e_dbg_command_write()
991 i40e_dbg_dump_vf(pf, vf_id); in i40e_dbg_command_write()
993 i40e_dbg_dump_vf_all(pf); in i40e_dbg_command_write()
1000 desc_n, pf, RING_TYPE_RX); in i40e_dbg_command_write()
1006 desc_n, pf, RING_TYPE_TX); in i40e_dbg_command_write()
1012 desc_n, pf, RING_TYPE_XDP); in i40e_dbg_command_write()
1014 i40e_dbg_dump_aq_desc(pf); in i40e_dbg_command_write()
1016 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1018 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1020 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1022 dev_info(&pf->pdev->dev, "dump desc aq\n"); in i40e_dbg_command_write()
1025 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1026 "core reset count: %d\n", pf->corer_count); in i40e_dbg_command_write()
1027 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1028 "global reset count: %d\n", pf->globr_count); in i40e_dbg_command_write()
1029 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1030 "emp reset count: %d\n", pf->empr_count); in i40e_dbg_command_write()
1031 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1032 "pf reset count: %d\n", pf->pfr_count); in i40e_dbg_command_write()
1033 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1034 "pf tx sluggish count: %d\n", in i40e_dbg_command_write()
1035 pf->tx_sluggish_count); in i40e_dbg_command_write()
1039 &pf->hw.local_dcbx_config; in i40e_dbg_command_write()
1041 &pf->hw.remote_dcbx_config; in i40e_dbg_command_write()
1053 vsi = pf->vsi[pf->lan_vsi]; in i40e_dbg_command_write()
1058 ret = i40e_aq_query_port_ets_config(&pf->hw, in i40e_dbg_command_write()
1062 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1064 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1069 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1076 dev_info(&pf->pdev->dev, "port bw: tc_bw_share=%d tc_bw_limit=%d\n", in i40e_dbg_command_write()
1084 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1086 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1091 dev_info(&pf->pdev->dev, "port ets_cfg: %d prio_tc=%d tcbw=%d tctsa=%d\n", in i40e_dbg_command_write()
1097 dev_info(&pf->pdev->dev, "port ets_rec: %d prio_tc=%d tcbw=%d tctsa=%d\n", in i40e_dbg_command_write()
1102 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1106 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1109 dev_info(&pf->pdev->dev, "port app_table: %d prio=%d selector=%d protocol=0x%x\n", in i40e_dbg_command_write()
1115 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1120 dev_info(&pf->pdev->dev, "remote port ets_cfg: %d prio_tc=%d tcbw=%d tctsa=%d\n", in i40e_dbg_command_write()
1126 dev_info(&pf->pdev->dev, "remote port ets_rec: %d prio_tc=%d tcbw=%d tctsa=%d\n", in i40e_dbg_command_write()
1131 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1137 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1141 dev_info(&pf->pdev->dev, "remote port app_table: %d prio=%d selector=%d protocol=0x%x\n", in i40e_dbg_command_write()
1158 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1163 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1170 ret = i40e_aq_debug_dump(&pf->hw, cluster_id, table_id, in i40e_dbg_command_write()
1175 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1177 ret, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1182 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1191 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1193 dev_info(&pf->pdev->dev, "dump switch\n"); in i40e_dbg_command_write()
1194 dev_info(&pf->pdev->dev, "dump vsi [seid]\n"); in i40e_dbg_command_write()
1195 dev_info(&pf->pdev->dev, "dump reset stats\n"); in i40e_dbg_command_write()
1196 dev_info(&pf->pdev->dev, "dump port\n"); in i40e_dbg_command_write()
1197 dev_info(&pf->pdev->dev, "dump vf [vf_id]\n"); in i40e_dbg_command_write()
1198 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1202 dev_info(&pf->pdev->dev, "debugfs: forcing PFR\n"); in i40e_dbg_command_write()
1203 i40e_do_reset_safe(pf, BIT(__I40E_PF_RESET_REQUESTED)); in i40e_dbg_command_write()
1206 dev_info(&pf->pdev->dev, "debugfs: forcing CoreR\n"); in i40e_dbg_command_write()
1207 i40e_do_reset_safe(pf, BIT(__I40E_CORE_RESET_REQUESTED)); in i40e_dbg_command_write()
1210 dev_info(&pf->pdev->dev, "debugfs: forcing GlobR\n"); in i40e_dbg_command_write()
1211 i40e_do_reset_safe(pf, BIT(__I40E_GLOBAL_RESET_REQUESTED)); in i40e_dbg_command_write()
1219 dev_info(&pf->pdev->dev, "read <reg>\n"); in i40e_dbg_command_write()
1224 if (address > (pf->ioremap_len - sizeof(u32))) { in i40e_dbg_command_write()
1225 dev_info(&pf->pdev->dev, "read reg address 0x%08x too large, max=0x%08lx\n", in i40e_dbg_command_write()
1226 address, (unsigned long int)(pf->ioremap_len - sizeof(u32))); in i40e_dbg_command_write()
1230 value = rd32(&pf->hw, address); in i40e_dbg_command_write()
1231 dev_info(&pf->pdev->dev, "read: 0x%08x = 0x%08x\n", in i40e_dbg_command_write()
1239 dev_info(&pf->pdev->dev, "write <reg> <value>\n"); in i40e_dbg_command_write()
1244 if (address > (pf->ioremap_len - sizeof(u32))) { in i40e_dbg_command_write()
1245 dev_info(&pf->pdev->dev, "write reg address 0x%08x too large, max=0x%08lx\n", in i40e_dbg_command_write()
1246 address, (unsigned long int)(pf->ioremap_len - sizeof(u32))); in i40e_dbg_command_write()
1249 wr32(&pf->hw, address, value); in i40e_dbg_command_write()
1250 value = rd32(&pf->hw, address); in i40e_dbg_command_write()
1251 dev_info(&pf->pdev->dev, "write: 0x%08x = 0x%08x\n", in i40e_dbg_command_write()
1259 for (i = 0; i < pf->num_alloc_vsi; i++) in i40e_dbg_command_write()
1260 i40e_vsi_reset_stats(pf->vsi[i]); in i40e_dbg_command_write()
1261 dev_info(&pf->pdev->dev, "vsi clear stats called for all vsi's\n"); in i40e_dbg_command_write()
1263 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_command_write()
1265 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1271 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1275 dev_info(&pf->pdev->dev, "clear_stats vsi [seid]\n"); in i40e_dbg_command_write()
1278 if (pf->hw.partition_id == 1) { in i40e_dbg_command_write()
1279 i40e_pf_reset_stats(pf); in i40e_dbg_command_write()
1280 dev_info(&pf->pdev->dev, "port stats cleared\n"); in i40e_dbg_command_write()
1282 dev_info(&pf->pdev->dev, "clear port stats not allowed on this port partition\n"); in i40e_dbg_command_write()
1285 dev_info(&pf->pdev->dev, "clear_stats vsi [seid] or clear_stats port\n"); in i40e_dbg_command_write()
1304 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1311 ret = i40e_asq_send_command(&pf->hw, desc, NULL, 0, NULL); in i40e_dbg_command_write()
1313 dev_info(&pf->pdev->dev, "AQ command sent Status : Success\n"); in i40e_dbg_command_write()
1315 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1317 desc->opcode, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1319 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1323 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1353 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1371 ret = i40e_asq_send_command(&pf->hw, desc, buff, in i40e_dbg_command_write()
1374 dev_info(&pf->pdev->dev, "AQ command sent Status : Success\n"); in i40e_dbg_command_write()
1376 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1378 desc->opcode, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1380 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1384 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1400 dev_info(&pf->pdev->dev, "FD current total filter count for this interface: %d\n", in i40e_dbg_command_write()
1401 i40e_get_current_fd_count(pf)); in i40e_dbg_command_write()
1406 ret = i40e_aq_stop_lldp(&pf->hw, false, false, NULL); in i40e_dbg_command_write()
1408 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1410 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1413 ret = i40e_aq_add_rem_control_packet_filter(&pf->hw, in i40e_dbg_command_write()
1414 pf->hw.mac.addr, in i40e_dbg_command_write()
1416 pf->vsi[pf->lan_vsi]->seid, in i40e_dbg_command_write()
1419 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1421 __func__, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1425 pf->dcbx_cap = DCB_CAP_DCBX_HOST | in i40e_dbg_command_write()
1431 ret = i40e_aq_add_rem_control_packet_filter(&pf->hw, in i40e_dbg_command_write()
1432 pf->hw.mac.addr, in i40e_dbg_command_write()
1434 pf->vsi[pf->lan_vsi]->seid, in i40e_dbg_command_write()
1437 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1439 __func__, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1443 ret = i40e_aq_start_lldp(&pf->hw, false, NULL); in i40e_dbg_command_write()
1445 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1447 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1451 pf->dcbx_cap = DCB_CAP_DCBX_LLD_MANAGED | in i40e_dbg_command_write()
1464 ret = i40e_aq_get_lldp_mib(&pf->hw, 0, in i40e_dbg_command_write()
1469 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1471 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1476 dev_info(&pf->pdev->dev, "LLDP MIB (local)\n"); in i40e_dbg_command_write()
1491 ret = i40e_aq_get_lldp_mib(&pf->hw, in i40e_dbg_command_write()
1497 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1499 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1504 dev_info(&pf->pdev->dev, "LLDP MIB (remote)\n"); in i40e_dbg_command_write()
1513 ret = i40e_aq_cfg_lldp_mib_change_event(&pf->hw, in i40e_dbg_command_write()
1516 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1518 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1524 ret = i40e_aq_cfg_lldp_mib_change_event(&pf->hw, in i40e_dbg_command_write()
1527 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1529 pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1552 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1568 ret = i40e_acquire_nvm(&pf->hw, I40E_RESOURCE_READ); in i40e_dbg_command_write()
1570 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1572 ret, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1577 ret = i40e_aq_read_nvm(&pf->hw, module, (2 * offset), in i40e_dbg_command_write()
1579 i40e_release_nvm(&pf->hw); in i40e_dbg_command_write()
1581 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1583 ret, pf->hw.aq.asq_last_status); in i40e_dbg_command_write()
1585 dev_info(&pf->pdev->dev, in i40e_dbg_command_write()
1596 dev_info(&pf->pdev->dev, "unknown command '%s'\n", cmd_buf); in i40e_dbg_command_write()
1597 dev_info(&pf->pdev->dev, "available commands\n"); in i40e_dbg_command_write()
1598 dev_info(&pf->pdev->dev, " add vsi [relay_seid]\n"); in i40e_dbg_command_write()
1599 dev_info(&pf->pdev->dev, " del vsi [vsi_seid]\n"); in i40e_dbg_command_write()
1600 dev_info(&pf->pdev->dev, " add relay <uplink_seid> <vsi_seid>\n"); in i40e_dbg_command_write()
1601 dev_info(&pf->pdev->dev, " del relay <relay_seid>\n"); in i40e_dbg_command_write()
1602 dev_info(&pf->pdev->dev, " add pvid <vsi_seid> <vid>\n"); in i40e_dbg_command_write()
1603 dev_info(&pf->pdev->dev, " del pvid <vsi_seid>\n"); in i40e_dbg_command_write()
1604 dev_info(&pf->pdev->dev, " dump switch\n"); in i40e_dbg_command_write()
1605 dev_info(&pf->pdev->dev, " dump vsi [seid]\n"); in i40e_dbg_command_write()
1606 dev_info(&pf->pdev->dev, " dump desc tx <vsi_seid> <ring_id> [<desc_n>]\n"); in i40e_dbg_command_write()
1607 dev_info(&pf->pdev->dev, " dump desc rx <vsi_seid> <ring_id> [<desc_n>]\n"); in i40e_dbg_command_write()
1608 dev_info(&pf->pdev->dev, " dump desc xdp <vsi_seid> <ring_id> [<desc_n>]\n"); in i40e_dbg_command_write()
1609 dev_info(&pf->pdev->dev, " dump desc aq\n"); in i40e_dbg_command_write()
1610 dev_info(&pf->pdev->dev, " dump reset stats\n"); in i40e_dbg_command_write()
1611 dev_info(&pf->pdev->dev, " dump debug fwdata <cluster_id> <table_id> <index>\n"); in i40e_dbg_command_write()
1612 dev_info(&pf->pdev->dev, " read <reg>\n"); in i40e_dbg_command_write()
1613 dev_info(&pf->pdev->dev, " write <reg> <value>\n"); in i40e_dbg_command_write()
1614 dev_info(&pf->pdev->dev, " clear_stats vsi [seid]\n"); in i40e_dbg_command_write()
1615 dev_info(&pf->pdev->dev, " clear_stats port\n"); in i40e_dbg_command_write()
1616 dev_info(&pf->pdev->dev, " pfr\n"); in i40e_dbg_command_write()
1617 dev_info(&pf->pdev->dev, " corer\n"); in i40e_dbg_command_write()
1618 dev_info(&pf->pdev->dev, " globr\n"); in i40e_dbg_command_write()
1619 …dev_info(&pf->pdev->dev, " send aq_cmd <flags> <opcode> <datalen> <retval> <cookie_h> <cookie_l> … in i40e_dbg_command_write()
1620 …dev_info(&pf->pdev->dev, " send indirect aq_cmd <flags> <opcode> <datalen> <retval> <cookie_h> <c… in i40e_dbg_command_write()
1621 dev_info(&pf->pdev->dev, " fd current cnt"); in i40e_dbg_command_write()
1622 dev_info(&pf->pdev->dev, " lldp start\n"); in i40e_dbg_command_write()
1623 dev_info(&pf->pdev->dev, " lldp stop\n"); in i40e_dbg_command_write()
1624 dev_info(&pf->pdev->dev, " lldp get local\n"); in i40e_dbg_command_write()
1625 dev_info(&pf->pdev->dev, " lldp get remote\n"); in i40e_dbg_command_write()
1626 dev_info(&pf->pdev->dev, " lldp event on\n"); in i40e_dbg_command_write()
1627 dev_info(&pf->pdev->dev, " lldp event off\n"); in i40e_dbg_command_write()
1628 dev_info(&pf->pdev->dev, " nvm read [module] [word_offset] [word_count]\n"); in i40e_dbg_command_write()
1661 struct i40e_pf *pf = filp->private_data; in i40e_dbg_netdev_ops_read() local
1678 pf->vsi[pf->lan_vsi]->netdev->name, in i40e_dbg_netdev_ops_read()
1702 struct i40e_pf *pf = filp->private_data; in i40e_dbg_netdev_ops_write() local
1734 dev_info(&pf->pdev->dev, "change_mtu <vsi_seid> <mtu>\n"); in i40e_dbg_netdev_ops_write()
1737 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_netdev_ops_write()
1739 dev_info(&pf->pdev->dev, in i40e_dbg_netdev_ops_write()
1742 dev_info(&pf->pdev->dev, "change_mtu: no netdev for VSI %d\n", in i40e_dbg_netdev_ops_write()
1748 dev_info(&pf->pdev->dev, "change_mtu called\n"); in i40e_dbg_netdev_ops_write()
1750 dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n"); in i40e_dbg_netdev_ops_write()
1756 dev_info(&pf->pdev->dev, "set_rx_mode <vsi_seid>\n"); in i40e_dbg_netdev_ops_write()
1759 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_netdev_ops_write()
1761 dev_info(&pf->pdev->dev, in i40e_dbg_netdev_ops_write()
1764 dev_info(&pf->pdev->dev, "set_rx_mode: no netdev for VSI %d\n", in i40e_dbg_netdev_ops_write()
1769 dev_info(&pf->pdev->dev, "set_rx_mode called\n"); in i40e_dbg_netdev_ops_write()
1771 dev_info(&pf->pdev->dev, "Could not acquire RTNL - please try again\n"); in i40e_dbg_netdev_ops_write()
1777 dev_info(&pf->pdev->dev, "napi <vsi_seid>\n"); in i40e_dbg_netdev_ops_write()
1780 vsi = i40e_dbg_find_vsi(pf, vsi_seid); in i40e_dbg_netdev_ops_write()
1782 dev_info(&pf->pdev->dev, "napi: VSI %d not found\n", in i40e_dbg_netdev_ops_write()
1785 dev_info(&pf->pdev->dev, "napi: no netdev for VSI %d\n", in i40e_dbg_netdev_ops_write()
1790 dev_info(&pf->pdev->dev, "napi called\n"); in i40e_dbg_netdev_ops_write()
1793 dev_info(&pf->pdev->dev, "unknown command '%s'\n", in i40e_dbg_netdev_ops_write()
1795 dev_info(&pf->pdev->dev, "available commands\n"); in i40e_dbg_netdev_ops_write()
1796 dev_info(&pf->pdev->dev, " change_mtu <vsi_seid> <mtu>\n"); in i40e_dbg_netdev_ops_write()
1797 dev_info(&pf->pdev->dev, " set_rx_mode <vsi_seid>\n"); in i40e_dbg_netdev_ops_write()
1798 dev_info(&pf->pdev->dev, " napi <vsi_seid>\n"); in i40e_dbg_netdev_ops_write()
1812 * i40e_dbg_pf_init - setup the debugfs directory for the PF
1813 * @pf: the PF that is starting up
1815 void i40e_dbg_pf_init(struct i40e_pf *pf) in i40e_dbg_pf_init() argument
1817 const char *name = pci_name(pf->pdev); in i40e_dbg_pf_init()
1819 pf->i40e_dbg_pf = debugfs_create_dir(name, i40e_dbg_root); in i40e_dbg_pf_init()
1821 debugfs_create_file("command", 0600, pf->i40e_dbg_pf, pf, in i40e_dbg_pf_init()
1824 debugfs_create_file("netdev_ops", 0600, pf->i40e_dbg_pf, pf, in i40e_dbg_pf_init()
1829 * i40e_dbg_pf_exit - clear out the PF's debugfs entries
1830 * @pf: the PF that is stopping
1832 void i40e_dbg_pf_exit(struct i40e_pf *pf) in i40e_dbg_pf_exit() argument
1834 debugfs_remove_recursive(pf->i40e_dbg_pf); in i40e_dbg_pf_exit()
1835 pf->i40e_dbg_pf = NULL; in i40e_dbg_pf_exit()