<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/core/dev.h, branch v6.14</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.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-01-16T03:13:34Z</updated>
<entry>
<title>net: make netdev netlink ops hold netdev_lock()</title>
<updated>2025-01-16T03:13:34Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-01-15T03:53:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eeeec1d4c6930691fc59858799b8a7443d9d30ee'/>
<id>urn:sha1:eeeec1d4c6930691fc59858799b8a7443d9d30ee</id>
<content type='text'>
In prep for dropping rtnl_lock, start locking netdev-&gt;lock in netlink
genl ops. We need to be using netdev-&gt;up instead of flags &amp; IFF_UP.

We can remove the RCU lock protection for the NAPI since NAPI list
is protected by netdev-&gt;lock already.

Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Kuniyuki Iwashima &lt;kuniyu@amazon.com&gt;
Link: https://patch.msgid.link/20250115035319.559603-8-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: add netdev-&gt;up protected by netdev_lock()</title>
<updated>2025-01-16T03:13:34Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-01-15T03:53:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5112457f3d8e41f987908266068af88ef9f3ab78'/>
<id>urn:sha1:5112457f3d8e41f987908266068af88ef9f3ab78</id>
<content type='text'>
Some uAPI (netdev netlink) hide net_device's sub-objects while
the interface is down to ensure uniform behavior across drivers.
To remove the rtnl_lock dependency from those uAPIs we need a way
to safely tell if the device is down or up.

Add an indication of whether device is open or closed, protected
by netdev-&gt;lock. The semantics are the same as IFF_UP, but taking
netdev_lock around every write to -&gt;flags would be a lot of code
churn.

We don't want to blanket the entire open / close path by netdev_lock,
because it will prevent us from applying it to specific structures -
core helpers won't be able to take that lock from any function
called by the drivers on open/close paths.

So the state of the flag is "pessimistic", as in it may report false
negatives, but never false positives.

Reviewed-by: Joe Damato &lt;jdamato@fastly.com&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Kuniyuki Iwashima &lt;kuniyu@amazon.com&gt;
Link: https://patch.msgid.link/20250115035319.559603-5-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: add helpers for lookup and walking netdevs under netdev_lock()</title>
<updated>2025-01-16T03:13:33Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-01-15T03:53:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2628f4958cd4a8be2f14b611c67ef9766c5ee564'/>
<id>urn:sha1:2628f4958cd4a8be2f14b611c67ef9766c5ee564</id>
<content type='text'>
Add helpers for accessing netdevs under netdev_lock().
There's some careful handling needed to find the device and lock it
safely, without it getting unregistered, and without taking rtnl_lock
(the latter being the whole point of the new locking, after all).

Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Reviewed-by: Kuniyuki Iwashima &lt;kuniyu@amazon.com&gt;
Link: https://patch.msgid.link/20250115035319.559603-4-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: hide the definition of dev_get_by_napi_id()</title>
<updated>2025-01-11T02:37:01Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-01-10T00:49:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=21520e74ba454c549f4f732d014f180f8c0c041c'/>
<id>urn:sha1:21520e74ba454c549f4f732d014f180f8c0c041c</id>
<content type='text'>
There are no module callers of dev_get_by_napi_id(),
and commit d1cacd747768 ("netdev: prevent accessing NAPI instances
from another namespace") proves that getting NAPI by id
needs to be done with care. So hide dev_get_by_napi_id().

Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Reviewed-by: Kalesh AP &lt;kalesh-anakkur.purayil@broadcom.com&gt;
Reviewed-by: Joe Damato &lt;jdamato@fastly.com&gt;
Link: https://patch.msgid.link/20250110004924.3212260-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2025-01-10T00:11:47Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-01-10T00:11:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14ea4cd1b19162888f629c4ce1ba268c683b0f12'/>
<id>urn:sha1:14ea4cd1b19162888f629c4ce1ba268c683b0f12</id>
<content type='text'>
Cross-merge networking fixes after downstream PR (net-6.13-rc7).

Conflicts:
  a42d71e322a8 ("net_sched: sch_cake: Add drop reasons")
  737d4d91d35b ("sched: sch_cake: add bounds checks to host bulk flow fairness counts")

Adjacent changes:

drivers/net/ethernet/meta/fbnic/fbnic.h
  3a856ab34726 ("eth: fbnic: add IRQ reuse support")
  95978931d55f ("eth: fbnic: Revert "eth: fbnic: Add hardware monitoring support via HWMON interface"")

Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>netdev: prevent accessing NAPI instances from another namespace</title>
<updated>2025-01-08T18:21:00Z</updated>
<author>
<name>Jakub Kicinski</name>
<email>kuba@kernel.org</email>
</author>
<published>2025-01-06T18:01:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d1cacd74776895f6435941f86a1130e58f6dd226'/>
<id>urn:sha1:d1cacd74776895f6435941f86a1130e58f6dd226</id>
<content type='text'>
The NAPI IDs were not fully exposed to user space prior to the netlink
API, so they were never namespaced. The netlink API must ensure that
at the very least NAPI instance belongs to the same netns as the owner
of the genl sock.

napi_by_id() can become static now, but it needs to move because of
dev_get_by_napi_id().

Cc: stable@vger.kernel.org
Fixes: 1287c1ae0fc2 ("netdev-genl: Support setting per-NAPI config values")
Fixes: 27f91aaf49b3 ("netdev-genl: Add netlink framework functions for napi")
Reviewed-by: Sridhar Samudrala &lt;sridhar.samudrala@intel.com&gt;
Reviewed-by: Joe Damato &lt;jdamato@fastly.com&gt;
Link: https://patch.msgid.link/20250106180137.1861472-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: Make net_hwtstamp_validate accessible</title>
<updated>2024-12-16T12:51:40Z</updated>
<author>
<name>Kory Maincent</name>
<email>kory.maincent@bootlin.com</email>
</author>
<published>2024-12-12T17:06:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b18fe47c0c093cc429f7e4d7694fdf0fc362aaf5'/>
<id>urn:sha1:b18fe47c0c093cc429f7e4d7694fdf0fc362aaf5</id>
<content type='text'>
Make the net_hwtstamp_validate function accessible in prevision to use
it from ethtool to validate the hwtstamp configuration before setting it.

Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Kory Maincent &lt;kory.maincent@bootlin.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Make dev_get_hwtstamp_phylib accessible</title>
<updated>2024-12-16T12:51:40Z</updated>
<author>
<name>Kory Maincent</name>
<email>kory.maincent@bootlin.com</email>
</author>
<published>2024-12-12T17:06:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5e51e50e2324c9374d06ab05e3d7d09123e1114f'/>
<id>urn:sha1:5e51e50e2324c9374d06ab05e3d7d09123e1114f</id>
<content type='text'>
Make the dev_get_hwtstamp_phylib function accessible in prevision to use
it from ethtool to read the hwtstamp current configuration.

Reviewed-by: Florian Fainelli &lt;florian.fainelli@broadcom.com&gt;
Reviewed-by: Jacob Keller &lt;jacob.e.keller@intel.com&gt;
Signed-off-by: Kory Maincent &lt;kory.maincent@bootlin.com&gt;
Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;
</content>
</entry>
<entry>
<title>net: Add napi_struct parameter irq_suspend_timeout</title>
<updated>2024-11-12T02:45:05Z</updated>
<author>
<name>Martin Karsten</name>
<email>mkarsten@uwaterloo.ca</email>
</author>
<published>2024-11-09T05:02:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5dc51ec86df6e2214d8398079c1e31736593ab53'/>
<id>urn:sha1:5dc51ec86df6e2214d8398079c1e31736593ab53</id>
<content type='text'>
Add a per-NAPI IRQ suspension parameter, which can be get/set with
netdev-genl.

This patch doesn't change any behavior but prepares the code for other
changes in the following commits which use irq_suspend_timeout as a
timeout for IRQ suspension.

Signed-off-by: Martin Karsten &lt;mkarsten@uwaterloo.ca&gt;
Co-developed-by: Joe Damato &lt;jdamato@fastly.com&gt;
Signed-off-by: Joe Damato &lt;jdamato@fastly.com&gt;
Tested-by: Joe Damato &lt;jdamato@fastly.com&gt;
Tested-by: Martin Karsten &lt;mkarsten@uwaterloo.ca&gt;
Acked-by: Stanislav Fomichev &lt;sdf@fomichev.me&gt;
Reviewed-by: Sridhar Samudrala &lt;sridhar.samudrala@intel.com&gt;
Link: https://patch.msgid.link/20241109050245.191288-2-jdamato@fastly.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>net: napi: Add napi_config</title>
<updated>2024-10-15T00:54:29Z</updated>
<author>
<name>Joe Damato</name>
<email>jdamato@fastly.com</email>
</author>
<published>2024-10-11T18:45:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=86e25f40aa1e9e54e081e55016f65b5c92523989'/>
<id>urn:sha1:86e25f40aa1e9e54e081e55016f65b5c92523989</id>
<content type='text'>
Add a persistent NAPI config area for NAPI configuration to the core.
Drivers opt-in to setting the persistent config for a NAPI by passing an
index when calling netif_napi_add_config.

napi_config is allocated in alloc_netdev_mqs, freed in free_netdev
(after the NAPIs are deleted).

Drivers which call netif_napi_add_config will have persistent per-NAPI
settings: NAPI IDs, gro_flush_timeout, and defer_hard_irq settings.

Per-NAPI settings are saved in napi_disable and restored in napi_enable.

Co-developed-by: Martin Karsten &lt;mkarsten@uwaterloo.ca&gt;
Signed-off-by: Martin Karsten &lt;mkarsten@uwaterloo.ca&gt;
Signed-off-by: Joe Damato &lt;jdamato@fastly.com&gt;
Reviewed-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
Reviewed-by: Eric Dumazet &lt;edumazet@google.com&gt;
Link: https://patch.msgid.link/20241011184527.16393-6-jdamato@fastly.com
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
</feed>
