From 965175d8acb7cb7a2ac6ca555224b7322c416b53 Mon Sep 17 00:00:00 2001 From: wangchao <wangchao> Date: Tue, 9 Nov 2004 10:51:45 +0000 Subject: [PATCH] remove my previous patch, which should be committed to b_hd_netid --- lnet/utils/portals.c | 18 ++++-------------- lustre/portals/utils/portals.c | 18 ++++-------------- lustre/utils/lconf | 10 ++-------- lustre/utils/lctl.c | 4 ++-- 4 files changed, 12 insertions(+), 38 deletions(-) diff --git a/lnet/utils/portals.c b/lnet/utils/portals.c index dc544886db..d5d29dcc00 100644 --- a/lnet/utils/portals.c +++ b/lnet/utils/portals.c @@ -1196,14 +1196,13 @@ int jt_ptl_shownid(int argc, char **argv) int jt_ptl_mynid(int argc, char **argv) { int rc; - int netid; char hostname[1024]; char *nidstr; struct portals_cfg pcfg; ptl_nid_t mynid; - if (argc > 3) { - fprintf(stderr, "usage: %s [netid [NID]]\n", argv[0]); + if (argc > 2) { + fprintf(stderr, "usage: %s [NID]\n", argv[0]); fprintf(stderr, "NID defaults to the primary IP address of the machine.\n"); return 0; } @@ -1211,8 +1210,8 @@ int jt_ptl_mynid(int argc, char **argv) if (!g_nal_is_set()) return -1; - if (argc >= 3) - nidstr = argv[2]; + if (argc >= 2) + nidstr = argv[1]; else if (gethostname(hostname, sizeof(hostname)) != 0) { fprintf(stderr, "gethostname failed: %s\n", strerror(errno)); @@ -1221,14 +1220,6 @@ int jt_ptl_mynid(int argc, char **argv) else nidstr = hostname; - if (argc >= 2) - if (ptl_parse_size (&netid, argv[1]) != 0) { - fprintf (stderr, "Can't parse netid %s\n", argv[1]); - return (-1); - } - else - netid = PTL_NETID_ANY; - rc = ptl_parse_nid (&mynid, nidstr); if (rc != 0) { fprintf (stderr, "Can't convert '%s' into a NID\n", nidstr); @@ -1237,7 +1228,6 @@ int jt_ptl_mynid(int argc, char **argv) PCFG_INIT(pcfg, NAL_CMD_REGISTER_MYNID); pcfg.pcfg_nid = mynid; - pcfg.pcfg_netid = netid; rc = pcfg_ioctl(&pcfg); if (rc < 0) diff --git a/lustre/portals/utils/portals.c b/lustre/portals/utils/portals.c index dc544886db..d5d29dcc00 100644 --- a/lustre/portals/utils/portals.c +++ b/lustre/portals/utils/portals.c @@ -1196,14 +1196,13 @@ int jt_ptl_shownid(int argc, char **argv) int jt_ptl_mynid(int argc, char **argv) { int rc; - int netid; char hostname[1024]; char *nidstr; struct portals_cfg pcfg; ptl_nid_t mynid; - if (argc > 3) { - fprintf(stderr, "usage: %s [netid [NID]]\n", argv[0]); + if (argc > 2) { + fprintf(stderr, "usage: %s [NID]\n", argv[0]); fprintf(stderr, "NID defaults to the primary IP address of the machine.\n"); return 0; } @@ -1211,8 +1210,8 @@ int jt_ptl_mynid(int argc, char **argv) if (!g_nal_is_set()) return -1; - if (argc >= 3) - nidstr = argv[2]; + if (argc >= 2) + nidstr = argv[1]; else if (gethostname(hostname, sizeof(hostname)) != 0) { fprintf(stderr, "gethostname failed: %s\n", strerror(errno)); @@ -1221,14 +1220,6 @@ int jt_ptl_mynid(int argc, char **argv) else nidstr = hostname; - if (argc >= 2) - if (ptl_parse_size (&netid, argv[1]) != 0) { - fprintf (stderr, "Can't parse netid %s\n", argv[1]); - return (-1); - } - else - netid = PTL_NETID_ANY; - rc = ptl_parse_nid (&mynid, nidstr); if (rc != 0) { fprintf (stderr, "Can't convert '%s' into a NID\n", nidstr); @@ -1237,7 +1228,6 @@ int jt_ptl_mynid(int argc, char **argv) PCFG_INIT(pcfg, NAL_CMD_REGISTER_MYNID); pcfg.pcfg_nid = mynid; - pcfg.pcfg_netid = netid; rc = pcfg_ioctl(&pcfg); if (rc < 0) diff --git a/lustre/utils/lconf b/lustre/utils/lconf index b06f041fc6..6319775750 100755 --- a/lustre/utils/lconf +++ b/lustre/utils/lconf @@ -423,8 +423,8 @@ class LCTLInterface: """ set mynid """ cmds = """ network %s - mynid %s %s - quit """ % (net, netid, nid) + mynid %s + quit """ % (net, nid) self.run(cmds) # add an interface @@ -1304,12 +1304,6 @@ class Network(Module): else: netmask = "" lctl.add_interface(self.net_type, ip, netmask) - lctl.newnet(self.netid, self.net_type) - if not (config.record and self.generic_nid): - lctl.network(self.net_type, self.netid, self.nid) - bindaddrlist = self.db.get_bindaddrlist(self.netid) - for bindaddr in bindaddrlist: - lctl.bind(self.net_type, self.netid, bindaddr) if self.net_type == 'elan': sys_optimize_elan() if self.port and node_is_router(): diff --git a/lustre/utils/lctl.c b/lustre/utils/lctl.c index 54bab94a6a..cd70a94705 100644 --- a/lustre/utils/lctl.c +++ b/lustre/utils/lctl.c @@ -79,7 +79,7 @@ command_t cmdlist[] = { {"add_peer", jt_ptl_add_peer, 0, "add an peer entry\n" "usage: add_peer <nid> <host> <port>"}, {"del_peer", jt_ptl_del_peer, 0, "remove an peer entry\n" - "usage: del_peer [<nid> [<netid> [<host> [ks]]]]"}, + "usage: del_peer [<nid>] [<host>] [ks]"}, {"conn_list", jt_ptl_print_connections, 0, "print all the connected remote nid\n" "usage: conn_list"}, {"connect", jt_ptl_connect, 0, "connect to a remote nid\n" @@ -91,7 +91,7 @@ command_t cmdlist[] = { {"mynid", jt_ptl_mynid, 0, "inform the socknal of the local nid. " "The nid defaults to hostname for tcp networks and is automatically " "setup for elan/myrinet networks.\n" - "usage: mynid [<netid> [<nid>]]"}, + "usage: mynid [<nid>]"}, {"shownid", jt_ptl_shownid, 0, "print the local NID\n" "usage: shownid"}, {"add_uuid", jt_lcfg_add_uuid, 0, "associate a UUID with a nid\n" -- GitLab