Re: [PATCH rdma/wip/jgg-for-next] RDMA/netlink: Hide unimplemented NLDEV commands

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jan 30, 2018 at 07:18:14PM +0100, Jiri Pirko wrote:
> Tue, Jan 30, 2018 at 05:03:37PM CET, jgg@xxxxxxxx wrote:
> >On Tue, Jan 30, 2018 at 04:57:06PM +0100, Jiri Pirko wrote:
> >> Tue, Jan 30, 2018 at 04:07:16PM CET, leon@xxxxxxxxxx wrote:
> >> >From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >> >
> >> >The nldev was implemented by following devlink implementation,
> >> >including SET/DEL/NEW commands. However these commands were not
> >> >implemented and hence don't need to be exposed.
> >> >
> >> >Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> >> > include/uapi/rdma/rdma_netlink.h | 14 ++++++--------
> >> > 1 file changed, 6 insertions(+), 8 deletions(-)
> >> >
> >> >diff --git a/include/uapi/rdma/rdma_netlink.h b/include/uapi/rdma/rdma_netlink.h
> >> >index 17e59bec169e..4c77e2a7b07e 100644
> >> >+++ b/include/uapi/rdma/rdma_netlink.h
> >> >@@ -227,16 +227,14 @@ enum rdma_nldev_command {
> >> > 	RDMA_NLDEV_CMD_UNSPEC,
> >> >
> >> > 	RDMA_NLDEV_CMD_GET, /* can dump */
> >> >-	RDMA_NLDEV_CMD_SET,
> >> >-	RDMA_NLDEV_CMD_NEW,
> >> >-	RDMA_NLDEV_CMD_DEL,
> >> >
> >> >-	RDMA_NLDEV_CMD_PORT_GET, /* can dump */
> >> >-	RDMA_NLDEV_CMD_PORT_SET,
> >> >-	RDMA_NLDEV_CMD_PORT_NEW,
> >> >-	RDMA_NLDEV_CMD_PORT_DEL,
> >> >+	/* 2 - 4 are free to use */
> >> >
> >> >-	RDMA_NLDEV_CMD_RES_GET, /* can dump */
> >> >+	RDMA_NLDEV_CMD_PORT_GET = 5, /* can dump */
> >> >+
> >> >+	/* 6 - 8 are free to use */
> >> 
> >> I don't see reason for the wholes.
> >
> >We are stuck with the holes, it is fixed uABI at this point, can't
> >change the constants we actually implemented.
> 
> If it is realeased already, we can't remove the defines either.

We have been less absolute on the uapi headers causing compilation
breaks.

Using these headers is so hard, eg iproute and rdma-core take them
verbatim from the kernel and bundles them inside. So as a practical
matter, it is OK to sometimes cause compilation issues.

In this case there is no correct use of the constants since the
kernel never implemented them, any user is busted in some way and
should be reviewed.

Even glibc causes compilation breaks in new versions..

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux