Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-9480 lnet: add lnet_interfaces_max tunable
[fs/lustre-release.git]
/
lnet
/
klnds
/
socklnd
/
socklnd.c
diff --git
a/lnet/klnds/socklnd/socklnd.c
b/lnet/klnds/socklnd/socklnd.c
index
8e5b675
..
56045fb
100644
(file)
--- a/
lnet/klnds/socklnd/socklnd.c
+++ b/
lnet/klnds/socklnd/socklnd.c
@@
-51,7
+51,7
@@
ksocknal_ip2iface(struct lnet_ni *ni, __u32 ip)
struct ksock_interface *iface;
for (i = 0; i < net->ksnn_ninterfaces; i++) {
struct ksock_interface *iface;
for (i = 0; i < net->ksnn_ninterfaces; i++) {
- LASSERT(i < LNET_
NUM_INTERFACES
);
+ LASSERT(i < LNET_
INTERFACES_NUM
);
iface = &net->ksnn_interfaces[i];
if (iface->ksni_ipaddr == ip)
iface = &net->ksnn_interfaces[i];
if (iface->ksni_ipaddr == ip)
@@
-220,7
+220,7
@@
ksocknal_unlink_peer_locked(struct ksock_peer_ni *peer_ni)
struct ksock_interface *iface;
for (i = 0; i < peer_ni->ksnp_n_passive_ips; i++) {
struct ksock_interface *iface;
for (i = 0; i < peer_ni->ksnp_n_passive_ips; i++) {
- LASSERT(i < LNET_
NUM_INTERFACES
);
+ LASSERT(i < LNET_
INTERFACES_NUM
);
ip = peer_ni->ksnp_passive_ips[i];
iface = ksocknal_ip2iface(peer_ni->ksnp_ni, ip);
ip = peer_ni->ksnp_passive_ips[i];
iface = ksocknal_ip2iface(peer_ni->ksnp_ni, ip);
@@
-705,7
+705,7
@@
ksocknal_local_ipvec(struct lnet_ni *ni, __u32 *ipaddrs)
read_lock(&ksocknal_data.ksnd_global_lock);
nip = net->ksnn_ninterfaces;
read_lock(&ksocknal_data.ksnd_global_lock);
nip = net->ksnn_ninterfaces;
- LASSERT(nip <= LNET_
NUM_INTERFACES
);
+ LASSERT(nip <= LNET_
INTERFACES_NUM
);
/*
* Only offer interfaces for additional connections if I have
/*
* Only offer interfaces for additional connections if I have
@@
-784,8
+784,8
@@
ksocknal_select_ips(struct ksock_peer_ni *peer_ni, __u32 *peerips, int n_peerips
write_lock_bh(global_lock);
write_lock_bh(global_lock);
- LASSERT(n_peerips <= LNET_
NUM_INTERFACES
);
- LASSERT(net->ksnn_ninterfaces <= LNET_
NUM_INTERFACES
);
+ LASSERT(n_peerips <= LNET_
INTERFACES_NUM
);
+ LASSERT(net->ksnn_ninterfaces <= LNET_
INTERFACES_NUM
);
/* Only match interfaces for additional connections
* if I have > 1 interface */
/* Only match interfaces for additional connections
* if I have > 1 interface */
@@
-895,7
+895,7
@@
ksocknal_create_routes(struct ksock_peer_ni *peer_ni, int port,
return;
}
return;
}
- LASSERT(npeer_ipaddrs <= LNET_
NUM_INTERFACES
);
+ LASSERT(npeer_ipaddrs <= LNET_
INTERFACES_NUM
);
for (i = 0; i < npeer_ipaddrs; i++) {
if (newroute != NULL) {
for (i = 0; i < npeer_ipaddrs; i++) {
if (newroute != NULL) {
@@
-932,7
+932,7
@@
ksocknal_create_routes(struct ksock_peer_ni *peer_ni, int port,
best_nroutes = 0;
best_netmatch = 0;
best_nroutes = 0;
best_netmatch = 0;
- LASSERT(net->ksnn_ninterfaces <= LNET_
NUM_INTERFACES
);
+ LASSERT(net->ksnn_ninterfaces <= LNET_
INTERFACES_NUM
);
/* Select interface to connect from */
for (j = 0; j < net->ksnn_ninterfaces; j++) {
/* Select interface to connect from */
for (j = 0; j < net->ksnn_ninterfaces; j++) {
@@
-1077,7
+1077,7
@@
ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route,
atomic_set (&conn->ksnc_tx_nob, 0);
LIBCFS_ALLOC(hello, offsetof(struct ksock_hello_msg,
atomic_set (&conn->ksnc_tx_nob, 0);
LIBCFS_ALLOC(hello, offsetof(struct ksock_hello_msg,
- kshm_ips[LNET_
NUM_INTERFACES
]));
+ kshm_ips[LNET_
INTERFACES_NUM
]));
if (hello == NULL) {
rc = -ENOMEM;
goto failed_1;
if (hello == NULL) {
rc = -ENOMEM;
goto failed_1;
@@
-1336,7
+1336,7
@@
ksocknal_create_conn(struct lnet_ni *ni, struct ksock_route *route,
}
LIBCFS_FREE(hello, offsetof(struct ksock_hello_msg,
}
LIBCFS_FREE(hello, offsetof(struct ksock_hello_msg,
- kshm_ips[LNET_
NUM_INTERFACES
]));
+ kshm_ips[LNET_
INTERFACES_NUM
]));
/* setup the socket AFTER I've received hello (it disables
* SO_LINGER). I might call back to the acceptor who may want
/* setup the socket AFTER I've received hello (it disables
* SO_LINGER). I might call back to the acceptor who may want
@@
-1420,7
+1420,7
@@
failed_2:
failed_1:
if (hello != NULL)
LIBCFS_FREE(hello, offsetof(struct ksock_hello_msg,
failed_1:
if (hello != NULL)
LIBCFS_FREE(hello, offsetof(struct ksock_hello_msg,
- kshm_ips[LNET_
NUM_INTERFACES
]));
+ kshm_ips[LNET_
INTERFACES_NUM
]));
LIBCFS_FREE(conn, sizeof(*conn));
LIBCFS_FREE(conn, sizeof(*conn));
@@
-1984,7
+1984,7
@@
ksocknal_add_interface(struct lnet_ni *ni, __u32 ipaddress, __u32 netmask)
if (iface != NULL) {
/* silently ignore dups */
rc = 0;
if (iface != NULL) {
/* silently ignore dups */
rc = 0;
- } else if (net->ksnn_ninterfaces == LNET_
NUM_INTERFACES
) {
+ } else if (net->ksnn_ninterfaces == LNET_
INTERFACES_NUM
) {
rc = -ENOSPC;
} else {
iface = &net->ksnn_interfaces[net->ksnn_ninterfaces++];
rc = -ENOSPC;
} else {
iface = &net->ksnn_interfaces[net->ksnn_ninterfaces++];
@@
-2653,7
+2653,7
@@
ksocknal_enumerate_interfaces(struct ksock_net *net)
continue;
}
continue;
}
- if (j == LNET_
NUM_INTERFACES
) {
+ if (j == LNET_
INTERFACES_NUM
) {
CWARN("Ignoring interface %s (too many interfaces)\n",
names[i]);
continue;
CWARN("Ignoring interface %s (too many interfaces)\n",
names[i]);
continue;
@@
-2834,7
+2834,7
@@
ksocknal_startup(struct lnet_ni *ni)
net->ksnn_ninterfaces = 1;
} else {
net->ksnn_ninterfaces = 1;
} else {
- for (i = 0; i < LNET_
NUM_INTERFACES
; i++) {
+ for (i = 0; i < LNET_
INTERFACES_NUM
; i++) {
int up;
if (ni->ni_interfaces[i] == NULL)
int up;
if (ni->ni_interfaces[i] == NULL)