If LNET_NID_NET is passed the wildcard NID (LNET_ANY_NID) then we
should return the wildcard net (LNET_NET_ANY). This also allows NULL
to be used as an argument to LNET_NID_NET.
Fixes:
005bd7075c ("LU-10391 lnet: Change lnet_send() to take large-addr nids")
Signed-off-by: Chris Horn <chris.horn@hpe.com>
Change-Id: Ic2a7c9af31dcba285c266a872462cf179ab603fa
Reviewed-on: https://review.whamcloud.com/46292
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Serguei Smirnov <ssmirnov@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
static inline __u32 LNET_NID_NET(const struct lnet_nid *nid)
{
- return LNET_MKNET(nid->nid_type, __be16_to_cpu(nid->nid_num));
+ if (LNET_NID_IS_ANY(nid))
+ return LNET_NET_ANY;
+ else
+ return LNET_MKNET(nid->nid_type, __be16_to_cpu(nid->nid_num));
}
static inline void lnet_nid4_to_nid(lnet_nid_t nid4, struct lnet_nid *nid)