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 Thu, 2016-09-01 at 10:46 -0600, Jason Gunthorpe wrote:
> On Thu, Sep 01, 2016 at 02:05:44PM +0000, Dalessandro, Dennis wrote:
> 
> > > +/* allocate HFI and context */
> > > +#define HFI1_CMD_ASSIGN_CTXT     (HFI1_CMD_BASE + 0x01)
> > 
> > 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.
> 
> What? Someone renumberd an ioctl? When? Why? How?

No ioctl number was still the same. It's the thing that is used to
define the ioctl number.

The ioctl was originally defined as:
_IOWR(RDMA_IOCTL_MAGIC, __NUM(ASSIGN_CTXT), struct hfi1_user_info)

Where __NUM(ASSIGN_CTXT) = HFI1_CMD_ASSIGN_CTXT + 0xE0 = 1 + 0xE0

It was changed to be:

_IOWR(RDMA_IOCTL_MAGIC, HFI1_CMD_ASSIGN_CTXT, struct hfi1_user_info)

Where HFI1_CMD_ASSIGN_CTXT = 0xE1.

So the ioctl number doens't change. The value of HFI1_CMD_ASSIGN_CTXT
does, it was 1 now it is 0xE1. HFI1_CMD_ASSIGN_CTXT is used by
userspace.

-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