]> www.infradead.org Git - users/willy/xarray.git/commit
eth: fbnic: Add support to write TCE TCAM entries
authorMohsin Bashir <mohsin.bashr@gmail.com>
Mon, 4 Nov 2024 03:13:00 +0000 (19:13 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 7 Nov 2024 10:28:20 +0000 (11:28 +0100)
commit90c940ff1f74685c338b34a968869b97cee1cec8
treede6606280b639d60ca9924ea52140a283df5b765
parent9907cda95fcbf44141b1292faab89cf8ec542f22
eth: fbnic: Add support to write TCE TCAM entries

Add support to redirect host-to-BMC traffic by writing MACDA entries
from the RPC (RX Parser and Classifier) to TCE-TCAM. The TCE TCAM is a
small L2 destination TCAM which is placed at the end of the TX path (TCE).

Unlike other NICs, where BMC diversion is typically handled by firmware,
for fbnic, firmware does not touch anything related to the host; hence,
the host uses TCE TCAM to divert BMC traffic.

Currently, we lack metadata to track where addresses have been written
in the TCAM, except for the last entry written. To address this issue,
we start at the opposite end of the table in each pass, so that adding
or deleting entries does not affect the availability of all entries,
assuming there is no significant reordering of entries.

Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
Link: https://patch.msgid.link/20241104031300.1330657-1-mohsin.bashr@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/meta/fbnic/fbnic.h
drivers/net/ethernet/meta/fbnic/fbnic_csr.h
drivers/net/ethernet/meta/fbnic/fbnic_netdev.c
drivers/net/ethernet/meta/fbnic/fbnic_rpc.c
drivers/net/ethernet/meta/fbnic/fbnic_rpc.h