char name[ETH_GSTRING_LEN]; unsigned int index; }; #define NICVF_HW_STAT(stat) { \ .name = #stat, \ .index = offsetof(struct nicvf_hw_stats, stat) / sizeof(u64), \ } #define NICVF_DRV_STAT(stat) { \ .name = #stat, \ .index = offsetof(struct nicvf_drv_stats, stat) / sizeof(u64), \ } static const struct nicvf_stat nicvf_hw_stats[] = { NICVF_HW_STAT(rx_bytes_ok), NICVF_HW_STAT(rx_ucast_frames_ok), NICVF_HW_STAT(rx_bcast_frames_ok), NICVF_HW_STAT(rx_mcast_frames_ok), NICVF_HW_STAT(rx_fcs_errors), NICVF_HW_STAT(rx_l2_errors), NICVF_HW_STAT(rx_drop_red), NICVF_HW_STAT(rx_drop_red_bytes), NICVF_HW_STAT(rx_drop_overrun), NICVF_HW_STAT(rx_drop_overrun_bytes), NICVF_HW_STAT(rx_drop_bcast), NICVF_HW_STAT(rx_drop_mcast), NICVF_HW_STAT(rx_drop_l3_bcast), NICVF_HW_STAT(rx_drop_l3_mcast), NICVF_HW_STAT(tx_bytes_ok), NICVF_HW_STAT(tx_ucast_frames_ok),
char name[ETH_GSTRING_LEN]; unsigned int index; }; #define NICVF_HW_STAT(stat) { \ .name = #stat, \ .index = offsetof(struct nicvf_hw_stats, stat) / sizeof(u64), \ } #define NICVF_DRV_STAT(stat) { \ .name = #stat, \ .index = offsetof(struct nicvf_drv_stats, stat) / sizeof(u64), \ } static const struct nicvf_stat nicvf_hw_stats[] = { NICVF_HW_STAT(rx_bytes), NICVF_HW_STAT(rx_ucast_frames), NICVF_HW_STAT(rx_bcast_frames), NICVF_HW_STAT(rx_mcast_frames), NICVF_HW_STAT(rx_fcs_errors), NICVF_HW_STAT(rx_l2_errors), NICVF_HW_STAT(rx_drop_red), NICVF_HW_STAT(rx_drop_red_bytes), NICVF_HW_STAT(rx_drop_overrun), NICVF_HW_STAT(rx_drop_overrun_bytes), NICVF_HW_STAT(rx_drop_bcast), NICVF_HW_STAT(rx_drop_mcast), NICVF_HW_STAT(rx_drop_l3_bcast), NICVF_HW_STAT(rx_drop_l3_mcast), NICVF_HW_STAT(rx_bgx_truncated_pkts), NICVF_HW_STAT(rx_jabber_errs),