<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/include/net/netdev_queues.h, branch v6.15</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.15</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.15'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-05-08T09:56:12Z</updated>
<entry>
<title>net: export a helper for adding up queue stats</title>
<updated>2025-05-08T09:56:12Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-05-07T00:32:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=23fa6a23d97182d36ca3c71e43c804fa91e46a03'/>
<id>urn:sha1:23fa6a23d97182d36ca3c71e43c804fa91e46a03</id>
<content type='text'>
Older drivers and drivers with lower queue counts often have a static
array of queues, rather than allocating structs for each queue on demand.
Add a helper for adding up qstats from a queue range. Expectation is
that driver will pass a queue range [netdev-&gt;real_num_*x_queues, MAX).
It was tempting to always use num_*x_queues as the end, but virtio
seems to clamp its queue count after allocating the netdev. And this
way we can trivaly reuse the helper for [0, real_..).

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Link: https://patch.msgid.link/20250507003221.823267-2-kuba@kernel.org
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;

</content>
</entry>
<entry>
<title>net: report csum_complete via qstats</title>
<updated>2025-02-13T00:37:35Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-02-11T18:13:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34eea78a1112afc3579e06abb510a9f57521adaf'/>
<id>urn:sha1:34eea78a1112afc3579e06abb510a9f57521adaf</id>
<content type='text'>
Commit 13c7c941e729 ("netdev: add qstat for csum complete") reserved
the entry for csum complete in the qstats uAPI. Start reporting this
value now that we have a driver which needs it.

Reviewed-by: Joe Damato &lt;jdamato@fastly.com&gt;
Reviewed-by: Alexander Lobakin &lt;aleksander.lobakin@intel.com&gt;
Link: https://patch.msgid.link/20250211181356.580800-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: devmem: don't call queue stop / start when the interface is down</title>
<updated>2025-02-08T01:21:02Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-02-06T22:56:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3e7efc3f4f03bca0ea630c302e7c79cf807476bb'/>
<id>urn:sha1:3e7efc3f4f03bca0ea630c302e7c79cf807476bb</id>
<content type='text'>
We seem to be missing a netif_running() check from the devmem
installation path. Starting a queue on a stopped device makes
no sense. We still want to be able to allocate the memory, just
to test that the device is indeed setting up the page pools
in a memory provider compatible way.

This is not a bug fix, because existing drivers check if
the interface is down as part of the ops. But new drivers
shouldn't have to do this, as long as they can correctly
alloc/free while down.

Reviewed-by: Mina Almasry &lt;almasrymina@google.com&gt;
Link: https://patch.msgid.link/20250206225638.1387810-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: move HDS config from ethtool state</title>
<updated>2025-01-20T19:44:57Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-01-19T02:05:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3c836451ca9041cfb32a7d8f59ea15b3b991bbb3'/>
<id>urn:sha1:3c836451ca9041cfb32a7d8f59ea15b3b991bbb3</id>
<content type='text'>
Separate the HDS config from the ethtool state struct.
The HDS config contains just simple parameters, not state.
Having it as a separate struct will make it easier to clone / copy
and also long term potentially make it per-queue.

Reviewed-by: Michael Chan &lt;michael.chan@broadcom.com&gt;
Link: https://patch.msgid.link/20250119020518.1962249-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: qstat: extend kdoc about get_base_stats</title>
<updated>2024-06-01T22:11:52Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2024-05-29T16:29:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=69c8b998717c03adeada070882512ebeae11d71f'/>
<id>urn:sha1:69c8b998717c03adeada070882512ebeae11d71f</id>
<content type='text'>
mlx5 has a dedicated queue for PTP packets. Clarify that
this sort of queues can also be accounted towards the base.

Reviewed-by: Joe Damato &lt;jdamato@fastly.com&gt;
Link: https://lore.kernel.org/r/20240529162922.3690698-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netdev: Add queue stats for TX stop and wake</title>
<updated>2024-05-13T21:58:36Z</updated>
<author>
<name>Daniel Jurgens</name>
<email>danielj@nvidia.com</email>
</author>
<published>2024-05-10T20:19:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b56035101e1cdd9c4420ea5da17f09f87fb69285'/>
<id>urn:sha1:b56035101e1cdd9c4420ea5da17f09f87fb69285</id>
<content type='text'>
TX queue stop and wake are counted by some drivers.
Support reporting these via netdev-genl queue stats.

Signed-off-by: Daniel Jurgens &lt;danielj@nvidia.com&gt;
Reviewed-by: Jiri Pirko &lt;jiri@nvidia.com&gt;
Reviewed-by: Jason Xing &lt;kerneljasonxing@gmail.com&gt;
Link: https://lore.kernel.org/r/20240510201927.1821109-2-danielj@nvidia.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>queue_api: define queue api</title>
<updated>2024-05-05T13:35:33Z</updated>
<author>
<name>Mina Almasry</name>
<email>almasrymina@google.com</email>
</author>
<published>2024-05-01T23:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=087b24de5c825c53f15a9481b94f757223c20610'/>
<id>urn:sha1:087b24de5c825c53f15a9481b94f757223c20610</id>
<content type='text'>
This API enables the net stack to reset the queues used for devmem TCP.

Signed-off-by: Mina Almasry &lt;almasrymina@google.com&gt;
Signed-off-by: Shailend Chand &lt;shailend@google.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>netdev: add queue stats</title>
<updated>2024-04-30T08:51:33Z</updated>
<author>
<name>Xuan Zhuo</name>
<email>xuanzhuo@linux.alibaba.com</email>
</author>
<published>2024-04-26T03:39:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0cfe71f45f420e412fda2395807a56c453a6e0b6'/>
<id>urn:sha1:0cfe71f45f420e412fda2395807a56c453a6e0b6</id>
<content type='text'>
These stats are commonly. Support reporting those via netdev-genl queue
stats.

name: rx-hw-drops
name: rx-hw-drop-overruns
name: rx-csum-unnecessary
name: rx-csum-none
name: rx-csum-bad
name: rx-hw-gro-packets
name: rx-hw-gro-bytes
name: rx-hw-gro-wire-packets
name: rx-hw-gro-wire-bytes
name: rx-hw-drop-ratelimits
name: tx-hw-drops
name: tx-hw-drop-errors
name: tx-csum-none
name: tx-needs-csum
name: tx-hw-gso-packets
name: tx-hw-gso-bytes
name: tx-hw-gso-wire-packets
name: tx-hw-gso-wire-bytes
name: tx-hw-drop-ratelimits

Signed-off-by: Xuan Zhuo &lt;xuanzhuo@linux.alibaba.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Signed-off-by: Paolo Abeni &lt;pabeni@redhat.com&gt;
</content>
</entry>
<entry>
<title>netdev: add queue stat for alloc failures</title>
<updated>2024-03-08T05:13:26Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2024-03-06T19:55:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=92f8b1f5ca0f157f564e75cef4c63641c172e0f1'/>
<id>urn:sha1:92f8b1f5ca0f157f564e75cef4c63641c172e0f1</id>
<content type='text'>
Rx alloc failures are commonly counted by drivers.
Support reporting those via netdev-genl queue stats.

Acked-by: Stanislav Fomichev &lt;sdf@google.com&gt;
Reviewed-by: Amritha Nambiar &lt;amritha.nambiar@intel.com&gt;
Reviewed-by: Xuan Zhuo &lt;xuanzhuo@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240306195509.1502746-3-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netdev: add per-queue statistics</title>
<updated>2024-03-08T05:13:25Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2024-03-06T19:55:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ab63a2387cb906d43b72a8effb611bbaecb2d0cd'/>
<id>urn:sha1:ab63a2387cb906d43b72a8effb611bbaecb2d0cd</id>
<content type='text'>
The ethtool-nl family does a good job exposing various protocol
related and IEEE/IETF statistics which used to get dumped under
ethtool -S, with creative names. Queue stats don't have a netlink
API, yet, and remain a lion's share of ethtool -S output for new
drivers. Not only is that bad because the names differ driver to
driver but it's also bug-prone. Intuitively drivers try to report
only the stats for active queues, but querying ethtool stats
involves multiple system calls, and the number of stats is
read separately from the stats themselves. Worse still when user
space asks for values of the stats, it doesn't inform the kernel
how big the buffer is. If number of stats increases in the meantime
kernel will overflow user buffer.

Add a netlink API for dumping queue stats. Queue information is
exposed via the netdev-genl family, so add the stats there.
Support per-queue and sum-for-device dumps. Latter will be useful
when subsequent patches add more interesting common stats than
just bytes and packets.

The API does not currently distinguish between HW and SW stats.
The expectation is that the source of the stats will either not
matter much (good packets) or be obvious (skb alloc errors).

Acked-by: Stanislav Fomichev &lt;sdf@google.com&gt;
Reviewed-by: Amritha Nambiar &lt;amritha.nambiar@intel.com&gt;
Reviewed-by: Xuan Zhuo &lt;xuanzhuo@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240306195509.1502746-2-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
