[PATCH v8 14/15] net/zxdh: basic stats ops implementations
Stephen Hemminger
stephen at networkplumber.org
Tue Jan 21 01:21:11 CET 2025
On Mon, 20 Jan 2025 11:47:22 +0800
Junlong Wang <wang.junlong1 at zte.com.cn> wrote:
>
> +struct __rte_packed_begin zxdh_hw_mac_stats {
> + uint64_t rx_total;
> + uint64_t rx_pause;
> + uint64_t rx_unicast;
> + uint64_t rx_multicast;
> + uint64_t rx_broadcast;
> + uint64_t rx_vlan;
> + uint64_t rx_size_64;
> + uint64_t rx_size_65_127;
> + uint64_t rx_size_128_255;
> + uint64_t rx_size_256_511;
> + uint64_t rx_size_512_1023;
> + uint64_t rx_size_1024_1518;
> + uint64_t rx_size_1519_mru;
> + uint64_t rx_undersize;
> + uint64_t rx_oversize;
> + uint64_t rx_fragment;
> + uint64_t rx_jabber;
> + uint64_t rx_control;
> + uint64_t rx_eee;
> +
> + uint64_t tx_total;
> + uint64_t tx_pause;
> + uint64_t tx_unicast;
> + uint64_t tx_multicast;
> + uint64_t tx_broadcast;
> + uint64_t tx_vlan;
> + uint64_t tx_size_64;
> + uint64_t tx_size_65_127;
> + uint64_t tx_size_128_255;
> + uint64_t tx_size_256_511;
> + uint64_t tx_size_512_1023;
> + uint64_t tx_size_1024_1518;
> + uint64_t tx_size_1519_mtu;
> + uint64_t tx_undersize;
> + uint64_t tx_oversize;
> + uint64_t tx_fragment;
> + uint64_t tx_jabber;
> + uint64_t tx_control;
> + uint64_t tx_eee;
> +
> + uint64_t rx_error;
> + uint64_t rx_fcs_error;
> + uint64_t rx_drop;
> +
> + uint64_t tx_error;
> + uint64_t tx_fcs_error;
> + uint64_t tx_drop;
> +
> +} __rte_packed_end;
> +
> +struct __rte_packed_begin zxdh_hw_mac_bytes {
> + uint64_t rx_total_bytes;
> + uint64_t rx_good_bytes;
> + uint64_t tx_total_bytes;
> + uint64_t tx_good_bytes;
> +} __rte_packed_end;
> +
Why do you need to mark these structures as packed?
They contain only 64 bit counters, there is no packing needed.
More information about the dev
mailing list