* [rdma-core patch v3] srp_daemon: improve the debug message for is_enabled_by_rules_file
@ 2019-07-15 4:16 Honggang Li
2019-07-23 19:34 ` Bart Van Assche
2019-07-25 16:53 ` Jason Gunthorpe
0 siblings, 2 replies; 3+ messages in thread
From: Honggang Li @ 2019-07-15 4:16 UTC (permalink / raw)
To: bvanassche, jgg; +Cc: linux-rdma, Honggang Li
If the target was disallowed by rule file, user can not distinguish that
from the old debug message.
pr_debug("Found an SRP target with id_ext %s - check if it allowed by rules file\n", target->id_ext);
It implicitly implied by the message next to the old debug message.
pr_debug("Found an SRP target with id_ext %s - check if it is already connected\n", target->id_ext);
The improved debug message will feedback the check result of rule file, user
no longer needs to wonder the target is allowed or not.
Signed-off-by: Honggang Li <honli@redhat.com>
---
srp_daemon/srp_daemon.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/srp_daemon/srp_daemon.c b/srp_daemon/srp_daemon.c
index a004f6a4..e85b9668 100644
--- a/srp_daemon/srp_daemon.c
+++ b/srp_daemon/srp_daemon.c
@@ -349,10 +349,11 @@ static int is_enabled_by_rules_file(struct target_details *target)
int rule;
struct config_t *conf = config;
- if (NULL == conf->rules)
+ if (NULL == conf->rules) {
+ pr_debug("Allowing SRP target with id_ext %s because not using a rules file\n", target->id_ext);
return 1;
+ }
- pr_debug("Found an SRP target with id_ext %s - check if it allowed by rules file\n", target->id_ext);
rule = -1;
do {
rule++;
@@ -392,6 +393,9 @@ static int is_enabled_by_rules_file(struct target_details *target)
target->options = conf->rules[rule].options;
+ pr_debug("SRP target with id_ext %s %s by rules file\n",
+ target->id_ext,
+ conf->rules[rule].allow ? "allowed" : "disallowed");
return conf->rules[rule].allow;
} while (1);
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [rdma-core patch v3] srp_daemon: improve the debug message for is_enabled_by_rules_file
2019-07-15 4:16 [rdma-core patch v3] srp_daemon: improve the debug message for is_enabled_by_rules_file Honggang Li
@ 2019-07-23 19:34 ` Bart Van Assche
2019-07-25 16:53 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Bart Van Assche @ 2019-07-23 19:34 UTC (permalink / raw)
To: Honggang Li, jgg; +Cc: linux-rdma
On 7/14/19 9:16 PM, Honggang Li wrote:
> If the target was disallowed by rule file, user can not distinguish that
> from the old debug message.
>
> pr_debug("Found an SRP target with id_ext %s - check if it allowed by rules file\n", target->id_ext);
>
> It implicitly implied by the message next to the old debug message.
>
> pr_debug("Found an SRP target with id_ext %s - check if it is already connected\n", target->id_ext);
>
> The improved debug message will feedback the check result of rule file, user
> no longer needs to wonder the target is allowed or not.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [rdma-core patch v3] srp_daemon: improve the debug message for is_enabled_by_rules_file
2019-07-15 4:16 [rdma-core patch v3] srp_daemon: improve the debug message for is_enabled_by_rules_file Honggang Li
2019-07-23 19:34 ` Bart Van Assche
@ 2019-07-25 16:53 ` Jason Gunthorpe
1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2019-07-25 16:53 UTC (permalink / raw)
To: Honggang Li; +Cc: bvanassche, linux-rdma
On Mon, Jul 15, 2019 at 12:16:14AM -0400, Honggang Li wrote:
> If the target was disallowed by rule file, user can not distinguish that
> from the old debug message.
>
> pr_debug("Found an SRP target with id_ext %s - check if it allowed by rules file\n", target->id_ext);
>
> It implicitly implied by the message next to the old debug message.
>
> pr_debug("Found an SRP target with id_ext %s - check if it is already connected\n", target->id_ext);
>
> The improved debug message will feedback the check result of rule file, user
> no longer needs to wonder the target is allowed or not.
>
> Signed-off-by: Honggang Li <honli@redhat.com>
> srp_daemon/srp_daemon.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-07-25 16:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-15 4:16 [rdma-core patch v3] srp_daemon: improve the debug message for is_enabled_by_rules_file Honggang Li
2019-07-23 19:34 ` Bart Van Assche
2019-07-25 16:53 ` Jason Gunthorpe
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.