Thread (57 messages) 57 messages, 4 authors, 2020-07-10

RE: [net-next v3 13/15] iecm: Add ethtool

From: Brady, Alan <hidden>
Date: 2020-06-29 22:07:31

-----Original Message-----
From: Jakub Kicinski <kuba@kernel.org>
Sent: Monday, June 29, 2020 2:31 PM
To: Brady, Alan <redacted>
Cc: Kirsher, Jeffrey T <redacted>; davem@davemloft.net;
Michael, Alice [off-list ref]; netdev@vger.kernel.org;
nhorman@redhat.com; sassmann@redhat.com; Burra, Phani R
[off-list ref]; Hay, Joshua A [off-list ref]; Chittim,
Madhu [off-list ref]; Linga, Pavan Kumar
[off-list ref]; Skidmore, Donald C
[off-list ref]; Brandeburg, Jesse
[off-list ref]; Samudrala, Sridhar
[off-list ref]
Subject: Re: [net-next v3 13/15] iecm: Add ethtool

On Mon, 29 Jun 2020 21:00:57 +0000 Brady, Alan wrote:
quoted
quoted
quoted
+/* Helper macro to define an iecm_stat structure with proper size and
type.
quoted
quoted
quoted
+ * Use this when defining constant statistics arrays. Note that
+@_type expects
+ * only a type name and is used multiple times.
+ */
+#define IECM_STAT(_type, _name, _stat) { \
+	.stat_string = _name, \
+	.sizeof_stat = sizeof_field(_type, _stat), \
+	.stat_offset = offsetof(_type, _stat) \ }
+
+/* Helper macro for defining some statistics related to queues */
+#define IECM_QUEUE_STAT(_name, _stat) \
+	IECM_STAT(struct iecm_queue, _name, _stat)
+
+/* Stats associated with a Tx queue */ static const struct
+iecm_stats iecm_gstrings_tx_queue_stats[] = {
+	IECM_QUEUE_STAT("%s-%u.packets", q_stats.tx.packets),
+	IECM_QUEUE_STAT("%s-%u.bytes", q_stats.tx.bytes), };
+
+/* Stats associated with an Rx queue */ static const struct
+iecm_stats iecm_gstrings_rx_queue_stats[] = {
+	IECM_QUEUE_STAT("%s-%u.packets", q_stats.rx.packets),
+	IECM_QUEUE_STAT("%s-%u.bytes", q_stats.rx.bytes),
+	IECM_QUEUE_STAT("%s-%u.generic_csum", q_stats.rx.generic_csum),
+	IECM_QUEUE_STAT("%s-%u.basic_csum", q_stats.rx.basic_csum),
What's basic and generic? perhaps given them the Linux names?
I believe these should be hw_csum for basic_csum and csum_valid for
generic_csum, will fix.

I was thinking of just saying csum_complete and csum_unnecessary.

But generic_sum doesn't seem to be incremented in this patch, so hard to tell
what it is :S
csum_complete and csum_unnecessary works.  Sorry some of the checksum functionality didn't quite make the cut in time for the patch series but will appear in a future patch soon.   Thanks.

Alan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help