octeontx2-af: Debugfs support for DMAC filters
Add debugfs support to display CGX/RPM DMAC filter
table associated with pf.
cat /sys/kernel/debug/octeontx2/cgx/cgx0/lmac0/mac_filter
PCI dev RVUPF BROADCAST MULTICAST FILTER-MODE
0002:02:00.0 PF2 ACCEPT ACCEPT UNICAST
DMAC-INDEX ADDRESS
0 00:0f:b7:06:17:06
1 1a:1b:1c:1d:1e:01
2 1a:1b:1c:1d:1e:02
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
6f14078e3e
commit
dbc52debf9
@@ -266,6 +266,34 @@ int cgx_lmac_addr_set(u8 cgx_id, u8 lmac_id, u8 *mac_addr)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u64 cgx_read_dmac_ctrl(void *cgxd, int lmac_id)
|
||||
{
|
||||
struct mac_ops *mac_ops;
|
||||
struct cgx *cgx = cgxd;
|
||||
|
||||
if (!cgxd || !is_lmac_valid(cgxd, lmac_id))
|
||||
return 0;
|
||||
|
||||
cgx = cgxd;
|
||||
/* Get mac_ops to know csr offset */
|
||||
mac_ops = cgx->mac_ops;
|
||||
|
||||
return cgx_read(cgxd, lmac_id, CGXX_CMRX_RX_DMAC_CTL0);
|
||||
}
|
||||
|
||||
u64 cgx_read_dmac_entry(void *cgxd, int index)
|
||||
{
|
||||
struct mac_ops *mac_ops;
|
||||
struct cgx *cgx;
|
||||
|
||||
if (!cgxd)
|
||||
return 0;
|
||||
|
||||
cgx = cgxd;
|
||||
mac_ops = cgx->mac_ops;
|
||||
return cgx_read(cgx, 0, (CGXX_CMRX_RX_DMAC_CAM0 + (index * 8)));
|
||||
}
|
||||
|
||||
int cgx_lmac_addr_add(u8 cgx_id, u8 lmac_id, u8 *mac_addr)
|
||||
{
|
||||
struct cgx *cgx_dev = cgx_get_pdata(cgx_id);
|
||||
|
||||
Reference in New Issue
Block a user