[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <PH7PR21MB32639AE0E4B6ABEED6419FBACECE9@PH7PR21MB3263.namprd21.prod.outlook.com>
Date: Tue, 17 May 2022 23:39:33 +0000
From: Long Li <longli@...rosoft.com>
To: Stephen Hemminger <stephen@...workplumber.org>,
"longli@...uxonhyperv.com" <longli@...uxonhyperv.com>
CC: KY Srinivasan <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>, Dexuan Cui <decui@...rosoft.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Jason Gunthorpe <jgg@...pe.ca>,
Leon Romanovsky <leon@...nel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
Subject: RE: [PATCH 03/12] net: mana: Handle vport sharing between devices
> Subject: Re: [PATCH 03/12] net: mana: Handle vport sharing between devices
>
> On Tue, 17 May 2022 02:04:27 -0700
> longli@...uxonhyperv.com wrote:
>
> > diff --git a/drivers/net/ethernet/microsoft/mana/mana.h
> b/drivers/net/ethernet/microsoft/mana/mana.h
> > index 51bff91b63ee..26f14fcb6a61 100644
> > --- a/drivers/net/ethernet/microsoft/mana/mana.h
> > +++ b/drivers/net/ethernet/microsoft/mana/mana.h
> > @@ -375,6 +375,7 @@ struct mana_port_context {
> > unsigned int num_queues;
> >
> > mana_handle_t port_handle;
> > + atomic_t port_use_count;
>
> Could this be a refcount_t instead?
> The refcount_t has protections against under/overflow.
Thanks for pointing this out. I will use refcount_t for v2.
Long
Powered by blists - more mailing lists