[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170717183258.GI3259@mtr-leonro.local>
Date: Mon, 17 Jul 2017 21:32:58 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Dennis Dalessandro <dennis.dalessandro@...el.com>
Cc: Doug Ledford <dledford@...hat.com>, linux-rdma@...r.kernel.org,
Stephen Hemminger <stephen@...workplumber.org>,
Ariel Almog <ariela@...lanox.com>,
Linux Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH rdma-next V2 25/27] RDMA/netlink: Export LID mask counter
(LMC)
On Mon, Jul 17, 2017 at 11:14:28AM -0400, Dennis Dalessandro wrote:
> On 7/3/2017 2:28 AM, Leon Romanovsky wrote:
> > From: Leon Romanovsky <leonro@...lanox.com>
> >
> > Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
> > ---
> > drivers/infiniband/core/nldev.c | 3 +++
> > include/uapi/rdma/rdma_netlink.h | 5 +++++
> > 2 files changed, 8 insertions(+)
> >
> > diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
> > index ce733bf33ed9..f968a40ef5d3 100644
> > --- a/drivers/infiniband/core/nldev.c
> > +++ b/drivers/infiniband/core/nldev.c
> > @@ -47,6 +47,7 @@ static const struct nla_policy nldev_policy[RDMA_NLDEV_ATTR_MAX] = {
> > [RDMA_NLDEV_ATTR_SUBNET_PREFIX] = { .type = NLA_U64 },
> > [RDMA_NLDEV_ATTR_LID] = { .type = NLA_U32 },
> > [RDMA_NLDEV_ATTR_SM_LID] = { .type = NLA_U32 },
> > + [RDMA_NLDEV_ATTR_LMC] = { .type = NLA_U8 },
> > };
> > static int fill_dev_info(struct sk_buff *msg, struct ib_device *device)
> > @@ -109,6 +110,8 @@ static int fill_port_info(struct sk_buff *msg,
> > return -EMSGSIZE;
> > if (nla_put_u32(msg, RDMA_NLDEV_ATTR_SM_LID, attr.sm_lid))
> > return -EMSGSIZE;
> > + if (nla_put_u8(msg, RDMA_NLDEV_ATTR_LMC, attr.lmc))
> > + return -EMSGSIZE;
> > }
> > return 0;
> > }
> > diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
> > index 82e0d64346e1..d4b862e8ed15 100644
> > --- a/include/uapi/rdma/rdma_netlink.h
> > +++ b/include/uapi/rdma/rdma_netlink.h
> > @@ -292,6 +292,11 @@ enum rdma_nldev_attr {
> > RDMA_NLDEV_ATTR_LID, /* u32 */
> > RDMA_NLDEV_ATTR_SM_LID, /* u32 */
> > + /*
> > + * LID mask count (LMC)
> > + */
> > + RDMA_NLDEV_ATTR_LMC, /* u8 */
> > +
> > RDMA_NLDEV_ATTR_MAX
> > };
> > #endif /* _UAPI_RDMA_NETLINK_H */
> >
>
> LMC = "Counter" or "Control"? I always thought it was the latter.
You are right, it is control.
From spec:
LID Mask Control - A per-port value assigned by the Subnet Manager. The value of the LMC
specifies the number of Path Bits in the Local Identifier.
I don't know why I called it "counter".
It is wrong comment and not something else, so I'll wait till Doug's branches will be ready and send fix after that.
Thanks
>
> -Denny
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists