[lustre-devel] [PATCH 025/622] lnet: fix nid range format '*@<net>' support

James Simmons jsimmons at infradead.org
Thu Feb 27 13:08:13 PST 2020


From: Emoly Liu <emoly at whamcloud.com>

In cfs_ip_min_max(), (nidrange->nr_all == 1) means this nid range
is a full IP address range(*.*.*.*). In this case, we don't need
to compare it to any other nid range, but set min_nid to 0.0.0.0
and max_nid to 255.255.255.255 directly.

WC-bug-id: https://jira.whamcloud.com/browse/LU-8913
Lustre-commit: 230266326f49 ("LU-8913 nodemap: fix nodemap range format '*@<net>' support")
Signed-off-by: Emoly Liu <emoly at whamcloud.com>
Reviewed-on: https://review.whamcloud.com/31684
Reviewed-by: Sebastien Buisson <sbuisson at ddn.com>
Reviewed-by: Fan Yong <fan.yong at intel.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 net/lnet/lnet/nidstrings.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/lnet/lnet/nidstrings.c b/net/lnet/lnet/nidstrings.c
index b4e38e5..13338d0 100644
--- a/net/lnet/lnet/nidstrings.c
+++ b/net/lnet/lnet/nidstrings.c
@@ -680,6 +680,12 @@ static int cfs_ip_min_max(struct list_head *nidlist, u32 *min_nid,
 		if (nidlist_count > 0)
 			return -EINVAL;
 
+		if (nr->nr_all) {
+			min_ip_addr = 0;
+			max_ip_addr = 0xffffffff;
+			break;
+		}
+
 		list_for_each_entry(ar, &nr->nr_addrranges, ar_link) {
 			rc = cfs_ip_ar_min_max(ar, &tmp_min_ip_addr,
 					       &tmp_max_ip_addr);
-- 
1.8.3.1



More information about the lustre-devel mailing list