netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V4 net-next 0/3] virtio-net: synchronize op/admin state
@ 2024-07-31  2:59 Jason Wang
  2024-07-31  2:59 ` [PATCH V4 net-next 1/3] virtio: rename virtio_config_enabled to virtio_config_core_enabled Jason Wang
                   ` (2 more replies)
  0 siblings, 3 replies; 16+ messages in thread
From: Jason Wang @ 2024-07-31  2:59 UTC (permalink / raw)
  To: mst, jasowang, xuanzhuo, eperezma, davem, edumazet, kuba, pabeni,
	virtualization, netdev, linux-kernel

Hi All:

This series tries to synchronize the operstate with the admin state
which allows the lower virtio-net to propagate the link status to the
upper devices like macvlan.

This is done by toggling carrier during ndo_open/stop while doing
other necessary serialization about the carrier settings during probe.

Changes since V3:

- when driver tries to enable config interrupt, check pending
  interrupt and execute the nofitication change callback if necessary
- do not unconditonally trigger the config space read
- do not set LINK_UP flag in ndo_open/close but depends on the
  notification change
- disable config change notification until ndo_open()
- read the link status under the rtnl_lock() to prevent a race with
  ndo_open()

Changes since V2:

- introduce config_driver_disabled and helpers
- schedule config change work unconditionally

Thanks

Jason Wang (3):
  virtio: rename virtio_config_enabled to virtio_config_core_enabled
  virtio: allow driver to disable the configure change notification
  virtio-net: synchronize operstate with admin state on up/down

 drivers/net/virtio_net.c | 84 ++++++++++++++++++++++++++--------------
 drivers/virtio/virtio.c  | 59 +++++++++++++++++++++-------
 include/linux/virtio.h   | 11 +++++-
 3 files changed, 109 insertions(+), 45 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2024-08-02  2:48 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-31  2:59 [PATCH V4 net-next 0/3] virtio-net: synchronize op/admin state Jason Wang
2024-07-31  2:59 ` [PATCH V4 net-next 1/3] virtio: rename virtio_config_enabled to virtio_config_core_enabled Jason Wang
2024-07-31  2:59 ` [PATCH V4 net-next 2/3] virtio: allow driver to disable the configure change notification Jason Wang
2024-07-31  2:59 ` [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down Jason Wang
2024-07-31 21:25   ` Michael S. Tsirkin
2024-08-01  2:16     ` Jason Wang
2024-08-01  5:58       ` Michael S. Tsirkin
2024-08-01  6:13         ` Jason Wang
2024-08-01  6:41           ` Michael S. Tsirkin
2024-08-01  6:55             ` Jason Wang
2024-08-01  7:00               ` Michael S. Tsirkin
2024-08-02  2:47                 ` Jason Wang
2024-08-01  6:05   ` Michael S. Tsirkin
2024-08-01  6:13     ` Jason Wang
2024-08-01  6:42       ` Michael S. Tsirkin
2024-08-01  6:55         ` Jason Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).