[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z4CxKV5AnfDPRfaF@pop-os.localdomain>
Date: Thu, 9 Jan 2025 21:33:29 -0800
From: Cong Wang <xiyou.wangcong@...il.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>,
netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH net-next] net: sched: calls synchronize_net() only when
needed
On Thu, Jan 09, 2025 at 05:18:50PM +0000, Eric Dumazet wrote:
> dev_deactivate_many() role is to remove the qdiscs
> of a network device.
>
> When/if a qdisc is dismantled, an rcu grace period
> is needed to make sure all outstanding qdisc enqueue
> are done before we proceed with a qdisc reset.
>
> Most virtual devices do not have a qdisc (if we exclude
> noqueue ones).
Such as? To me, most virtual devices use noqueue:
$ git grep IFF_NO_QUEUE -- drivers/net/
drivers/net/amt.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/bareudp.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/bonding/bond_main.c: bond_dev->priv_flags |= IFF_BONDING | IFF_UNICAST_FLT | IFF_NO_QUEUE;
drivers/net/caif/caif_serial.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/dummy.c: dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c: netdev->priv_flags |= IFF_NO_QUEUE | IFF_DISABLE_NETPOLL;
drivers/net/geneve.c: dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
drivers/net/gtp.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/ipvlan/ipvlan_main.c: dev->priv_flags |= IFF_UNICAST_FLT | IFF_NO_QUEUE;
drivers/net/ipvlan/ipvtap.c: dev->priv_flags &= ~IFF_NO_QUEUE;
drivers/net/loopback.c: dev->priv_flags |= IFF_LIVE_ADDR_CHANGE | IFF_NO_QUEUE;
drivers/net/macsec.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/macvlan.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/net_failover.c: failover_dev->priv_flags |= IFF_UNICAST_FLT | IFF_NO_QUEUE;
drivers/net/netdevsim/netdev.c: IFF_NO_QUEUE;
drivers/net/netkit.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/nlmon.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/pfcp.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/team/team_core.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/veth.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/vrf.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/vsockmon.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/vxlan/vxlan_core.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/wan/hdlc_fr.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/wireguard/device.c: dev->priv_flags |= IFF_NO_QUEUE;
drivers/net/wireless/virtual/mac80211_hwsim.c: dev->priv_flags |= IFF_NO_QUEUE;
And noqueue_qdisc_ops sets ->enqueue to noop_enqueue():
struct Qdisc_ops noqueue_qdisc_ops __read_mostly = {
.id = "noqueue",
.priv_size = 0,
.init = noqueue_init,
.enqueue = noop_enqueue,
.dequeue = noop_dequeue,
.peek = noop_dequeue,
.owner = THIS_MODULE,
};
Thanks.
Powered by blists - more mailing lists