Whamcloud - gitweb
- convert the IOC_*_ROUTE constants to to NAL_CMDs so they are now
authorrread <rread>
Fri, 7 Nov 2003 18:09:56 +0000 (18:09 +0000)
committerrread <rread>
Fri, 7 Nov 2003 18:09:56 +0000 (18:09 +0000)
just integers and 64bit safe.

lnet/include/linux/kp30.h
lnet/libcfs/module.c
lnet/utils/portals.c
lustre/portals/include/linux/kp30.h
lustre/portals/libcfs/module.c
lustre/portals/utils/portals.c

index eaa7075..5bd7663 100644 (file)
@@ -1019,18 +1019,14 @@ static inline int portal_ioctl_getdata(char *buf, char *end, void *arg)
 #define IOC_PORTAL_CLEAR_DEBUG             _IOWR('e', 32, long)
 #define IOC_PORTAL_MARK_DEBUG              _IOWR('e', 33, long)
 #define IOC_PORTAL_PANIC                   _IOWR('e', 34, long)
-#define IOC_PORTAL_ADD_ROUTE               _IOWR('e', 35, long)
-#define IOC_PORTAL_DEL_ROUTE               _IOWR('e', 36, long)
-#define IOC_PORTAL_GET_ROUTE               _IOWR('e', 37, long)
-#define IOC_PORTAL_NAL_CMD                _IOWR('e', 38, long)
-#define IOC_PORTAL_GET_NID                 _IOWR('e', 39, long)
-#define IOC_PORTAL_FAIL_NID                _IOWR('e', 40, long)
-#define IOC_PORTAL_SET_DAEMON              _IOWR('e', 41, long)
-#define IOC_PORTAL_NOTIFY_ROUTER           _IOWR('e', 42, long)
-#define IOC_PORTAL_LWT_CONTROL             _IOWR('e', 43, long)
-#define IOC_PORTAL_LWT_SNAPSHOT            _IOWR('e', 44, long)
-#define IOC_PORTAL_LWT_LOOKUP_STRING       _IOWR('e', 45, long)
-#define IOC_PORTAL_MAX_NR                             45
+#define IOC_PORTAL_NAL_CMD                _IOWR('e', 35, long)
+#define IOC_PORTAL_GET_NID                 _IOWR('e', 36, long)
+#define IOC_PORTAL_FAIL_NID                _IOWR('e', 37, long)
+#define IOC_PORTAL_SET_DAEMON              _IOWR('e', 38, long)
+#define IOC_PORTAL_LWT_CONTROL             _IOWR('e', 39, long)
+#define IOC_PORTAL_LWT_SNAPSHOT            _IOWR('e', 40, long)
+#define IOC_PORTAL_LWT_LOOKUP_STRING       _IOWR('e', 41, long)
+#define IOC_PORTAL_MAX_NR                             41
 
 enum {
         QSWNAL  =  1,
@@ -1066,6 +1062,10 @@ extern ptl_handle_ni_t  kscimacnal_ni;
 #define NAL_CMD_ADD_AUTOCONN         106
 #define NAL_CMD_GET_AUTOCONN         107
 #define NAL_CMD_GET_TXDESC           108
+#define NAL_CMD_ADD_ROUTE            109
+#define NAL_CMD_DEL_ROUTE            110
+#define NAL_CMD_GET_ROUTE            111
+#define NAL_CMD_NOTIFY_ROUTER        112
 
 enum {
         DEBUG_DAEMON_START       =  1,
index a15ce6a..10e4060 100644 (file)
@@ -217,7 +217,7 @@ kportal_router_cmd(struct portals_cfg *pcfg, void * private)
         ENTRY;
 
         switch(pcfg->pcfg_command) {
-        case IOC_PORTAL_ADD_ROUTE:
+        case NAL_CMD_ADD_ROUTE:
                 CDEBUG(D_IOCTL, "Adding route: [%d] "LPU64" : "LPU64" - "LPU64"\n",
                        pcfg->pcfg_nal, pcfg->pcfg_nid, 
                        pcfg->pcfg_nid2, pcfg->pcfg_nid3);
@@ -225,7 +225,7 @@ kportal_router_cmd(struct portals_cfg *pcfg, void * private)
                                         pcfg->pcfg_nid2, pcfg->pcfg_nid3);
                 break;
 
-        case IOC_PORTAL_DEL_ROUTE:
+        case NAL_CMD_DEL_ROUTE:
                 CDEBUG (D_IOCTL, "Removing routes via [%d] "LPU64" : "LPU64" - "LPU64"\n",
                         pcfg->pcfg_nal, pcfg->pcfg_nid, 
                         pcfg->pcfg_nid2, pcfg->pcfg_nid3);
@@ -233,7 +233,7 @@ kportal_router_cmd(struct portals_cfg *pcfg, void * private)
                                          pcfg->pcfg_nid2, pcfg->pcfg_nid3);
                 break;
 
-        case IOC_PORTAL_NOTIFY_ROUTER: {
+        case NAL_CMD_NOTIFY_ROUTER: {
                 CDEBUG (D_IOCTL, "Notifying peer [%d] "LPU64" %s @ %ld\n",
                         pcfg->pcfg_nal, pcfg->pcfg_nid,
                         pcfg->pcfg_flags ? "Enabling" : "Disabling",
@@ -245,7 +245,7 @@ kportal_router_cmd(struct portals_cfg *pcfg, void * private)
                 break;
         }
                 
-        case IOC_PORTAL_GET_ROUTE:
+        case NAL_CMD_GET_ROUTE:
                 CDEBUG (D_IOCTL, "Getting route [%d]\n", pcfg->pcfg_count);
                 err = kportal_get_route(pcfg->pcfg_count, &pcfg->pcfg_nal,
                                         &pcfg->pcfg_nid, 
index 5309eb4..57fdbd3 100644 (file)
@@ -1168,7 +1168,7 @@ jt_ptl_add_route (int argc, char **argv)
                 return (-1);
         }
 
-        PCFG_INIT(pcfg, IOC_PORTAL_ADD_ROUTE);
+        PCFG_INIT(pcfg, NAL_CMD_ADD_ROUTE);
         pcfg.pcfg_nid = gateway_nid;
         pcfg.pcfg_nal = g_nal;
         pcfg.pcfg_nid2 = MIN (nid1, nid2);
@@ -1231,7 +1231,7 @@ jt_ptl_del_route (int argc, char **argv)
                 }
         }
         
-        PCFG_INIT(pcfg, IOC_PORTAL_DEL_ROUTE);
+        PCFG_INIT(pcfg, NAL_CMD_DEL_ROUTE);
         pcfg.pcfg_nal = g_nal;
         pcfg.pcfg_nid = nid;
         pcfg.pcfg_nid2 = nid1;
@@ -1290,7 +1290,7 @@ jt_ptl_notify_router (int argc, char **argv)
                 return (-1);
         }
 
-        PCFG_INIT(pcfg, IOC_PORTAL_NOTIFY_ROUTER);
+        PCFG_INIT(pcfg, NAL_CMD_NOTIFY_ROUTER);
         pcfg.pcfg_nal = g_nal;
         pcfg.pcfg_nid = nid;
         pcfg.pcfg_flags = enable;
@@ -1323,7 +1323,7 @@ jt_ptl_print_routes (int argc, char **argv)
 
         for (index = 0;;index++)
         {
-                PCFG_INIT(pcfg, IOC_PORTAL_GET_ROUTE);
+                PCFG_INIT(pcfg, NAL_CMD_GET_ROUTE);
                 pcfg.pcfg_count = index;
                 
                 rc = pcfg_ioctl(&pcfg);
index eaa7075..5bd7663 100644 (file)
@@ -1019,18 +1019,14 @@ static inline int portal_ioctl_getdata(char *buf, char *end, void *arg)
 #define IOC_PORTAL_CLEAR_DEBUG             _IOWR('e', 32, long)
 #define IOC_PORTAL_MARK_DEBUG              _IOWR('e', 33, long)
 #define IOC_PORTAL_PANIC                   _IOWR('e', 34, long)
-#define IOC_PORTAL_ADD_ROUTE               _IOWR('e', 35, long)
-#define IOC_PORTAL_DEL_ROUTE               _IOWR('e', 36, long)
-#define IOC_PORTAL_GET_ROUTE               _IOWR('e', 37, long)
-#define IOC_PORTAL_NAL_CMD                _IOWR('e', 38, long)
-#define IOC_PORTAL_GET_NID                 _IOWR('e', 39, long)
-#define IOC_PORTAL_FAIL_NID                _IOWR('e', 40, long)
-#define IOC_PORTAL_SET_DAEMON              _IOWR('e', 41, long)
-#define IOC_PORTAL_NOTIFY_ROUTER           _IOWR('e', 42, long)
-#define IOC_PORTAL_LWT_CONTROL             _IOWR('e', 43, long)
-#define IOC_PORTAL_LWT_SNAPSHOT            _IOWR('e', 44, long)
-#define IOC_PORTAL_LWT_LOOKUP_STRING       _IOWR('e', 45, long)
-#define IOC_PORTAL_MAX_NR                             45
+#define IOC_PORTAL_NAL_CMD                _IOWR('e', 35, long)
+#define IOC_PORTAL_GET_NID                 _IOWR('e', 36, long)
+#define IOC_PORTAL_FAIL_NID                _IOWR('e', 37, long)
+#define IOC_PORTAL_SET_DAEMON              _IOWR('e', 38, long)
+#define IOC_PORTAL_LWT_CONTROL             _IOWR('e', 39, long)
+#define IOC_PORTAL_LWT_SNAPSHOT            _IOWR('e', 40, long)
+#define IOC_PORTAL_LWT_LOOKUP_STRING       _IOWR('e', 41, long)
+#define IOC_PORTAL_MAX_NR                             41
 
 enum {
         QSWNAL  =  1,
@@ -1066,6 +1062,10 @@ extern ptl_handle_ni_t  kscimacnal_ni;
 #define NAL_CMD_ADD_AUTOCONN         106
 #define NAL_CMD_GET_AUTOCONN         107
 #define NAL_CMD_GET_TXDESC           108
+#define NAL_CMD_ADD_ROUTE            109
+#define NAL_CMD_DEL_ROUTE            110
+#define NAL_CMD_GET_ROUTE            111
+#define NAL_CMD_NOTIFY_ROUTER        112
 
 enum {
         DEBUG_DAEMON_START       =  1,
index a15ce6a..10e4060 100644 (file)
@@ -217,7 +217,7 @@ kportal_router_cmd(struct portals_cfg *pcfg, void * private)
         ENTRY;
 
         switch(pcfg->pcfg_command) {
-        case IOC_PORTAL_ADD_ROUTE:
+        case NAL_CMD_ADD_ROUTE:
                 CDEBUG(D_IOCTL, "Adding route: [%d] "LPU64" : "LPU64" - "LPU64"\n",
                        pcfg->pcfg_nal, pcfg->pcfg_nid, 
                        pcfg->pcfg_nid2, pcfg->pcfg_nid3);
@@ -225,7 +225,7 @@ kportal_router_cmd(struct portals_cfg *pcfg, void * private)
                                         pcfg->pcfg_nid2, pcfg->pcfg_nid3);
                 break;
 
-        case IOC_PORTAL_DEL_ROUTE:
+        case NAL_CMD_DEL_ROUTE:
                 CDEBUG (D_IOCTL, "Removing routes via [%d] "LPU64" : "LPU64" - "LPU64"\n",
                         pcfg->pcfg_nal, pcfg->pcfg_nid, 
                         pcfg->pcfg_nid2, pcfg->pcfg_nid3);
@@ -233,7 +233,7 @@ kportal_router_cmd(struct portals_cfg *pcfg, void * private)
                                          pcfg->pcfg_nid2, pcfg->pcfg_nid3);
                 break;
 
-        case IOC_PORTAL_NOTIFY_ROUTER: {
+        case NAL_CMD_NOTIFY_ROUTER: {
                 CDEBUG (D_IOCTL, "Notifying peer [%d] "LPU64" %s @ %ld\n",
                         pcfg->pcfg_nal, pcfg->pcfg_nid,
                         pcfg->pcfg_flags ? "Enabling" : "Disabling",
@@ -245,7 +245,7 @@ kportal_router_cmd(struct portals_cfg *pcfg, void * private)
                 break;
         }
                 
-        case IOC_PORTAL_GET_ROUTE:
+        case NAL_CMD_GET_ROUTE:
                 CDEBUG (D_IOCTL, "Getting route [%d]\n", pcfg->pcfg_count);
                 err = kportal_get_route(pcfg->pcfg_count, &pcfg->pcfg_nal,
                                         &pcfg->pcfg_nid, 
index 5309eb4..57fdbd3 100644 (file)
@@ -1168,7 +1168,7 @@ jt_ptl_add_route (int argc, char **argv)
                 return (-1);
         }
 
-        PCFG_INIT(pcfg, IOC_PORTAL_ADD_ROUTE);
+        PCFG_INIT(pcfg, NAL_CMD_ADD_ROUTE);
         pcfg.pcfg_nid = gateway_nid;
         pcfg.pcfg_nal = g_nal;
         pcfg.pcfg_nid2 = MIN (nid1, nid2);
@@ -1231,7 +1231,7 @@ jt_ptl_del_route (int argc, char **argv)
                 }
         }
         
-        PCFG_INIT(pcfg, IOC_PORTAL_DEL_ROUTE);
+        PCFG_INIT(pcfg, NAL_CMD_DEL_ROUTE);
         pcfg.pcfg_nal = g_nal;
         pcfg.pcfg_nid = nid;
         pcfg.pcfg_nid2 = nid1;
@@ -1290,7 +1290,7 @@ jt_ptl_notify_router (int argc, char **argv)
                 return (-1);
         }
 
-        PCFG_INIT(pcfg, IOC_PORTAL_NOTIFY_ROUTER);
+        PCFG_INIT(pcfg, NAL_CMD_NOTIFY_ROUTER);
         pcfg.pcfg_nal = g_nal;
         pcfg.pcfg_nid = nid;
         pcfg.pcfg_flags = enable;
@@ -1323,7 +1323,7 @@ jt_ptl_print_routes (int argc, char **argv)
 
         for (index = 0;;index++)
         {
-                PCFG_INIT(pcfg, IOC_PORTAL_GET_ROUTE);
+                PCFG_INIT(pcfg, NAL_CMD_GET_ROUTE);
                 pcfg.pcfg_count = index;
                 
                 rc = pcfg_ioctl(&pcfg);