[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<CY5PR21MB34476DA4115A6C5D6B76E12DCAEBA@CY5PR21MB3447.namprd21.prod.outlook.com>
Date: Tue, 14 Oct 2025 14:11:24 +0000
From: Haiyang Zhang <haiyangz@...rosoft.com>
To: Andrew Lunn <andrew@...n.ch>
CC: Haiyang Zhang <haiyangz@...ux.microsoft.com>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>, Paul Rosswurm
<paulros@...rosoft.com>, Dexuan Cui <DECUI@...rosoft.com>, KY Srinivasan
<kys@...rosoft.com>, "wei.liu@...nel.org" <wei.liu@...nel.org>,
"edumazet@...gle.com" <edumazet@...gle.com>, "davem@...emloft.net"
<davem@...emloft.net>, "kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>, Long Li <longli@...rosoft.com>,
"ssengar@...ux.microsoft.com" <ssengar@...ux.microsoft.com>,
"ernis@...ux.microsoft.com" <ernis@...ux.microsoft.com>,
"dipayanroy@...ux.microsoft.com" <dipayanroy@...ux.microsoft.com>, Konstantin
Taranov <kotaranov@...rosoft.com>, "horms@...nel.org" <horms@...nel.org>,
"shradhagupta@...ux.microsoft.com" <shradhagupta@...ux.microsoft.com>,
"leon@...nel.org" <leon@...nel.org>, "mlevitsk@...hat.com"
<mlevitsk@...hat.com>, "yury.norov@...il.com" <yury.norov@...il.com>, Shiraz
Saleem <shirazsaleem@...rosoft.com>, "andrew+netdev@...n.ch"
<andrew+netdev@...n.ch>, "linux-rdma@...r.kernel.org"
<linux-rdma@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [EXTERNAL] Re: [PATCH net-next] net: mana: Support HW link state
events
> -----Original Message-----
> From: Andrew Lunn <andrew@...n.ch>
> Sent: Monday, October 13, 2025 7:22 PM
> To: Haiyang Zhang <haiyangz@...rosoft.com>
> Cc: Haiyang Zhang <haiyangz@...ux.microsoft.com>; linux-
> hyperv@...r.kernel.org; netdev@...r.kernel.org; Paul Rosswurm
> <paulros@...rosoft.com>; Dexuan Cui <decui@...rosoft.com>; KY Srinivasan
> <kys@...rosoft.com>; wei.liu@...nel.org; edumazet@...gle.com;
> davem@...emloft.net; kuba@...nel.org; pabeni@...hat.com; Long Li
> <longli@...rosoft.com>; ssengar@...ux.microsoft.com;
> ernis@...ux.microsoft.com; dipayanroy@...ux.microsoft.com; Konstantin
> Taranov <kotaranov@...rosoft.com>; horms@...nel.org;
> shradhagupta@...ux.microsoft.com; leon@...nel.org; mlevitsk@...hat.com;
> yury.norov@...il.com; Shiraz Saleem <shirazsaleem@...rosoft.com>;
> andrew+netdev@...n.ch; linux-rdma@...r.kernel.org; linux-
> kernel@...r.kernel.org
> Subject: Re: [EXTERNAL] Re: [PATCH net-next] net: mana: Support HW link
> state events
>
> > > > + if (link_up) {
> > > > + netif_carrier_on(ndev);
> > > > +
> > > > + if (apc->port_is_up)
> > > > + netif_tx_wake_all_queues(ndev);
> > > > +
> > > > + __netdev_notify_peers(ndev);
> > > > + } else {
> > > > + if (netif_carrier_ok(ndev)) {
> > > > + netif_tx_disable(ndev);
> > > > + netif_carrier_off(ndev);
> > > > + }
> > > > + }
> > >
> > > It is odd this is asymmetric. Up and down should really be opposites.
> > For the up event, we need to delay the wake up queues if the
> > mana_close() is called, or mana_open() isn't called yet.
> >
> > Also, we notify peers only when link up.
>
> But why is this not symmetric?
>
> On down, if port_is_up is not true, there is no need to disable tx and
> set the carrier off. There are also counters associated with
> netif_carrier_off() and netif_carrier_on(), and if you don't call them
> in symmetric pairs, the counters are going to look odd.
I see. Will update the patch.
Thanks,
- Haiyang
Powered by blists - more mailing lists