linux/drivers/net/ethernet/intel/fm10k
Alexander Duyck 7461fd913a fm10k: Add support for debugfs
This patch adds limited debugfs support for the driver.  Most of the
functionality needed for dumping registers is already provided via ethtool.
The only thing we saw that we really neeed was the ability to dump the
descriptor rings so as such this patch will add a fm10k directory containing a
listing of directories each one with a unique PCI Bus, Device, and Function
number.  Each of those BDF directories will have a list of q_vectors, and
the q_vectors will contain a file for each of the Rx/Tx rings that are a part
of the vector.  For example:

# ls -RD /sys/kernel/debug/fm10k/
/sys/kernel/debug/fm10k/:
0000:01:00.0

/sys/kernel/debug/fm10k/0000:01:00.0:
q_vector.000  q_vector.001  q_vector.002  q_vector.003

/sys/kernel/debug/fm10k/0000:01:00.0/q_vector.000:
rx_ring.000  tx_ring.000

/sys/kernel/debug/fm10k/0000:01:00.0/q_vector.001:
rx_ring.001  tx_ring.001

/sys/kernel/debug/fm10k/0000:01:00.0/q_vector.002:
rx_ring.002  tx_ring.002

/sys/kernel/debug/fm10k/0000:01:00.0/q_vector.003:
rx_ring.003  tx_ring.003

# cat /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.000/rx_ring.000
DES DATA       RSS        STATERR    LENGTH VLAN   DGLORT SGLORT TIMESTAMP
---------------------------------------------------------------------------
000 0x00000000 0x00000000 0x00000003 0x002a 0x0000 0x0000 0x0000 0x13951807dc4fedf0
001 0x00000000 0x00000000 0x00000003 0x002a 0x0000 0x0000 0x0000 0x1395180906c9f2c8
002 0x3731c000 0x00000000 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000000000000000
003 0x3731d000 0x00000000 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000000000000000
004 0xaab3a000 0x00000000 0x00000000 0x0000 0x0000 0x0000 0x0000 0x0000000000000000
...

# cat /sys/kernel/debug/fm10k/0000:01:00.0/q_vector.000/tx_ring.000
DES BUFFER_ADDRESS     LENGTH VLAN   MSS    HDRLEN FLAGS
---------------------------------------------------------
000 0x00000000aa8a1002 0x005a 0x0000 0x0000 0x0000 0xc0
001 0x00000000aa8a2002 0x005a 0x0000 0x0000 0x0000 0xc0
002 0x000000006bc13202 0x004e 0x0000 0x0000 0x0000 0xc0
003 0x000000006bc13c02 0x002a 0x0000 0x0000 0x0000 0xe1
004 0x000000006bc13602 0x0062 0x0000 0x0000 0x0000 0xc0

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-09-23 03:59:22 -07:00
..
fm10k_common.c fm10k: Add support for PF 2014-09-23 03:59:15 -07:00
fm10k_common.h fm10k: Add support for PF 2014-09-23 03:59:15 -07:00
fm10k_dcbnl.c fm10k: Add support for IEEE DCBx 2014-09-23 03:59:21 -07:00
fm10k_debugfs.c fm10k: Add support for debugfs 2014-09-23 03:59:22 -07:00
fm10k_ethtool.c fm10k: Add support for VF 2014-09-23 03:59:20 -07:00
fm10k_iov.c fm10k: Add support for SR-IOV to driver 2014-09-23 03:59:21 -07:00
fm10k_main.c fm10k: Add support for debugfs 2014-09-23 03:59:22 -07:00
fm10k_mbx.c fm10k: Add support for VF 2014-09-23 03:59:20 -07:00
fm10k_mbx.h fm10k: Add support for PF <-> VF mailbox 2014-09-23 03:59:20 -07:00
fm10k_netdev.c fm10k: Add support for SR-IOV to driver 2014-09-23 03:59:21 -07:00
fm10k_pci.c fm10k: Add support for debugfs 2014-09-23 03:59:22 -07:00
fm10k_pf.c fm10k: Add support for SR-IOV to PF core files 2014-09-23 03:59:21 -07:00
fm10k_pf.h fm10k: Add support for SR-IOV to PF core files 2014-09-23 03:59:21 -07:00
fm10k_tlv.c fm10k: Add support for mailbox 2014-09-23 03:59:14 -07:00
fm10k_tlv.h fm10k: Add support for mailbox 2014-09-23 03:59:14 -07:00
fm10k_type.h fm10k: Add support for SR-IOV to PF core files 2014-09-23 03:59:21 -07:00
fm10k_vf.c fm10k: Add support for VF 2014-09-23 03:59:20 -07:00
fm10k_vf.h fm10k: Add support for VF 2014-09-23 03:59:20 -07:00
fm10k.h fm10k: Add support for debugfs 2014-09-23 03:59:22 -07:00
Makefile fm10k: Add support for debugfs 2014-09-23 03:59:22 -07:00