]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Add support for the Linux ioctl IB_USER_MAD_ENABLE_PKEY
authorBart Van Assche <bvanassche@acm.org>
Thu, 14 Feb 2013 17:10:01 +0000 (17:10 +0000)
committerBart Van Assche <bvanassche@acm.org>
Thu, 14 Feb 2013 17:10:01 +0000 (17:10 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13287

coregrind/m_syswrap/syswrap-linux.c
include/vki/vki-linux.h

index b2f1f3392389bea04f89bede1de2dade4b100057..46bc7361fe3422d73454e396d23b1d48dfa9ec06 100644 (file)
@@ -4797,6 +4797,9 @@ PRE(sys_ioctl)
    /* User input device creation */
    case VKI_UI_DEV_CREATE:
    case VKI_UI_DEV_DESTROY:
+
+   /* InfiniBand */
+   case VKI_IB_USER_MAD_ENABLE_PKEY:
       PRINT("sys_ioctl ( %ld, 0x%lx )",ARG1,ARG2);
       PRE_REG_READ2(long, "ioctl",
                     unsigned int, fd, unsigned int, request);
@@ -6237,6 +6240,7 @@ POST(sys_ioctl)
    case VKI_TCSETS:
    case VKI_TCSETSW:
    case VKI_TCSETSF:
+   case VKI_IB_USER_MAD_ENABLE_PKEY:
       break; 
    case VKI_TCGETS:
       POST_MEM_WRITE( ARG3, sizeof(struct vki_termios) );
index 9e0991fd553d85ded1a39279d32f1c30f298bccd..f789aa783715d0f9a57eb9d17d7b112f65ac2309 100644 (file)
@@ -3014,6 +3014,19 @@ struct vki_hwtstamp_config {
 #define VKI_UI_SET_SWBIT               _VKI_IOW(VKI_UINPUT_IOCTL_BASE, 109, int)
 #define VKI_UI_SET_PROPBIT             _VKI_IOW(VKI_UINPUT_IOCTL_BASE, 110, int)
 
+//----------------------------------------------------------------------
+// From linux-2.6/include/uapi/rdma/ib_user_mad.h
+//----------------------------------------------------------------------
+
+#define VKI_IB_IOCTL_MAGIC          0x1b
+
+#define VKI_IB_USER_MAD_REGISTER_AGENT    _VKI_IOWR(VKI_IB_IOCTL_MAGIC, 1, \
+                                              struct ib_user_mad_reg_req)
+
+#define VKI_IB_USER_MAD_UNREGISTER_AGENT  _VKI_IOW(VKI_IB_IOCTL_MAGIC, 2, __u32)
+
+#define VKI_IB_USER_MAD_ENABLE_PKEY       _VKI_IO(VKI_IB_IOCTL_MAGIC, 3)
+
 //----------------------------------------------------------------------
 // Xen privcmd IOCTL
 //----------------------------------------------------------------------