1
0
Fork 0
alistair23-linux/drivers/net
Maxime Chevallier 21da57a231 net: mvpp2: add a debugfs interface for the Header Parser
Marvell PPv2 Packer Header Parser has a TCAM based filter, that is not
trivial to configure and debug. Being able to dump TCAM entries from
userspace can be really helpful to help development of new features
and debug existing ones.

This commit adds a basic debugfs interface for the PPv2 driver, focusing
on TCAM related features.

<mnt>/mvpp2/ --- f2000000.ethernet
              \- f4000000.ethernet --- parser --- 000 ...
                                    |          \- 001
                                    |          \- ...
                                    |          \- 255 --- ai
                                    |                  \- header_data
                                    |                  \- lookup_id
                                    |                  \- sram
                                    |                  \- valid
                                    \- eth1 ...
                                    \- eth2 --- mac_filter
                                             \- parser_entries
                                             \- vid_filter

There's one directory per PPv2 instance, named after pdev->name to make
sure names are uniques. In each of these directories, there's :

 - one directory per interface on the controller, each containing :

   - "mac_filter", which lists all filtered addresses for this port
     (based on TCAM, not on the kernel's uc / mc lists)

   - "parser_entries", which lists the indices of all valid TCAM
      entries that have this port in their port map

   - "vid_filter", which lists the vids allowed on this port, based on
     TCAM

 - one "parser" directory (the parser is common to all ports), containing :

   - one directory per TCAM entry (256 of them, from 0 to 255), each
     containing :

     - "ai" : Contains the 1 byte Additional Info field from TCAM, and

     - "header_data" : Contains the 8 bytes Header Data extracted from
       the packet

     - "lookup_id" : Contains the 4 bits LU_ID

     - "sram" : contains the raw SRAM data, which is the result of the TCAM
		lookup. This readonly at the moment.

     - "valid" : Indicates if the entry is valid of not.

All entries are read-only, and everything is output in hex form.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-07-16 00:10:00 -07:00
..
appletalk
arcnet
bonding net: allow ndo_select_queue to pass netdev 2018-07-09 13:41:34 -07:00
caif
can treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
dsa net: dsa: vsc73xx: Make some functions static 2018-07-05 19:29:29 +09:00
ethernet net: mvpp2: add a debugfs interface for the Header Parser 2018-07-16 00:10:00 -07:00
fddi net: fddi: fix a possible null-ptr-deref 2018-06-08 18:47:46 -04:00
fjes fjes: use currently unused variable my_epid and max_epid 2018-07-05 19:34:21 +09:00
hamradio net/hamradio/6pack: remove redundant variable channel 2018-07-05 19:34:45 +09:00
hippi treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
hyperv net: allow fallback function to pass netdev 2018-07-09 13:57:25 -07:00
ieee802154 net: ieee802154: mcr20a: do not leak resources on error path 2018-04-23 20:56:23 +02:00
ipvlan ipvlan: call dev_change_flags when ipvlan mode is reset 2018-07-02 20:38:09 +09:00
netdevsim netdevsim: add support for simultaneous driver and hw XDP 2018-07-13 20:26:35 +02:00
phy net: phy: vitesse: Add support for VSC73xx 2018-07-04 11:30:02 +09:00
plip
ppp Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL 2018-06-28 10:40:47 -07:00
slip treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
team team: Publish team_port_get_rcu() 2018-07-11 23:10:19 -07:00
usb net: usb: asix: allow optionally getting mac address from device tree 2018-07-04 22:09:23 +09:00
vmxnet3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-05-21 16:01:54 -04:00
wan drivers: net: lmc: remove redundant variable next_rx 2018-07-07 22:07:21 +09:00
wimax wimax/i2400m: remove redundant variables ack_status, bcf and protocol 2018-07-11 22:54:25 -07:00
wireless net: allow ndo_select_queue to pass netdev 2018-07-09 13:41:34 -07:00
xen-netback net: allow fallback function to pass netdev 2018-07-09 13:57:25 -07:00
Kconfig virtio_net: Extend virtio to use VF datapath when available 2018-05-28 22:59:54 -04:00
LICENSE.SRC
Makefile net: Introduce net_failover driver 2018-05-28 22:59:54 -04:00
Space.c
dummy.c net: Do not take net_rwsem in __rtnl_link_unregister() 2018-03-31 22:24:58 -04:00
eql.c
geneve.c Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-07-03 10:29:26 +09:00
gtp.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
ifb.c ifb: fix packets checksum 2018-05-28 23:02:22 -04:00
loopback.c
macsec.c Revert "macsec: missing dev_put() on error in macsec_newlink()" 2018-04-16 10:01:12 -04:00
macvlan.c macvlan: Change status when lower device goes down 2018-07-11 23:07:22 -07:00
macvtap.c
mdio.c
mii.c
net_failover.c net: allow fallback function to pass netdev 2018-07-09 13:57:25 -07:00
netconsole.c
nlmon.c
ntb_netdev.c net: drivers/net: Convert random_ether_addr to eth_random_addr 2018-06-23 10:49:14 +09:00
rionet.c
sb1000.c
sungem_phy.c
tap.c net: in virtio_net_hdr only add VLAN_HLEN to csum_start if payload holds vlan 2018-06-07 16:15:38 -04:00
thunderbolt.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next 2018-07-14 18:47:44 -07:00
veth.c
virtio_net.c xdp: don't make drivers report attachment mode 2018-07-13 20:26:35 +02:00
vrf.c vrf: add CRC32c offload to device features 2018-05-28 22:55:13 -04:00
vsockmon.c
vxlan.c vxlan: fix default fdb entry netlink notify ordering during netdev create 2018-07-07 20:20:46 +09:00
xen-netfront.c net: allow ndo_select_queue to pass netdev 2018-07-09 13:41:34 -07:00