netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Doug Ledford <dledford@redhat.com>
To: David Ahern <dsahern@gmail.com>,
	Steve Wise <swise@opengridcomputing.com>,
	leon@kernel.org
Cc: stephen@networkplumber.org, netdev@vger.kernel.org,
	linux-rdma@vger.kernel.org
Subject: Re: [PATCH v2 iproute2-next 1/3] rdma: update rdma_netlink.h to get new driver attributes
Date: Tue, 15 May 2018 15:47:41 -0400	[thread overview]
Message-ID: <eb6edd23b76a176b876002cc19c546a0669cf66f.camel@redhat.com> (raw)
In-Reply-To: <f419f21a-d57d-ba6c-419e-4fdf24eaa662@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2540 bytes --]

On Tue, 2018-05-15 at 13:37 -0600, David Ahern wrote:
> On 5/14/18 9:42 AM, Steve Wise wrote:
> > diff --git a/rdma/include/uapi/rdma/rdma_netlink.h b/rdma/include/uapi/rdma/rdma_netlink.h
> > index 60416ed..40be0d8 100644
> > --- a/rdma/include/uapi/rdma/rdma_netlink.h
> > +++ b/rdma/include/uapi/rdma/rdma_netlink.h
> > @@ -249,10 +249,22 @@ enum rdma_nldev_command {
> >  	RDMA_NLDEV_NUM_OPS
> >  };
> >  
> > +enum {
> > +	RDMA_NLDEV_ATTR_ENTRY_STRLEN = 16,
> > +};
> > +
> > +enum rdma_nldev_print_type {
> > +	RDMA_NLDEV_PRINT_TYPE_UNSPEC,
> > +	RDMA_NLDEV_PRINT_TYPE_HEX,
> > +};
> > +
> >  enum rdma_nldev_attr {
> >  	/* don't change the order or add anything between, this is ABI! */
> 
> I asked this before and did not get a response. As the comment above
> states with an emphasis (!) ...
> 
> >  	RDMA_NLDEV_ATTR_UNSPEC,
> >  
> > +	/* Pad attribute for 64b alignment */
> > +	RDMA_NLDEV_ATTR_PAD = RDMA_NLDEV_ATTR_UNSPEC,
> > +
> 
> ... are you really adding new attributes in the middle?

Not really.  The new item is being explicitly set to the same value as
the item above it.  It therefore becomes two entries with the same enum
value.  The rest of the enum is all unchanged.

> >  	/* Identifier for ib_device */
> >  	RDMA_NLDEV_ATTR_DEV_INDEX,		/* u32 */
> >  
> > @@ -387,6 +399,20 @@ enum rdma_nldev_attr {
> >  	RDMA_NLDEV_ATTR_RES_PD_ENTRY,		/* nested table */
> >  	RDMA_NLDEV_ATTR_RES_LOCAL_DMA_LKEY,	/* u32 */
> >  	RDMA_NLDEV_ATTR_RES_UNSAFE_GLOBAL_RKEY,	/* u32 */
> > +	/*
> > +	 * driver-specific attributes.
> > +	 */
> > +	RDMA_NLDEV_ATTR_DRIVER,			/* nested table */
> > +	RDMA_NLDEV_ATTR_DRIVER_ENTRY,		/* nested table */
> > +	RDMA_NLDEV_ATTR_DRIVER_STRING,		/* string */
> > +	/*
> > +	 * u8 values from enum rdma_nldev_print_type
> > +	 */
> > +	RDMA_NLDEV_ATTR_DRIVER_PRINT_TYPE,	/* u8 */
> > +	RDMA_NLDEV_ATTR_DRIVER_S32,		/* s32 */
> > +	RDMA_NLDEV_ATTR_DRIVER_U32,		/* u32 */
> > +	RDMA_NLDEV_ATTR_DRIVER_S64,		/* s64 */
> > +	RDMA_NLDEV_ATTR_DRIVER_U64,		/* u64 */
> 
> and again here.
> 
> >  
> >  	/*
> >  	 * Provides logical name and index of netdevice which is
> > 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Doug Ledford <dledford@redhat.com>
    GPG KeyID: B826A3330E572FDD
    Key fingerprint = AE6B 1BDA 122B 23B4 265B  1274 B826 A333 0E57 2FDD

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-05-15 19:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-14 15:43 [PATCH v2 iproute2-next 0/3] RDMA tool driver-specific resource tracking Steve Wise
2018-05-14 15:42 ` [PATCH v2 iproute2-next 1/3] rdma: update rdma_netlink.h to get new driver attributes Steve Wise
2018-05-15 19:37   ` David Ahern
2018-05-15 19:47     ` Doug Ledford [this message]
2018-05-15 19:53       ` David Ahern
2018-05-15 20:00         ` Doug Ledford
2018-05-15 20:01           ` David Ahern
2018-05-15 20:05             ` Doug Ledford
2018-05-15 20:29             ` Steve Wise
2018-05-15 20:25       ` Steve Wise
2018-05-15 19:52     ` Doug Ledford
2018-05-15 20:28       ` Steve Wise
2018-05-15 20:39         ` Doug Ledford
2018-05-14 15:42 ` [PATCH v2 iproute2-next 2/3] rdma: print driver resource attributes Steve Wise
2018-05-14 15:42 ` [PATCH v2 iproute2-next 3/3] rdma: update man pages Steve Wise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb6edd23b76a176b876002cc19c546a0669cf66f.camel@redhat.com \
    --to=dledford@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    --cc=swise@opengridcomputing.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).