Re: [PATCH rdma-core 1/2] verbs: Change ioctl uapi header files

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

 



On 3/14/2018 7:18 PM, Jason Gunthorpe wrote:
On Wed, Mar 14, 2018 at 02:29:54PM +0200, Yishai Hadas wrote:
From: Matan Barak <matanb@xxxxxxxxxxxx>

The last ioctl series in the kernel changed the uAPI header.
After this change, the headers are split to two files:
1. ib_user_ioctl_cmds.h
    Represents enums for commands. This should be used internally
    in order to form ioctl() commands.
2. rdma_user_ioctl_verbs.h
    Generic ioctl command headers

Names were changed too in order to clearly mark which enums and
structs are used internally and which are used by applications.
In addition, each element is clearly named with its role.

This synchronize the user-space with the following kernel commit:
("IB/uverbs: Move to new headers and make naming consistent")

So these updates are suppposed to copy all the headers from the
kernel. The chance we get out of sync is much higher if stuff is
cherry-picked like this. But since things are so very complicated
right now, we can relax that a bit..

This is also out of order with the driver_id stuff, since this series
adds the field but leaves it filled with garbage:

@@ -126,7 +128,8 @@ int execute_ioctl(struct ibv_context *context, struct ibv_command_buffer *cmd)
  	prepare_attrs(cmd);
  	cmd->hdr.length = sizeof(cmd->hdr) +
  		sizeof(cmd->hdr.attrs[0]) * cmd->hdr.num_attrs;
-	cmd->hdr.reserved = 0;
+	cmd->hdr.reserved1 = 0;
+	cmd->hdr.reserved2 = 0;

Either do the driver_id series first (preferred) or zero it here.

I have updated the PR with the second option to set as zero in the first patch.

I preferred this option as it touches the uAPI only once as part of the first patch which its target was to sync rdma-core with the latest kernel changes around this area.


--
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