Re: [PATCH rdma-next 10/15] IB/mlx5: Add implementation for create and destroy action_xfrm

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

 



On 27/03/2018 05:05, Jason Gunthorpe wrote:
On Tue, Mar 20, 2018 at 03:01:41PM +0200, Leon Romanovsky wrote:

+#include <rdma/ib_user_ioctl_cmds.h>
+
+enum mlx5_ib_create_flow_action_attrs {
+	/* This attribute belong to the driver namespace */
+	MLX5_IB_ATTR_CREATE_FLOW_ACTION_FLAGS = (1U << UVERBS_ID_NS_SHIFT),
+};

This overlaps with UVERBS_ATTR_UHW_IN, so no.. There is special global
support for UVERBS_ATTR_UHW_IN/OUT meaning those attribute ID numbers
should not be re-used.

Instead we need to add a constant
  UVERBS_ATTR_DRV_START = UVERBS_ATTR_UHW_OUT+1
and use that..


I think UVERBS_ATTR_UHW_IN and UVERBS_ATTR_UHW_OUT attributes should be reserved for methods that were migrated from the write() to ioctl() infrastructure. I don't see any valid reason to reserve them for ioctl() only commands or for new provider driver methods.

In the flow action case, this is a new method that is ioctl() only.

Also, I think the spec macros should prevent this mistake.

Jason


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