[v3,07/14] bpf: remove log level in internal helper

Message ID 20231218092738.749604-8-david.marchand@redhat.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series Detect superfluous newline in logs |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

David Marchand Dec. 18, 2023, 9:27 a.m. UTC
  There is no other log level than debug, simplify this helper.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
---
 lib/bpf/bpf_validate.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
  

Patch

diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 95b9ef99ef..f246b3c5eb 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -2178,18 +2178,18 @@  restore_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 }
 
 static void
-log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
-	uint32_t pc, int32_t loglvl)
+log_dbg_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
+	uint32_t pc)
 {
 	const struct bpf_eval_state *st;
 	const struct bpf_reg_val *rv;
 
-	rte_log(loglvl, rte_bpf_logtype, "%s(pc=%u):\n", __func__, pc);
+	RTE_BPF_LOG(DEBUG, "%s(pc=%u):\n", __func__, pc);
 
 	st = bvf->evst;
 	rv = st->rv + ins->dst_reg;
 
-	rte_log(loglvl, rte_bpf_logtype,
+	RTE_BPF_LOG(DEBUG,
 		"r%u={\n"
 		"\tv={type=%u, size=%zu},\n"
 		"\tmask=0x%" PRIx64 ",\n"
@@ -2269,7 +2269,7 @@  evaluate(struct bpf_verifier *bvf)
 				}
 			}
 
-			log_eval_state(bvf, ins + idx, idx, RTE_LOG_DEBUG);
+			log_dbg_eval_state(bvf, ins + idx, idx);
 			bvf->evin = NULL;
 		}