diff mbox series

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

Message ID 1582838290-17243-26-git-send-email-jsimmons@infradead.org
State New, archived
Headers show
Series lustre: sync closely to 2.13.52 | expand

Commit Message

James Simmons Feb. 27, 2020, 9:08 p.m. UTC
From: Emoly Liu <emoly@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
and max_nid to 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@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/31684
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
 net/lnet/lnet/nidstrings.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series


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,