]> www.infradead.org Git - users/dwmw2/linux.git/commit
eth: fbnic: support listing tcam content via debugfs
authorAlexander Duyck <alexanderduyck@meta.com>
Thu, 6 Feb 2025 23:53:34 +0000 (15:53 -0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 10 Feb 2025 16:26:51 +0000 (08:26 -0800)
commit5797d3c62db81fd03ba7aeb36a83b44fb0ac2ecc
tree20c4253da7d6fb739bcdc8af624538c218293ce5
parentd2348b4bf748543172079eacb4dc0d40100fb443
eth: fbnic: support listing tcam content via debugfs

The device has a handful of relatively small TCAM tables,
support dumping the driver state via debugfs.

  # ethtool -N eth0 flow-type tcp6 \
      dst-ip 1111::2222 dst-port $((0x1122)) \
      src-ip 3333::4444 src-port $((0x3344)) \
      action 2
  Added rule with ID 47

  # cd $dbgfs
  # cat ip_src
  Idx S TCAM Bitmap       V Addr/Mask
  ------------------------------------
  00  1 00020000,00000000 6 33330000000000000000000000004444
                            00000000000000000000000000000000
  ...
  # cat ip_dst
  Idx S TCAM Bitmap       V Addr/Mask
  ------------------------------------
  00  1 00020000,00000000 6 11110000000000000000000000002222
                            00000000000000000000000000000000
  ...

  # cat act_tcam
  Idx S Value/Mask                                              RSS  Dest
  ------------------------------------------------------------------------
  ...
  49  1 0000 0000 0000 0000 0000 0000 1122 3344 0000 9c00 0088  000f 00000212
        ffff ffff ffff ffff ffff ffff 0000 0000 ffff 23ff ff00
  ...

The ipo_* tables are for outer IP addresses.
The tce_* table is for directing/stealing traffic to NC-SI.

Signed-off-by: Alexander Duyck <alexanderduyck@meta.com>
Link: https://patch.msgid.link/20250206235334.1425329-8-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/meta/fbnic/fbnic_debugfs.c