linux/net/core
Maxime Chevallier 02018c544e net: phy: Introduce ethernet link topology representation
Link topologies containing multiple network PHYs attached to the same
net_device can be found when using a PHY as a media converter for use
with an SFP connector, on which an SFP transceiver containing a PHY can
be used.

With the current model, the transceiver's PHY can't be used for
operations such as cable testing, timestamping, macsec offload, etc.

The reason being that most of the logic for these configuration, coming
from either ethtool netlink or ioctls tend to use netdev->phydev, which
in multi-phy systems will reference the PHY closest to the MAC.

Introduce a numbering scheme allowing to enumerate PHY devices that
belong to any netdev, which can in turn allow userspace to take more
precise decisions with regard to each PHY's configuration.

The numbering is maintained per-netdev, in a phy_device_list.
The numbering works similarly to a netdevice's ifindex, with
identifiers that are only recycled once INT_MAX has been reached.

This prevents races that could occur between PHY listing and SFP
transceiver removal/insertion.

The identifiers are assigned at phy_attach time, as the numbering
depends on the netdevice the phy is attached to.

Signed-off-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2024-01-01 18:38:56 +00:00
..
bpf_sk_storage.c net: Namespace-ify sysctl_optmem_max 2023-12-15 11:01:27 +00:00
datagram.c
dev.c net: phy: Introduce ethernet link topology representation 2024-01-01 18:38:56 +00:00
dev.h net: core: synchronize link-watch when carrier is queried 2023-12-05 20:16:45 -08:00
dev_addr_lists.c
dev_addr_lists_test.c net: fill in MODULE_DESCRIPTION()s under net/core 2023-10-28 11:29:27 +01:00
dev_ioctl.c net: partial revert of the "Make timestamping selectable: series 2023-11-18 18:42:37 -08:00
drop_monitor.c genetlink: Use internal flags for multicast groups 2023-12-29 08:43:59 +00:00
dst.c
dst_cache.c
failover.c
fib_notifier.c
fib_rules.c
filter.c Revert BPF token-related functionality 2023-12-19 08:23:03 -08:00
flow_dissector.c
flow_offload.c
gen_estimator.c
gen_stats.c
gro.c
gro_cells.c
gso.c
gso_test.c net: gso_test: support CONFIG_MAX_SKB_FRAGS up to 45 2023-11-13 11:04:38 +00:00
hwbm.c
link_watch.c Revert "net: rtnetlink: remove local list in __linkwatch_run_queue()" 2023-12-11 10:57:16 +00:00
lwt_bpf.c
lwtunnel.c
Makefile net: page_pool: id the page pools 2023-11-28 15:48:39 +01:00
neighbour.c neighbour: Don't let neigh_forced_gc() disable preemption for long 2023-12-08 10:37:43 +00:00
net-procfs.c
net-sysfs.c net: sysfs: fix locking in carrier read 2023-12-08 16:10:17 -08:00
net-sysfs.h
net-traces.c
net_namespace.c net: Namespace-ify sysctl_optmem_max 2023-12-15 11:01:27 +00:00
netclassid_cgroup.c
netdev-genl-gen.c netdev-genl: spec: Extend netdev netlink spec in YAML for NAPI 2023-12-04 18:04:05 -08:00
netdev-genl-gen.h netdev-genl: spec: Extend netdev netlink spec in YAML for NAPI 2023-12-04 18:04:05 -08:00
netdev-genl.c netdev-genl: Add PID for the NAPI thread 2023-12-04 18:04:06 -08:00
netevent.c
netpoll.c
netprio_cgroup.c
of_net.c
page_pool.c page_pool: halve BIAS_MAX for multiple user references of a fragment 2023-12-17 10:56:33 +00:00
page_pool_priv.h net: page_pool: report when page pool was destroyed 2023-11-28 15:48:39 +01:00
page_pool_user.c net: page_pool: fix general protection fault in page_pool_unlist 2023-11-30 10:14:58 -08:00
pktgen.c net: pktgen: Use wait_event_freezable_timeout() for freezable kthread 2023-12-27 14:34:52 +00:00
ptp_classifier.c
request_sock.c
rtnetlink.c rtnetlink: bridge: Enable MDB bulk deletion 2023-12-20 11:27:21 +00:00
scm.c io_uring/af_unix: disable sending io_uring over sockets 2023-12-09 21:20:33 +00:00
secure_seq.c
selftests.c net: fill in MODULE_DESCRIPTION()s under net/core 2023-10-28 11:29:27 +01:00
skbuff.c net: rename dsa_realloc_skb to skb_ensure_writable_head_tail 2023-12-27 13:08:09 +00:00
skmsg.c bpf, sockmap: af_unix stream sockets need to hold ref for pair sock 2023-11-30 00:25:16 +01:00
sock.c net: Namespace-ify sysctl_optmem_max 2023-12-15 11:01:27 +00:00
sock_destructor.h
sock_diag.c
sock_map.c bpf: syzkaller found null ptr deref in unix_bpf proto add 2023-12-13 16:32:28 -08:00
sock_reuseport.c
stream.c net: Return error from sk_stream_wait_connect() if sk_wait_event() fails 2023-12-15 10:48:51 +00:00
sysctl_net_core.c net: Namespace-ify sysctl_optmem_max 2023-12-15 11:01:27 +00:00
timestamping.c net: partial revert of the "Make timestamping selectable: series 2023-11-18 18:42:37 -08:00
tso.c
utils.c
xdp.c xdp: Add VLAN tag hint 2023-12-13 16:16:40 -08:00