Re: [PATCH rdma-next V2 6/6] RDMA/core: Unify style of IOCTL commands

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

 



On Wed, 2016-08-24 at 00:31 +0300, Leon Romanovsky wrote:
> From: Leon Romanovsky <leonro@xxxxxxxxxxxx>
> 
> -#define HFI1_CMD_ASSIGN_CTXT     1	/* allocate HFI and
> context */
> -#define HFI1_CMD_CTXT_INFO       2	/* find out what resources
> we got */
> -#define HFI1_CMD_USER_INFO       3	/* set up userspace */
> -#define HFI1_CMD_TID_UPDATE      4	/* update expected TID
> entries */
> -#define HFI1_CMD_TID_FREE        5	/* free expected TID
> entries */
> -#define HFI1_CMD_CREDIT_UPD      6	/* force an update of PIO
> credit */
> +/* allocate HFI and context */
> +#define HFI1_CMD_ASSIGN_CTXT     (HFI1_CMD_BASE + 0x01)
> +/* find out what resources we got */
> +#define HFI1_CMD_CTXT_INFO       (HFI1_CMD_BASE + 0x02)
> +/* set up userspace */
> +#define HFI1_CMD_USER_INFO       (HFI1_CMD_BASE + 0x03)
> +/* update expected TID entries */
> +#define HFI1_CMD_TID_UPDATE      (HFI1_CMD_BASE + 0x04)
> +/* free expected TID entries */
> +#define HFI1_CMD_TID_FREE        (HFI1_CMD_BASE + 0x05)
> +/* force an update of PIO credit */
> +#define HFI1_CMD_CREDIT_UPD      (HFI1_CMD_BASE + 0x06)

This is a minor issue, but the problem here is when we build PSM
against this kernel it will no longer work for older kernels because
the value of HFI1_CMD_ASSIGN_CTXT has changed where as it used to be 1.
Right now PSM is backwards compatible, this breaks that compatibility.

So while no one uses the __NUM() macro directly it lets us not change
the PSM command values. Can we put that part back and keep the command
values unchanged?

-Denny
��.n��������+%������w��{.n�����{���fk��ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f




[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