From owner-svn-src-all@freebsd.org Wed May 8 10:59:18 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9E6415A66F6; Wed, 8 May 2019 10:59:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8C0D16C762; Wed, 8 May 2019 10:59:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 66AFB4DBA; Wed, 8 May 2019 10:59:17 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x48AxHIK057989; Wed, 8 May 2019 10:59:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x48AxHYV057987; Wed, 8 May 2019 10:59:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201905081059.x48AxHYV057987@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Wed, 8 May 2019 10:59:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347308 - head/sys/dev/mlx5/mlx5_en X-SVN-Group: head X-SVN-Commit-Author: hselasky X-SVN-Commit-Paths: head/sys/dev/mlx5/mlx5_en X-SVN-Commit-Revision: 347308 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 8C0D16C762 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.98 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 May 2019 10:59:18 -0000 Author: hselasky Date: Wed May 8 10:59:16 2019 New Revision: 347308 URL: https://svnweb.freebsd.org/changeset/base/347308 Log: Extend the counters framework in mlx5en(4). Allow more macro arguments and split the variable type and name into separate arguments. This allows simple and powerful copy and extraction of values from IFC based structures into SYSCTLs with the use of a single macro. MFC after: 3 days Sponsored by: Mellanox Technologies Modified: head/sys/dev/mlx5/mlx5_en/en.h head/sys/dev/mlx5/mlx5_en/en_rl.h Modified: head/sys/dev/mlx5/mlx5_en/en.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en.h Wed May 8 10:58:41 2019 (r347307) +++ head/sys/dev/mlx5/mlx5_en/en.h Wed May 8 10:59:16 2019 (r347308) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2015-2018 Mellanox Technologies. All rights reserved. + * Copyright (c) 2015-2019 Mellanox Technologies. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -147,48 +147,48 @@ struct mlx5e_cq; typedef void (mlx5e_cq_comp_t)(struct mlx5_core_cq *); -#define MLX5E_STATS_COUNT(a,b,c,d) a -#define MLX5E_STATS_VAR(a,b,c,d) b; -#define MLX5E_STATS_DESC(a,b,c,d) c, d, +#define MLX5E_STATS_COUNT(a, ...) a +#define MLX5E_STATS_VAR(a, b, c, ...) b c; +#define MLX5E_STATS_DESC(a, b, c, d, e, ...) d, e, #define MLX5E_VPORT_STATS(m) \ /* HW counters */ \ - m(+1, u64 rx_packets, "rx_packets", "Received packets") \ - m(+1, u64 rx_bytes, "rx_bytes", "Received bytes") \ - m(+1, u64 tx_packets, "tx_packets", "Transmitted packets") \ - m(+1, u64 tx_bytes, "tx_bytes", "Transmitted bytes") \ - m(+1, u64 rx_error_packets, "rx_error_packets", "Received error packets") \ - m(+1, u64 rx_error_bytes, "rx_error_bytes", "Received error bytes") \ - m(+1, u64 tx_error_packets, "tx_error_packets", "Transmitted error packets") \ - m(+1, u64 tx_error_bytes, "tx_error_bytes", "Transmitted error bytes") \ - m(+1, u64 rx_unicast_packets, "rx_unicast_packets", "Received unicast packets") \ - m(+1, u64 rx_unicast_bytes, "rx_unicast_bytes", "Received unicast bytes") \ - m(+1, u64 tx_unicast_packets, "tx_unicast_packets", "Transmitted unicast packets") \ - m(+1, u64 tx_unicast_bytes, "tx_unicast_bytes", "Transmitted unicast bytes") \ - m(+1, u64 rx_multicast_packets, "rx_multicast_packets", "Received multicast packets") \ - m(+1, u64 rx_multicast_bytes, "rx_multicast_bytes", "Received multicast bytes") \ - m(+1, u64 tx_multicast_packets, "tx_multicast_packets", "Transmitted multicast packets") \ - m(+1, u64 tx_multicast_bytes, "tx_multicast_bytes", "Transmitted multicast bytes") \ - m(+1, u64 rx_broadcast_packets, "rx_broadcast_packets", "Received broadcast packets") \ - m(+1, u64 rx_broadcast_bytes, "rx_broadcast_bytes", "Received broadcast bytes") \ - m(+1, u64 tx_broadcast_packets, "tx_broadcast_packets", "Transmitted broadcast packets") \ - m(+1, u64 tx_broadcast_bytes, "tx_broadcast_bytes", "Transmitted broadcast bytes") \ - m(+1, u64 rx_out_of_buffer, "rx_out_of_buffer", "Receive out of buffer, no recv wqes events") \ + m(+1, u64, rx_packets, "rx_packets", "Received packets") \ + m(+1, u64, rx_bytes, "rx_bytes", "Received bytes") \ + m(+1, u64, tx_packets, "tx_packets", "Transmitted packets") \ + m(+1, u64, tx_bytes, "tx_bytes", "Transmitted bytes") \ + m(+1, u64, rx_error_packets, "rx_error_packets", "Received error packets") \ + m(+1, u64, rx_error_bytes, "rx_error_bytes", "Received error bytes") \ + m(+1, u64, tx_error_packets, "tx_error_packets", "Transmitted error packets") \ + m(+1, u64, tx_error_bytes, "tx_error_bytes", "Transmitted error bytes") \ + m(+1, u64, rx_unicast_packets, "rx_unicast_packets", "Received unicast packets") \ + m(+1, u64, rx_unicast_bytes, "rx_unicast_bytes", "Received unicast bytes") \ + m(+1, u64, tx_unicast_packets, "tx_unicast_packets", "Transmitted unicast packets") \ + m(+1, u64, tx_unicast_bytes, "tx_unicast_bytes", "Transmitted unicast bytes") \ + m(+1, u64, rx_multicast_packets, "rx_multicast_packets", "Received multicast packets") \ + m(+1, u64, rx_multicast_bytes, "rx_multicast_bytes", "Received multicast bytes") \ + m(+1, u64, tx_multicast_packets, "tx_multicast_packets", "Transmitted multicast packets") \ + m(+1, u64, tx_multicast_bytes, "tx_multicast_bytes", "Transmitted multicast bytes") \ + m(+1, u64, rx_broadcast_packets, "rx_broadcast_packets", "Received broadcast packets") \ + m(+1, u64, rx_broadcast_bytes, "rx_broadcast_bytes", "Received broadcast bytes") \ + m(+1, u64, tx_broadcast_packets, "tx_broadcast_packets", "Transmitted broadcast packets") \ + m(+1, u64, tx_broadcast_bytes, "tx_broadcast_bytes", "Transmitted broadcast bytes") \ + m(+1, u64, rx_out_of_buffer, "rx_out_of_buffer", "Receive out of buffer, no recv wqes events") \ /* SW counters */ \ - m(+1, u64 tso_packets, "tso_packets", "Transmitted TSO packets") \ - m(+1, u64 tso_bytes, "tso_bytes", "Transmitted TSO bytes") \ - m(+1, u64 lro_packets, "lro_packets", "Received LRO packets") \ - m(+1, u64 lro_bytes, "lro_bytes", "Received LRO bytes") \ - m(+1, u64 sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO") \ - m(+1, u64 sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO") \ - m(+1, u64 rx_csum_good, "rx_csum_good", "Received checksum valid packets") \ - m(+1, u64 rx_csum_none, "rx_csum_none", "Received no checksum packets") \ - m(+1, u64 tx_csum_offload, "tx_csum_offload", "Transmit checksum offload packets") \ - m(+1, u64 tx_queue_dropped, "tx_queue_dropped", "Transmit queue dropped") \ - m(+1, u64 tx_defragged, "tx_defragged", "Transmit queue defragged") \ - m(+1, u64 rx_wqe_err, "rx_wqe_err", "Receive WQE errors") \ - m(+1, u64 tx_jumbo_packets, "tx_jumbo_packets", "TX packets greater than 1518 octets") \ - m(+1, u64 rx_steer_missed_packets, "rx_steer_missed_packets", "RX packets dropped by steering rule(s)") + m(+1, u64, tso_packets, "tso_packets", "Transmitted TSO packets") \ + m(+1, u64, tso_bytes, "tso_bytes", "Transmitted TSO bytes") \ + m(+1, u64, lro_packets, "lro_packets", "Received LRO packets") \ + m(+1, u64, lro_bytes, "lro_bytes", "Received LRO bytes") \ + m(+1, u64, sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO") \ + m(+1, u64, sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO") \ + m(+1, u64, rx_csum_good, "rx_csum_good", "Received checksum valid packets") \ + m(+1, u64, rx_csum_none, "rx_csum_none", "Received no checksum packets") \ + m(+1, u64, tx_csum_offload, "tx_csum_offload", "Transmit checksum offload packets") \ + m(+1, u64, tx_queue_dropped, "tx_queue_dropped", "Transmit queue dropped") \ + m(+1, u64, tx_defragged, "tx_defragged", "Transmit queue defragged") \ + m(+1, u64, rx_wqe_err, "rx_wqe_err", "Receive WQE errors") \ + m(+1, u64, tx_jumbo_packets, "tx_jumbo_packets", "TX packets greater than 1518 octets") \ + m(+1, u64, rx_steer_missed_packets, "rx_steer_missed_packets", "RX packets dropped by steering rule(s)") #define MLX5E_VPORT_STATS_NUM (0 MLX5E_VPORT_STATS(MLX5E_STATS_COUNT)) @@ -199,128 +199,129 @@ struct mlx5e_vport_stats { }; #define MLX5E_PPORT_IEEE802_3_STATS(m) \ - m(+1, u64 frames_tx, "frames_tx", "Frames transmitted") \ - m(+1, u64 frames_rx, "frames_rx", "Frames received") \ - m(+1, u64 check_seq_err, "check_seq_err", "Sequence errors") \ - m(+1, u64 alignment_err, "alignment_err", "Alignment errors") \ - m(+1, u64 octets_tx, "octets_tx", "Bytes transmitted") \ - m(+1, u64 octets_received, "octets_received", "Bytes received") \ - m(+1, u64 multicast_xmitted, "multicast_xmitted", "Multicast transmitted") \ - m(+1, u64 broadcast_xmitted, "broadcast_xmitted", "Broadcast transmitted") \ - m(+1, u64 multicast_rx, "multicast_rx", "Multicast received") \ - m(+1, u64 broadcast_rx, "broadcast_rx", "Broadcast received") \ - m(+1, u64 in_range_len_errors, "in_range_len_errors", "In range length errors") \ - m(+1, u64 out_of_range_len, "out_of_range_len", "Out of range length errors") \ - m(+1, u64 too_long_errors, "too_long_errors", "Too long errors") \ - m(+1, u64 symbol_err, "symbol_err", "Symbol errors") \ - m(+1, u64 mac_control_tx, "mac_control_tx", "MAC control transmitted") \ - m(+1, u64 mac_control_rx, "mac_control_rx", "MAC control received") \ - m(+1, u64 unsupported_op_rx, "unsupported_op_rx", "Unsupported operation received") \ - m(+1, u64 pause_ctrl_rx, "pause_ctrl_rx", "Pause control received") \ - m(+1, u64 pause_ctrl_tx, "pause_ctrl_tx", "Pause control transmitted") + m(+1, u64, frames_tx, "frames_tx", "Frames transmitted") \ + m(+1, u64, frames_rx, "frames_rx", "Frames received") \ + m(+1, u64, check_seq_err, "check_seq_err", "Sequence errors") \ + m(+1, u64, alignment_err, "alignment_err", "Alignment errors") \ + m(+1, u64, octets_tx, "octets_tx", "Bytes transmitted") \ + m(+1, u64, octets_received, "octets_received", "Bytes received") \ + m(+1, u64, multicast_xmitted, "multicast_xmitted", "Multicast transmitted") \ + m(+1, u64, broadcast_xmitted, "broadcast_xmitted", "Broadcast transmitted") \ + m(+1, u64, multicast_rx, "multicast_rx", "Multicast received") \ + m(+1, u64, broadcast_rx, "broadcast_rx", "Broadcast received") \ + m(+1, u64, in_range_len_errors, "in_range_len_errors", "In range length errors") \ + m(+1, u64, out_of_range_len, "out_of_range_len", "Out of range length errors") \ + m(+1, u64, too_long_errors, "too_long_errors", "Too long errors") \ + m(+1, u64, symbol_err, "symbol_err", "Symbol errors") \ + m(+1, u64, mac_control_tx, "mac_control_tx", "MAC control transmitted") \ + m(+1, u64, mac_control_rx, "mac_control_rx", "MAC control received") \ + m(+1, u64, unsupported_op_rx, "unsupported_op_rx", "Unsupported operation received") \ + m(+1, u64, pause_ctrl_rx, "pause_ctrl_rx", "Pause control received") \ + m(+1, u64, pause_ctrl_tx, "pause_ctrl_tx", "Pause control transmitted") #define MLX5E_PPORT_RFC2819_STATS(m) \ - m(+1, u64 drop_events, "drop_events", "Dropped events") \ - m(+1, u64 octets, "octets", "Octets") \ - m(+1, u64 pkts, "pkts", "Packets") \ - m(+1, u64 broadcast_pkts, "broadcast_pkts", "Broadcast packets") \ - m(+1, u64 multicast_pkts, "multicast_pkts", "Multicast packets") \ - m(+1, u64 crc_align_errors, "crc_align_errors", "CRC alignment errors") \ - m(+1, u64 undersize_pkts, "undersize_pkts", "Undersized packets") \ - m(+1, u64 oversize_pkts, "oversize_pkts", "Oversized packets") \ - m(+1, u64 fragments, "fragments", "Fragments") \ - m(+1, u64 jabbers, "jabbers", "Jabbers") \ - m(+1, u64 collisions, "collisions", "Collisions") + m(+1, u64, drop_events, "drop_events", "Dropped events") \ + m(+1, u64, octets, "octets", "Octets") \ + m(+1, u64, pkts, "pkts", "Packets") \ + m(+1, u64, broadcast_pkts, "broadcast_pkts", "Broadcast packets") \ + m(+1, u64, multicast_pkts, "multicast_pkts", "Multicast packets") \ + m(+1, u64, crc_align_errors, "crc_align_errors", "CRC alignment errors") \ + m(+1, u64, undersize_pkts, "undersize_pkts", "Undersized packets") \ + m(+1, u64, oversize_pkts, "oversize_pkts", "Oversized packets") \ + m(+1, u64, fragments, "fragments", "Fragments") \ + m(+1, u64, jabbers, "jabbers", "Jabbers") \ + m(+1, u64, collisions, "collisions", "Collisions") #define MLX5E_PPORT_RFC2819_STATS_DEBUG(m) \ - m(+1, u64 p64octets, "p64octets", "Bytes") \ - m(+1, u64 p65to127octets, "p65to127octets", "Bytes") \ - m(+1, u64 p128to255octets, "p128to255octets", "Bytes") \ - m(+1, u64 p256to511octets, "p256to511octets", "Bytes") \ - m(+1, u64 p512to1023octets, "p512to1023octets", "Bytes") \ - m(+1, u64 p1024to1518octets, "p1024to1518octets", "Bytes") \ - m(+1, u64 p1519to2047octets, "p1519to2047octets", "Bytes") \ - m(+1, u64 p2048to4095octets, "p2048to4095octets", "Bytes") \ - m(+1, u64 p4096to8191octets, "p4096to8191octets", "Bytes") \ - m(+1, u64 p8192to10239octets, "p8192to10239octets", "Bytes") + m(+1, u64, p64octets, "p64octets", "Bytes") \ + m(+1, u64, p65to127octets, "p65to127octets", "Bytes") \ + m(+1, u64, p128to255octets, "p128to255octets", "Bytes") \ + m(+1, u64, p256to511octets, "p256to511octets", "Bytes") \ + m(+1, u64, p512to1023octets, "p512to1023octets", "Bytes") \ + m(+1, u64, p1024to1518octets, "p1024to1518octets", "Bytes") \ + m(+1, u64, p1519to2047octets, "p1519to2047octets", "Bytes") \ + m(+1, u64, p2048to4095octets, "p2048to4095octets", "Bytes") \ + m(+1, u64, p4096to8191octets, "p4096to8191octets", "Bytes") \ + m(+1, u64, p8192to10239octets, "p8192to10239octets", "Bytes") #define MLX5E_PPORT_RFC2863_STATS_DEBUG(m) \ - m(+1, u64 in_octets, "in_octets", "In octets") \ - m(+1, u64 in_ucast_pkts, "in_ucast_pkts", "In unicast packets") \ - m(+1, u64 in_discards, "in_discards", "In discards") \ - m(+1, u64 in_errors, "in_errors", "In errors") \ - m(+1, u64 in_unknown_protos, "in_unknown_protos", "In unknown protocols") \ - m(+1, u64 out_octets, "out_octets", "Out octets") \ - m(+1, u64 out_ucast_pkts, "out_ucast_pkts", "Out unicast packets") \ - m(+1, u64 out_discards, "out_discards", "Out discards") \ - m(+1, u64 out_errors, "out_errors", "Out errors") \ - m(+1, u64 in_multicast_pkts, "in_multicast_pkts", "In multicast packets") \ - m(+1, u64 in_broadcast_pkts, "in_broadcast_pkts", "In broadcast packets") \ - m(+1, u64 out_multicast_pkts, "out_multicast_pkts", "Out multicast packets") \ - m(+1, u64 out_broadcast_pkts, "out_broadcast_pkts", "Out broadcast packets") + m(+1, u64, in_octets, "in_octets", "In octets") \ + m(+1, u64, in_ucast_pkts, "in_ucast_pkts", "In unicast packets") \ + m(+1, u64, in_discards, "in_discards", "In discards") \ + m(+1, u64, in_errors, "in_errors", "In errors") \ + m(+1, u64, in_unknown_protos, "in_unknown_protos", "In unknown protocols") \ + m(+1, u64, out_octets, "out_octets", "Out octets") \ + m(+1, u64, out_ucast_pkts, "out_ucast_pkts", "Out unicast packets") \ + m(+1, u64, out_discards, "out_discards", "Out discards") \ + m(+1, u64, out_errors, "out_errors", "Out errors") \ + m(+1, u64, in_multicast_pkts, "in_multicast_pkts", "In multicast packets") \ + m(+1, u64, in_broadcast_pkts, "in_broadcast_pkts", "In broadcast packets") \ + m(+1, u64, out_multicast_pkts, "out_multicast_pkts", "Out multicast packets") \ + m(+1, u64, out_broadcast_pkts, "out_broadcast_pkts", "Out broadcast packets") #define MLX5E_PPORT_ETHERNET_EXTENDED_STATS_DEBUG(m) \ - m(+1, u64 port_transmit_wait_high, "port_transmit_wait_high", "Port transmit wait high") \ - m(+1, u64 ecn_marked, "ecn_marked", "ECN marked") \ - m(+1, u64 no_buffer_discard_mc, "no_buffer_discard_mc", "No buffer discard mc") \ - m(+1, u64 rx_ebp, "rx_ebp", "RX EBP") \ - m(+1, u64 tx_ebp, "tx_ebp", "TX EBP") \ - m(+1, u64 rx_buffer_almost_full, "rx_buffer_almost_full", "RX buffer almost full") \ - m(+1, u64 rx_buffer_full, "rx_buffer_full", "RX buffer full") \ - m(+1, u64 rx_icrc_encapsulated, "rx_icrc_encapsulated", "RX ICRC encapsulated") \ - m(+1, u64 ex_reserved_0, "ex_reserved_0", "Reserved") \ - m(+1, u64 ex_reserved_1, "ex_reserved_1", "Reserved") \ - m(+1, u64 tx_stat_p64octets, "tx_stat_p64octets", "Bytes") \ - m(+1, u64 tx_stat_p65to127octets, "tx_stat_p65to127octets", "Bytes") \ - m(+1, u64 tx_stat_p128to255octets, "tx_stat_p128to255octets", "Bytes") \ - m(+1, u64 tx_stat_p256to511octets, "tx_stat_p256to511octets", "Bytes") \ - m(+1, u64 tx_stat_p512to1023octets, "tx_stat_p512to1023octets", "Bytes") \ - m(+1, u64 tx_stat_p1024to1518octets, "tx_stat_p1024to1518octets", "Bytes") \ - m(+1, u64 tx_stat_p1519to2047octets, "tx_stat_p1519to2047octets", "Bytes") \ - m(+1, u64 tx_stat_p2048to4095octets, "tx_stat_p2048to4095octets", "Bytes") \ - m(+1, u64 tx_stat_p4096to8191octets, "tx_stat_p4096to8191octets", "Bytes") \ - m(+1, u64 tx_stat_p8192to10239octets, "tx_stat_p8192to10239octets", "Bytes") + m(+1, u64, port_transmit_wait_high, "port_transmit_wait_high", "Port transmit wait high") \ + m(+1, u64, ecn_marked, "ecn_marked", "ECN marked") \ + m(+1, u64, no_buffer_discard_mc, "no_buffer_discard_mc", "No buffer discard mc") \ + m(+1, u64, rx_ebp, "rx_ebp", "RX EBP") \ + m(+1, u64, tx_ebp, "tx_ebp", "TX EBP") \ + m(+1, u64, rx_buffer_almost_full, "rx_buffer_almost_full", "RX buffer almost full") \ + m(+1, u64, rx_buffer_full, "rx_buffer_full", "RX buffer full") \ + m(+1, u64, rx_icrc_encapsulated, "rx_icrc_encapsulated", "RX ICRC encapsulated") \ + m(+1, u64, ex_reserved_0, "ex_reserved_0", "Reserved") \ + m(+1, u64, ex_reserved_1, "ex_reserved_1", "Reserved") \ + m(+1, u64, tx_stat_p64octets, "tx_stat_p64octets", "Bytes") \ + m(+1, u64, tx_stat_p65to127octets, "tx_stat_p65to127octets", "Bytes") \ + m(+1, u64, tx_stat_p128to255octets, "tx_stat_p128to255octets", "Bytes") \ + m(+1, u64, tx_stat_p256to511octets, "tx_stat_p256to511octets", "Bytes") \ + m(+1, u64, tx_stat_p512to1023octets, "tx_stat_p512to1023octets", "Bytes") \ + m(+1, u64, tx_stat_p1024to1518octets, "tx_stat_p1024to1518octets", "Bytes") \ + m(+1, u64, tx_stat_p1519to2047octets, "tx_stat_p1519to2047octets", "Bytes") \ + m(+1, u64, tx_stat_p2048to4095octets, "tx_stat_p2048to4095octets", "Bytes") \ + m(+1, u64, tx_stat_p4096to8191octets, "tx_stat_p4096to8191octets", "Bytes") \ + m(+1, u64, tx_stat_p8192to10239octets, "tx_stat_p8192to10239octets", "Bytes") -#define MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG(m) \ - m(+1, u64 time_since_last_clear, "time_since_last_clear", \ - "Time since the last counters clear event (msec)") \ - m(+1, u64 symbol_errors, "symbol_errors", "Symbol errors") \ - m(+1, u64 sync_headers_errors, "sync_headers_errors", "Sync header error counter") \ - m(+1, u64 bip_errors_lane0, "edpl_bip_errors_lane0", \ - "Indicates the number of PRBS errors on lane 0") \ - m(+1, u64 bip_errors_lane1, "edpl_bip_errors_lane1", \ - "Indicates the number of PRBS errors on lane 1") \ - m(+1, u64 bip_errors_lane2, "edpl_bip_errors_lane2", \ - "Indicates the number of PRBS errors on lane 2") \ - m(+1, u64 bip_errors_lane3, "edpl_bip_errors_lane3", \ - "Indicates the number of PRBS errors on lane 3") \ - m(+1, u64 fc_corrected_blocks_lane0, "fc_corrected_blocks_lane0", \ - "FEC correctable block counter lane 0") \ - m(+1, u64 fc_corrected_blocks_lane1, "fc_corrected_blocks_lane1", \ - "FEC correctable block counter lane 1") \ - m(+1, u64 fc_corrected_blocks_lane2, "fc_corrected_blocks_lane2", \ - "FEC correctable block counter lane 2") \ - m(+1, u64 fc_corrected_blocks_lane3, "fc_corrected_blocks_lane3", \ - "FEC correctable block counter lane 3") \ - m(+1, u64 rs_corrected_blocks, "rs_corrected_blocks", \ - "FEC correcable block counter") \ - m(+1, u64 rs_uncorrectable_blocks, "rs_uncorrectable_blocks", \ - "FEC uncorrecable block counter") \ - m(+1, u64 rs_no_errors_blocks, "rs_no_errors_blocks", \ - "The number of RS-FEC blocks received that had no errors") \ - m(+1, u64 rs_single_error_blocks, "rs_single_error_blocks", \ - "The number of corrected RS-FEC blocks received that had" \ - "exactly 1 error symbol") \ - m(+1, u64 rs_corrected_symbols_total, "rs_corrected_symbols_total", \ - "Port FEC corrected symbol counter") \ - m(+1, u64 rs_corrected_symbols_lane0, "rs_corrected_symbols_lane0", \ - "FEC corrected symbol counter lane 0") \ - m(+1, u64 rs_corrected_symbols_lane1, "rs_corrected_symbols_lane1", \ - "FEC corrected symbol counter lane 1") \ - m(+1, u64 rs_corrected_symbols_lane2, "rs_corrected_symbols_lane2", \ - "FEC corrected symbol counter lane 2") \ - m(+1, u64 rs_corrected_symbols_lane3, "rs_corrected_symbols_lane3", \ - "FEC corrected symbol counter lane 3") +#define MLX5E_PPORT_PHYSICAL_LAYER_STATS_DEBUG(m) \ + m(+1, u64, time_since_last_clear, "time_since_last_clear", \ + "Time since the last counters clear event (msec)") \ + m(+1, u64, symbol_errors, "symbol_errors", "Symbol errors") \ + m(+1, u64, sync_headers_errors, "sync_headers_errors", \ + "Sync header error counter") \ + m(+1, u64, bip_errors_lane0, "edpl_bip_errors_lane0", \ + "Indicates the number of PRBS errors on lane 0") \ + m(+1, u64, bip_errors_lane1, "edpl_bip_errors_lane1", \ + "Indicates the number of PRBS errors on lane 1") \ + m(+1, u64, bip_errors_lane2, "edpl_bip_errors_lane2", \ + "Indicates the number of PRBS errors on lane 2") \ + m(+1, u64, bip_errors_lane3, "edpl_bip_errors_lane3", \ + "Indicates the number of PRBS errors on lane 3") \ + m(+1, u64, fc_corrected_blocks_lane0, "fc_corrected_blocks_lane0", \ + "FEC correctable block counter lane 0") \ + m(+1, u64, fc_corrected_blocks_lane1, "fc_corrected_blocks_lane1", \ + "FEC correctable block counter lane 1") \ + m(+1, u64, fc_corrected_blocks_lane2, "fc_corrected_blocks_lane2", \ + "FEC correctable block counter lane 2") \ + m(+1, u64, fc_corrected_blocks_lane3, "fc_corrected_blocks_lane3", \ + "FEC correctable block counter lane 3") \ + m(+1, u64, rs_corrected_blocks, "rs_corrected_blocks", \ + "FEC correcable block counter") \ + m(+1, u64, rs_uncorrectable_blocks, "rs_uncorrectable_blocks", \ + "FEC uncorrecable block counter") \ + m(+1, u64, rs_no_errors_blocks, "rs_no_errors_blocks", \ + "The number of RS-FEC blocks received that had no errors") \ + m(+1, u64, rs_single_error_blocks, "rs_single_error_blocks", \ + "The number of corrected RS-FEC blocks received that had" \ + "exactly 1 error symbol") \ + m(+1, u64, rs_corrected_symbols_total, "rs_corrected_symbols_total", \ + "Port FEC corrected symbol counter") \ + m(+1, u64, rs_corrected_symbols_lane0, "rs_corrected_symbols_lane0", \ + "FEC corrected symbol counter lane 0") \ + m(+1, u64, rs_corrected_symbols_lane1, "rs_corrected_symbols_lane1", \ + "FEC corrected symbol counter lane 1") \ + m(+1, u64, rs_corrected_symbols_lane2, "rs_corrected_symbols_lane2", \ + "FEC corrected symbol counter lane 2") \ + m(+1, u64, rs_corrected_symbols_lane3, "rs_corrected_symbols_lane3", \ + "FEC corrected symbol counter lane 3") /* Per priority statistics for PFC */ #define MLX5E_PPORT_PER_PRIO_STATS_SUB(m,n,p) \ @@ -349,7 +350,7 @@ struct mlx5e_vport_stats { "device_stall_critical_watermark", "Device stall critical watermark") #define MLX5E_PPORT_PER_PRIO_STATS_PREFIX(m,p,c,t,f,s,d) \ - m(c, t pri_##p##_##f, "prio" #p "_" s, "Priority " #p " - " d) + m(c, t, pri_##p##_##f, "prio" #p "_" s, "Priority " #p " - " d) #define MLX5E_PPORT_PER_PRIO_STATS_NUM_PRIO 8 @@ -411,14 +412,14 @@ struct mlx5e_port_stats_debug { }; #define MLX5E_RQ_STATS(m) \ - m(+1, u64 packets, "packets", "Received packets") \ - m(+1, u64 bytes, "bytes", "Received bytes") \ - m(+1, u64 csum_none, "csum_none", "Received packets") \ - m(+1, u64 lro_packets, "lro_packets", "Received LRO packets") \ - m(+1, u64 lro_bytes, "lro_bytes", "Received LRO bytes") \ - m(+1, u64 sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO") \ - m(+1, u64 sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO") \ - m(+1, u64 wqe_err, "wqe_err", "Received packets") + m(+1, u64, packets, "packets", "Received packets") \ + m(+1, u64, bytes, "bytes", "Received bytes") \ + m(+1, u64, csum_none, "csum_none", "Received packets") \ + m(+1, u64, lro_packets, "lro_packets", "Received LRO packets") \ + m(+1, u64, lro_bytes, "lro_bytes", "Received LRO bytes") \ + m(+1, u64, sw_lro_queued, "sw_lro_queued", "Packets queued for SW LRO") \ + m(+1, u64, sw_lro_flushed, "sw_lro_flushed", "Packets flushed from SW LRO") \ + m(+1, u64, wqe_err, "wqe_err", "Received packets") #define MLX5E_RQ_STATS_NUM (0 MLX5E_RQ_STATS(MLX5E_STATS_COUNT)) @@ -429,14 +430,14 @@ struct mlx5e_rq_stats { }; #define MLX5E_SQ_STATS(m) \ - m(+1, u64 packets, "packets", "Transmitted packets") \ - m(+1, u64 bytes, "bytes", "Transmitted bytes") \ - m(+1, u64 tso_packets, "tso_packets", "Transmitted packets") \ - m(+1, u64 tso_bytes, "tso_bytes", "Transmitted bytes") \ - m(+1, u64 csum_offload_none, "csum_offload_none", "Transmitted packets") \ - m(+1, u64 defragged, "defragged", "Transmitted packets") \ - m(+1, u64 dropped, "dropped", "Transmitted packets") \ - m(+1, u64 nop, "nop", "Transmitted packets") + m(+1, u64, packets, "packets", "Transmitted packets") \ + m(+1, u64, bytes, "bytes", "Transmitted bytes") \ + m(+1, u64, tso_packets, "tso_packets", "Transmitted packets") \ + m(+1, u64, tso_bytes, "tso_bytes", "Transmitted bytes") \ + m(+1, u64, csum_offload_none, "csum_offload_none", "Transmitted packets") \ + m(+1, u64, defragged, "defragged", "Transmitted packets") \ + m(+1, u64, dropped, "dropped", "Transmitted packets") \ + m(+1, u64, nop, "nop", "Transmitted packets") #define MLX5E_SQ_STATS_NUM (0 MLX5E_SQ_STATS(MLX5E_STATS_COUNT)) @@ -494,32 +495,31 @@ struct mlx5e_params { }; #define MLX5E_PARAMS(m) \ - m(+1, u64 tx_queue_size_max, "tx_queue_size_max", "Max send queue size") \ - m(+1, u64 rx_queue_size_max, "rx_queue_size_max", "Max receive queue size") \ - m(+1, u64 tx_queue_size, "tx_queue_size", "Default send queue size") \ - m(+1, u64 rx_queue_size, "rx_queue_size", "Default receive queue size") \ - m(+1, u64 channels, "channels", "Default number of channels") \ - m(+1, u64 channels_rsss, "channels_rsss", "Default channels receive side scaling stride") \ - m(+1, u64 coalesce_usecs_max, "coalesce_usecs_max", "Maximum usecs for joining packets") \ - m(+1, u64 coalesce_pkts_max, "coalesce_pkts_max", "Maximum packets to join") \ - m(+1, u64 rx_coalesce_usecs, "rx_coalesce_usecs", "Limit in usec for joining rx packets") \ - m(+1, u64 rx_coalesce_pkts, "rx_coalesce_pkts", "Maximum number of rx packets to join") \ - m(+1, u64 rx_coalesce_mode, "rx_coalesce_mode", "0: EQE fixed mode 1: CQE fixed mode 2: EQE auto mode 3: CQE auto mode") \ - m(+1, u64 tx_coalesce_usecs, "tx_coalesce_usecs", "Limit in usec for joining tx packets") \ - m(+1, u64 tx_coalesce_pkts, "tx_coalesce_pkts", "Maximum number of tx packets to join") \ - m(+1, u64 tx_coalesce_mode, "tx_coalesce_mode", "0: EQE mode 1: CQE mode") \ - m(+1, u64 tx_completion_fact, "tx_completion_fact", "1..MAX: Completion event ratio") \ - m(+1, u64 tx_completion_fact_max, "tx_completion_fact_max", "Maximum completion event ratio") \ - m(+1, u64 hw_lro, "hw_lro", "set to enable hw_lro") \ - m(+1, u64 cqe_zipping, "cqe_zipping", "0 : CQE zipping disabled") \ - m(+1, u64 modify_tx_dma, "modify_tx_dma", "0: Enable TX 1: Disable TX") \ - m(+1, u64 modify_rx_dma, "modify_rx_dma", "0: Enable RX 1: Disable RX") \ - m(+1, u64 diag_pci_enable, "diag_pci_enable", "0: Disabled 1: Enabled") \ - m(+1, u64 diag_general_enable, "diag_general_enable", "0: Disabled 1: Enabled") \ - m(+1, u64 hw_mtu, "hw_mtu", "Current hardware MTU value") \ - m(+1, u64 mc_local_lb, "mc_local_lb", "0: Local multicast loopback enabled 1: Disabled") \ - m(+1, u64 uc_local_lb, "uc_local_lb", "0: Local unicast loopback enabled 1: Disabled") - + m(+1, u64, tx_queue_size_max, "tx_queue_size_max", "Max send queue size") \ + m(+1, u64, rx_queue_size_max, "rx_queue_size_max", "Max receive queue size") \ + m(+1, u64, tx_queue_size, "tx_queue_size", "Default send queue size") \ + m(+1, u64, rx_queue_size, "rx_queue_size", "Default receive queue size") \ + m(+1, u64, channels, "channels", "Default number of channels") \ + m(+1, u64, channels_rsss, "channels_rsss", "Default channels receive side scaling stride") \ + m(+1, u64, coalesce_usecs_max, "coalesce_usecs_max", "Maximum usecs for joining packets") \ + m(+1, u64, coalesce_pkts_max, "coalesce_pkts_max", "Maximum packets to join") \ + m(+1, u64, rx_coalesce_usecs, "rx_coalesce_usecs", "Limit in usec for joining rx packets") \ + m(+1, u64, rx_coalesce_pkts, "rx_coalesce_pkts", "Maximum number of rx packets to join") \ + m(+1, u64, rx_coalesce_mode, "rx_coalesce_mode", "0: EQE fixed mode 1: CQE fixed mode 2: EQE auto mode 3: CQE auto mode") \ + m(+1, u64, tx_coalesce_usecs, "tx_coalesce_usecs", "Limit in usec for joining tx packets") \ + m(+1, u64, tx_coalesce_pkts, "tx_coalesce_pkts", "Maximum number of tx packets to join") \ + m(+1, u64, tx_coalesce_mode, "tx_coalesce_mode", "0: EQE mode 1: CQE mode") \ + m(+1, u64, tx_completion_fact, "tx_completion_fact", "1..MAX: Completion event ratio") \ + m(+1, u64, tx_completion_fact_max, "tx_completion_fact_max", "Maximum completion event ratio") \ + m(+1, u64, hw_lro, "hw_lro", "set to enable hw_lro") \ + m(+1, u64, cqe_zipping, "cqe_zipping", "0 : CQE zipping disabled") \ + m(+1, u64, modify_tx_dma, "modify_tx_dma", "0: Enable TX 1: Disable TX") \ + m(+1, u64, modify_rx_dma, "modify_rx_dma", "0: Enable RX 1: Disable RX") \ + m(+1, u64, diag_pci_enable, "diag_pci_enable", "0: Disabled 1: Enabled") \ + m(+1, u64, diag_general_enable, "diag_general_enable", "0: Disabled 1: Enabled") \ + m(+1, u64, hw_mtu, "hw_mtu", "Current hardware MTU value") \ + m(+1, u64, mc_local_lb, "mc_local_lb", "0: Local multicast loopback enabled 1: Disabled") \ + m(+1, u64, uc_local_lb, "uc_local_lb", "0: Local unicast loopback enabled 1: Disabled") #define MLX5E_PARAMS_NUM (0 MLX5E_PARAMS(MLX5E_STATS_COUNT)) Modified: head/sys/dev/mlx5/mlx5_en/en_rl.h ============================================================================== --- head/sys/dev/mlx5/mlx5_en/en_rl.h Wed May 8 10:58:41 2019 (r347307) +++ head/sys/dev/mlx5/mlx5_en/en_rl.h Wed May 8 10:59:16 2019 (r347308) @@ -59,42 +59,42 @@ #define MLX5E_RL_WUNLOCK(rl) sx_xunlock(&(rl)->rl_sxlock) #define MLX5E_RL_PARAMS(m) \ - m(+1, u64 tx_queue_size, "tx_queue_size", "Default send queue size") \ - m(+1, u64 tx_coalesce_usecs, "tx_coalesce_usecs", "Limit in usec for joining TX packets") \ - m(+1, u64 tx_coalesce_pkts, "tx_coalesce_pkts", "Maximum number of TX packets to join") \ - m(+1, u64 tx_coalesce_mode, "tx_coalesce_mode", "0: EQE mode 1: CQE mode") \ - m(+1, u64 tx_completion_fact, "tx_completion_fact", "1..MAX: Completion event ratio") \ - m(+1, u64 tx_completion_fact_max, "tx_completion_fact_max", "Maximum completion event ratio") \ - m(+1, u64 tx_worker_threads_max, "tx_worker_threads_max", "Max number of TX worker threads") \ - m(+1, u64 tx_worker_threads_def, "tx_worker_threads_def", "Default number of TX worker threads") \ - m(+1, u64 tx_channels_per_worker_max, "tx_channels_per_worker_max", "Max number of TX channels per worker") \ - m(+1, u64 tx_channels_per_worker_def, "tx_channels_per_worker_def", "Default number of TX channels per worker") \ - m(+1, u64 tx_rates_max, "tx_rates_max", "Max number of TX rates") \ - m(+1, u64 tx_rates_def, "tx_rates_def", "Default number of TX rates") \ - m(+1, u64 tx_limit_min, "tx_limit_min", "Minimum TX rate in bits/s") \ - m(+1, u64 tx_limit_max, "tx_limit_max", "Maximum TX rate in bits/s") \ - m(+1, u64 tx_burst_size, "tx_burst_size", "Current burst size in number of packets. A value of zero means use firmware default.") \ - m(+1, u64 tx_burst_size_max, "tx_burst_size_max", "Maximum burst size in number of packets") \ - m(+1, u64 tx_burst_size_min, "tx_burst_size_min", "Minimum burst size in number of packets") + m(+1, u64, tx_queue_size, "tx_queue_size", "Default send queue size") \ + m(+1, u64, tx_coalesce_usecs, "tx_coalesce_usecs", "Limit in usec for joining TX packets") \ + m(+1, u64, tx_coalesce_pkts, "tx_coalesce_pkts", "Maximum number of TX packets to join") \ + m(+1, u64, tx_coalesce_mode, "tx_coalesce_mode", "0: EQE mode 1: CQE mode") \ + m(+1, u64, tx_completion_fact, "tx_completion_fact", "1..MAX: Completion event ratio") \ + m(+1, u64, tx_completion_fact_max, "tx_completion_fact_max", "Maximum completion event ratio") \ + m(+1, u64, tx_worker_threads_max, "tx_worker_threads_max", "Max number of TX worker threads") \ + m(+1, u64, tx_worker_threads_def, "tx_worker_threads_def", "Default number of TX worker threads") \ + m(+1, u64, tx_channels_per_worker_max, "tx_channels_per_worker_max", "Max number of TX channels per worker") \ + m(+1, u64, tx_channels_per_worker_def, "tx_channels_per_worker_def", "Default number of TX channels per worker") \ + m(+1, u64, tx_rates_max, "tx_rates_max", "Max number of TX rates") \ + m(+1, u64, tx_rates_def, "tx_rates_def", "Default number of TX rates") \ + m(+1, u64, tx_limit_min, "tx_limit_min", "Minimum TX rate in bits/s") \ + m(+1, u64, tx_limit_max, "tx_limit_max", "Maximum TX rate in bits/s") \ + m(+1, u64, tx_burst_size, "tx_burst_size", "Current burst size in number of packets. A value of zero means use firmware default.") \ + m(+1, u64, tx_burst_size_max, "tx_burst_size_max", "Maximum burst size in number of packets") \ + m(+1, u64, tx_burst_size_min, "tx_burst_size_min", "Minimum burst size in number of packets") #define MLX5E_RL_PARAMS_NUM (0 MLX5E_RL_PARAMS(MLX5E_STATS_COUNT)) #define MLX5E_RL_STATS(m) \ - m(+1, u64 tx_allocate_resource_failure, "tx_allocate_resource_failure", "Number of times firmware resource allocation failed") \ - m(+1, u64 tx_add_new_rate_failure, "tx_add_new_rate_failure", "Number of times adding a new firmware rate failed") \ - m(+1, u64 tx_modify_rate_failure, "tx_modify_rate_failure", "Number of times modifying a firmware rate failed") \ - m(+1, u64 tx_active_connections, "tx_active_connections", "Number of active connections") \ - m(+1, u64 tx_open_queues, "tx_open_queues", "Number of open TX queues") \ - m(+1, u64 tx_available_resource_failure, "tx_available_resource_failure", "Number of times TX resources were not available") + m(+1, u64, tx_allocate_resource_failure, "tx_allocate_resource_failure", "Number of times firmware resource allocation failed") \ + m(+1, u64, tx_add_new_rate_failure, "tx_add_new_rate_failure", "Number of times adding a new firmware rate failed") \ + m(+1, u64, tx_modify_rate_failure, "tx_modify_rate_failure", "Number of times modifying a firmware rate failed") \ + m(+1, u64, tx_active_connections, "tx_active_connections", "Number of active connections") \ + m(+1, u64, tx_open_queues, "tx_open_queues", "Number of open TX queues") \ + m(+1, u64, tx_available_resource_failure, "tx_available_resource_failure", "Number of times TX resources were not available") #define MLX5E_RL_STATS_NUM (0 MLX5E_RL_STATS(MLX5E_STATS_COUNT)) #define MLX5E_RL_TABLE_PARAMS(m) \ - m(+1, u64 tx_limit_add, "tx_limit_add", "Add TX rate limit in bits/s to empty slot") \ - m(+1, u64 tx_limit_clr, "tx_limit_clr", "Clear all TX rates in table") \ - m(+1, u64 tx_allowed_deviation, "tx_allowed_deviation", "Relative rate deviation allowed in 1/1000") \ - m(+1, u64 tx_allowed_deviation_min, "tx_allowed_deviation_min", "Minimum allowed rate deviation in 1/1000") \ - m(+1, u64 tx_allowed_deviation_max, "tx_allowed_deviation_max", "Maximum allowed rate deviation in 1/1000") + m(+1, u64, tx_limit_add, "tx_limit_add", "Add TX rate limit in bits/s to empty slot") \ + m(+1, u64, tx_limit_clr, "tx_limit_clr", "Clear all TX rates in table") \ + m(+1, u64, tx_allowed_deviation, "tx_allowed_deviation", "Relative rate deviation allowed in 1/1000") \ + m(+1, u64, tx_allowed_deviation_min, "tx_allowed_deviation_min", "Minimum allowed rate deviation in 1/1000") \ + m(+1, u64, tx_allowed_deviation_max, "tx_allowed_deviation_max", "Maximum allowed rate deviation in 1/1000") #define MLX5E_RL_TABLE_PARAMS_NUM (0 MLX5E_RL_TABLE_PARAMS(MLX5E_STATS_COUNT))