]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
[IBAL] ib_modify_ca: trap invalid capability modifications.
authorftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 11 Sep 2006 17:11:46 +0000 (17:11 +0000)
committerftillier <ftillier@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Mon, 11 Sep 2006 17:11:46 +0000 (17:11 +0000)
Initially submitted by Leonid Keller (leonid@mellanox.co.il),
with changes by Fab Tillier (ftillier@silverstorm.com)

git-svn-id: svn://openib.tc.cornell.edu/gen1@490 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/core/al/al_ca.c
trunk/inc/iba/ib_types.h

index efc3445e15daecb057b7d5671f9d478c4cb04718..9bfe173fe39c45de0bca089bc4885550a47d6faa 100644 (file)
@@ -300,7 +300,7 @@ ib_modify_ca(
                AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("IB_INVALID_CA_HANDLE\n") );\r
                return IB_INVALID_CA_HANDLE;\r
        }\r
-       if( !p_port_attr_mod )\r
+       if( !p_port_attr_mod || (ca_mod & IB_CA_MOD_RESERVED_MASK) )\r
        {\r
                AL_PRINT_EXIT( TRACE_LEVEL_ERROR, AL_DBG_ERROR, ("IB_INVALID_PARAMETER\n") );\r
                return IB_INVALID_PARAMETER;\r
index a23d7dc922de5f0fe488c1d0d45ef78f32eb1b9f..55ecc8086697dc023986be563c22e54e6da5bef6 100644 (file)
@@ -9462,7 +9462,8 @@ typedef uint32_t                                                  ib_ca_mod_t;
 #define IB_CA_MOD_SHUTDOWN_PORT                                0x00100000\r
 #define IB_CA_MOD_INIT_TYPE_VALUE                      0x00200000\r
 #define IB_CA_MOD_SYSTEM_IMAGE_GUID                    0x00400000\r
-#define IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED       0x00800000\r
+#define IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED       0x00800000\r
+#define IB_CA_MOD_RESERVED_MASK                                0xFF000000\r
 /*\r
 * VALUES\r
 *      IB_CA_MOD_IS_CM_SUPPORTED\r
@@ -9545,6 +9546,9 @@ typedef uint32_t                                                  ib_ca_mod_t;
 *      IB_CA_MOD_IS_CLIENT_REREGISTER_SUPPORTED\r
 *              Used to modify the system image GUID for the port.\r
 *\r
+*      IB_CA_MOD_RESERVED_MASK\r
+*              Mask of all the reserved bits.  If any of these bits are set\r
+*              ib_modify_ca will return IB_INVALID_PARAMETER.\r
 *****/\r
 \r
 \r