[lustre-devel] [PATCH 22/33] lustre: ptlrpc: switch sptlrpc_rule_set_choose to large nid
James Simmons <[email protected]> Sun, 2 Feb 2025 15:46:22 -0500
| Newsgroups | org.lustre.lists.lustre-devel |
|---|---|
| Message-ID | <[email protected]> |
From: Mr NeilBrown <[email protected]> sptlrpc_rule_set_choose() and sptlrpc_target_choose_flavor() now take a large nid. Only the net number is needed, so this is quite straight forward. WC-bug-id: https://jira.whamcloud.com/browse/LU-10391 Lustre-commit: 80a4a2ebe0a269d56 ("LU-10391 ptlrpc: switch sptlrpc_rule_set_choose to large nid") Signed-off-by: Mr NeilBrown <[email protected]> Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50102 Reviewed-by: Sebastien Buisson <[email protected]> Reviewed-by: James Simmons <[email protected]> Reviewed-by: Oleg Drokin <[email protected]> Signed-off-by: James Simmons <[email protected]> --- fs/lustre/ptlrpc/sec_config.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/lustre/ptlrpc/sec_config.c b/fs/lustre/ptlrpc/sec_config.c index 1b56ef40ebda..95e0da4b2da2 100644 --- a/fs/lustre/ptlrpc/sec_config.c +++ b/fs/lustre/ptlrpc/sec_config.c @@ -374,7 +374,7 @@ static int sptlrpc_rule_set_merge(struct sptlrpc_rule_set *rset, static int sptlrpc_rule_set_choose(struct sptlrpc_rule_set *rset, enum lustre_sec_part from, enum lustre_sec_part to, - lnet_nid_t nid, + struct lnet_nid *nid, struct sptlrpc_flavor *sf) { struct sptlrpc_rule *r; @@ -383,9 +383,9 @@ static int sptlrpc_rule_set_choose(struct sptlrpc_rule_set *rset, for (n = 0; n < rset->srs_nrule; n++) { r = &rset->srs_rules[n]; - if (LNET_NIDNET(nid) != LNET_NET_ANY && + if (!LNET_NID_IS_ANY(nid) && r->sr_netid != LNET_NET_ANY && - LNET_NIDNET(nid) != r->sr_netid) + __be16_to_cpu(nid->nid_num) != r->sr_netid) continue; if (from != LUSTRE_SP_ANY && r->sr_from != LUSTRE_SP_ANY && @@ -811,13 +811,13 @@ void sptlrpc_conf_choose_flavor(enum lustre_sec_part from, conf_tgt = sptlrpc_conf_get_tgt(conf, name, 0); if (conf_tgt) { rc = sptlrpc_rule_set_choose(&conf_tgt->sct_rset, from, to, - lnet_nid_to_nid4(nid), sf); + nid, sf); if (rc) goto out; } rc = sptlrpc_rule_set_choose(&conf->sc_rset, from, to, - lnet_nid_to_nid4(nid), sf); + nid, sf); out: mutex_unlock(&sptlrpc_conf_lock); -- 2.39.3 _______________________________________________ lustre-devel mailing list [email protected] http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org