Skip to content

Commit beb2baa

Browse files
Linu Cheriankuba-moo
authored andcommitted
octeontx2-af: debugfs: Add Channel info to RPM map
Display channel info in the RPM map debugfs output. With this, cat /sys/kernel/debug/cn10k/rvu_pf_rpm_map would display channel number for each device in addition to the existing data. Sample output: PCI dev RVU PF Func NIX block rpm LMAC CHAN 0002:02:00.0 0x400 NIX0 rpm0 LMAC0 256 Signed-off-by: Linu Cherian <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 1ad84a1 commit beb2baa

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

drivers/net/ethernet/marvell/octeontx2/af/rvu_debugfs.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -838,10 +838,10 @@ RVU_DEBUG_FOPS(rsrc_status, rsrc_attach_status, NULL);
838838

839839
static int rvu_dbg_rvu_pf_cgx_map_display(struct seq_file *filp, void *unused)
840840
{
841+
char cgx[10], lmac[10], chan[10];
841842
struct rvu *rvu = filp->private;
842843
struct pci_dev *pdev = NULL;
843844
struct mac_ops *mac_ops;
844-
char cgx[10], lmac[10];
845845
struct rvu_pfvf *pfvf;
846846
int pf, domain, blkid;
847847
u8 cgx_id, lmac_id;
@@ -852,7 +852,7 @@ static int rvu_dbg_rvu_pf_cgx_map_display(struct seq_file *filp, void *unused)
852852
/* There can be no CGX devices at all */
853853
if (!mac_ops)
854854
return 0;
855-
seq_printf(filp, "PCI dev\t\tRVU PF Func\tNIX block\t%s\tLMAC\n",
855+
seq_printf(filp, "PCI dev\t\tRVU PF Func\tNIX block\t%s\tLMAC\tCHAN\n",
856856
mac_ops->name);
857857
for (pf = 0; pf < rvu->hw->total_pfs; pf++) {
858858
if (!is_pf_cgxmapped(rvu, pf))
@@ -876,8 +876,11 @@ static int rvu_dbg_rvu_pf_cgx_map_display(struct seq_file *filp, void *unused)
876876
&lmac_id);
877877
sprintf(cgx, "%s%d", mac_ops->name, cgx_id);
878878
sprintf(lmac, "LMAC%d", lmac_id);
879-
seq_printf(filp, "%s\t0x%x\t\tNIX%d\t\t%s\t%s\n",
880-
dev_name(&pdev->dev), pcifunc, blkid, cgx, lmac);
879+
sprintf(chan, "%d",
880+
rvu_nix_chan_cgx(rvu, cgx_id, lmac_id, 0));
881+
seq_printf(filp, "%s\t0x%x\t\tNIX%d\t\t%s\t%s\t%s\n",
882+
dev_name(&pdev->dev), pcifunc, blkid, cgx, lmac,
883+
chan);
881884

882885
pci_dev_put(pdev);
883886
}

0 commit comments

Comments
 (0)