dpaa2-eth: add ethtool MAC counters
When a DPNI is connected to a MAC, export its associated counters. Ethtool related functions are added in dpaa2_mac for returning the number of counters, their strings and also their values. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
88c8562b16
commit
991df1fbb0
@@ -22,6 +22,8 @@
|
||||
#define DPMAC_CMDID_GET_ATTR DPMAC_CMD(0x004)
|
||||
#define DPMAC_CMDID_SET_LINK_STATE DPMAC_CMD_V2(0x0c3)
|
||||
|
||||
#define DPMAC_CMDID_GET_COUNTER DPMAC_CMD(0x0c4)
|
||||
|
||||
/* Macros for accessing command fields smaller than 1byte */
|
||||
#define DPMAC_MASK(field) \
|
||||
GENMASK(DPMAC_##field##_SHIFT + DPMAC_##field##_SIZE - 1, \
|
||||
@@ -59,4 +61,13 @@ struct dpmac_cmd_set_link_state {
|
||||
__le64 advertising;
|
||||
};
|
||||
|
||||
struct dpmac_cmd_get_counter {
|
||||
u8 id;
|
||||
};
|
||||
|
||||
struct dpmac_rsp_get_counter {
|
||||
u64 pad;
|
||||
u64 counter;
|
||||
};
|
||||
|
||||
#endif /* _FSL_DPMAC_CMD_H */
|
||||
|
Reference in New Issue
Block a user