patches for DPDK stable branches
 help / color / mirror / Atom feed
From: luca.boccassi@gmail.com
To: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Cc: "Isaac Boukris" <iboukris@gmail.com>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"Stephen Hemminger" <stephen@networkplumber.org>,
	"dpdk stable" <stable@dpdk.org>
Subject: patch 'bpf: fix load hangs with six IPv6 addresses' has been queued to stable release 22.11.6
Date: Mon, 15 Jul 2024 16:25:46 +0100	[thread overview]
Message-ID: <20240715152704.2229503-8-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20240715152704.2229503-1-luca.boccassi@gmail.com>

Hi,

FYI, your patch has been queued to stable release 22.11.6

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/17/24. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e03493d52e9d59c40d1ccb31e27578be841d034e

Thanks.

Luca Boccassi

---
From e03493d52e9d59c40d1ccb31e27578be841d034e Mon Sep 17 00:00:00 2001
From: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Date: Thu, 27 Jun 2024 19:04:41 +0100
Subject: [PATCH] bpf: fix load hangs with six IPv6 addresses
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]

As described in https://bugs.dpdk.org/show_bug.cgi?id=1465, converting
from following cBPF filter:
"host 1::1 or host 1::1 or host 1::1 or host 1::1 or
 host 1::1 or host 1::1"
takes too long for BPF verifier to complete (up to 25 seconds).

Looking at it, I didn't find any actual functional bug.

In fact, it does what is expected: go through each possible path of
BPF program and evaluate register/stack state for each instruction.
The problem is that, for program with a lot of conditional branches,
number of possible paths starts to grow exponentially and such walk
becomes very excessive.

So to minimize number of evaluations, this patch implements heuristic
similar to what Linux kernel does: state pruning.
If from given instruction for given program state, we explore all possible
paths and for each of them reach bpf_exit() without any complaints and a
valid R0 value, then for that instruction this program state can be
marked as 'safe'.
When we later arrive at the same instruction with a state equivalent to
an earlier instruction 'safe' state, we can prune the search.

For now, only states for JCC targets are saved/examined.

Plus add few extra logging for DEBUG level.

Bugzilla ID: 1465
Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")

Reported-by: Isaac Boukris <iboukris@gmail.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
---
 lib/bpf/bpf_validate.c | 305 ++++++++++++++++++++++++++++++++++-------
 1 file changed, 255 insertions(+), 50 deletions(-)

diff --git a/lib/bpf/bpf_validate.c b/lib/bpf/bpf_validate.c
index 1bf91fa05b..ae2dad46bb 100644
--- a/lib/bpf/bpf_validate.c
+++ b/lib/bpf/bpf_validate.c
@@ -29,10 +29,13 @@ struct bpf_reg_val {
 };
 
 struct bpf_eval_state {
+	SLIST_ENTRY(bpf_eval_state) next; /* for @safe list traversal */
 	struct bpf_reg_val rv[EBPF_REG_NUM];
 	struct bpf_reg_val sv[MAX_BPF_STACK_SIZE / sizeof(uint64_t)];
 };
 
+SLIST_HEAD(bpf_evst_head, bpf_eval_state);
+
 /* possible instruction node colour */
 enum {
 	WHITE,
@@ -52,6 +55,9 @@ enum {
 
 #define	MAX_EDGES	2
 
+/* max number of 'safe' evaluated states to track per node */
+#define NODE_EVST_MAX	32
+
 struct inst_node {
 	uint8_t colour;
 	uint8_t nb_edge:4;
@@ -59,7 +65,18 @@ struct inst_node {
 	uint8_t edge_type[MAX_EDGES];
 	uint32_t edge_dest[MAX_EDGES];
 	uint32_t prev_node;
-	struct bpf_eval_state *evst;
+	struct {
+		struct bpf_eval_state *cur;   /* save/restore for jcc targets */
+		struct bpf_eval_state *start;
+		struct bpf_evst_head safe;    /* safe states for track/prune */
+		uint32_t nb_safe;
+	} evst;
+};
+
+struct evst_pool {
+	uint32_t num;
+	uint32_t cur;
+	struct bpf_eval_state *ent;
 };
 
 struct bpf_verifier {
@@ -73,11 +90,8 @@ struct bpf_verifier {
 	uint32_t edge_type[MAX_EDGE_TYPE];
 	struct bpf_eval_state *evst;
 	struct inst_node *evin;
-	struct {
-		uint32_t num;
-		uint32_t cur;
-		struct bpf_eval_state *ent;
-	} evst_pool;
+	struct evst_pool evst_sr_pool; /* for evst save/restore */
+	struct evst_pool evst_tp_pool; /* for evst track/prune */
 };
 
 struct bpf_ins_check {
@@ -1085,7 +1099,7 @@ eval_jcc(struct bpf_verifier *bvf, const struct ebpf_insn *ins)
 	struct bpf_reg_val rvf, rvt;
 
 	tst = bvf->evst;
-	fst = bvf->evin->evst;
+	fst = bvf->evin->evst.cur;
 
 	frd = fst->rv + ins->dst_reg;
 	trd = tst->rv + ins->dst_reg;
@@ -1814,8 +1828,8 @@ add_edge(struct bpf_verifier *bvf, struct inst_node *node, uint32_t nidx)
 	uint32_t ne;
 
 	if (nidx > bvf->prm->nb_ins) {
-		RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
-			"next pc: %u\n",
+		RTE_BPF_LOG(ERR,
+			"%s: program boundary violation at pc: %u, next pc: %u\n",
 			__func__, get_node_idx(bvf, node), nidx);
 		return -EINVAL;
 	}
@@ -2091,60 +2105,114 @@ validate(struct bpf_verifier *bvf)
  * helper functions get/free eval states.
  */
 static struct bpf_eval_state *
-pull_eval_state(struct bpf_verifier *bvf)
+pull_eval_state(struct evst_pool *pool)
 {
 	uint32_t n;
 
-	n = bvf->evst_pool.cur;
-	if (n == bvf->evst_pool.num)
+	n = pool->cur;
+	if (n == pool->num)
 		return NULL;
 
-	bvf->evst_pool.cur = n + 1;
-	return bvf->evst_pool.ent + n;
+	pool->cur = n + 1;
+	return pool->ent + n;
 }
 
 static void
-push_eval_state(struct bpf_verifier *bvf)
+push_eval_state(struct evst_pool *pool)
 {
-	bvf->evst_pool.cur--;
+	RTE_ASSERT(pool->cur != 0);
+	pool->cur--;
 }
 
 static void
 evst_pool_fini(struct bpf_verifier *bvf)
 {
 	bvf->evst = NULL;
-	free(bvf->evst_pool.ent);
-	memset(&bvf->evst_pool, 0, sizeof(bvf->evst_pool));
+	free(bvf->evst_sr_pool.ent);
+	memset(&bvf->evst_sr_pool, 0, sizeof(bvf->evst_sr_pool));
+	memset(&bvf->evst_tp_pool, 0, sizeof(bvf->evst_tp_pool));
 }
 
 static int
 evst_pool_init(struct bpf_verifier *bvf)
 {
-	uint32_t n;
+	uint32_t k, n;
 
-	n = bvf->nb_jcc_nodes + 1;
+	/*
+	 * We need nb_jcc_nodes + 1 for save_cur/restore_cur
+	 * remaining ones will be used for state tracking/pruning.
+	 */
+	k = bvf->nb_jcc_nodes + 1;
+	n = k * 3;
 
-	bvf->evst_pool.ent = calloc(n, sizeof(bvf->evst_pool.ent[0]));
-	if (bvf->evst_pool.ent == NULL)
+	bvf->evst_sr_pool.ent = calloc(n, sizeof(bvf->evst_sr_pool.ent[0]));
+	if (bvf->evst_sr_pool.ent == NULL)
 		return -ENOMEM;
 
-	bvf->evst_pool.num = n;
-	bvf->evst_pool.cur = 0;
+	bvf->evst_sr_pool.num = k;
+	bvf->evst_sr_pool.cur = 0;
 
-	bvf->evst = pull_eval_state(bvf);
+	bvf->evst_tp_pool.ent = bvf->evst_sr_pool.ent + k;
+	bvf->evst_tp_pool.num = n - k;
+	bvf->evst_tp_pool.cur = 0;
+
+	bvf->evst = pull_eval_state(&bvf->evst_sr_pool);
 	return 0;
 }
 
+/*
+ * try to allocate and initialise new eval state for given node.
+ * later if no errors will be encountered, this state will be accepted as
+ * one of the possible 'safe' states for that node.
+ */
+static void
+save_start_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+	RTE_ASSERT(node->evst.start == NULL);
+
+	/* limit number of states for one node with some reasonable value */
+	if (node->evst.nb_safe >= NODE_EVST_MAX)
+		return;
+
+	/* try to get new eval_state */
+	node->evst.start = pull_eval_state(&bvf->evst_tp_pool);
+
+	/* make a copy of current state */
+	if (node->evst.start != NULL) {
+		memcpy(node->evst.start, bvf->evst, sizeof(*node->evst.start));
+		SLIST_NEXT(node->evst.start, next) = NULL;
+	}
+}
+
+/*
+ * add @start state to the list of @safe states.
+ */
+static void
+save_safe_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+{
+	if (node->evst.start == NULL)
+		return;
+
+	SLIST_INSERT_HEAD(&node->evst.safe, node->evst.start, next);
+	node->evst.nb_safe++;
+
+	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n",
+		__func__, bvf, get_node_idx(bvf, node), node->evst.start,
+		node->evst.nb_safe);
+
+	node->evst.start = NULL;
+}
+
 /*
  * Save current eval state.
  */
 static int
-save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+save_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 {
 	struct bpf_eval_state *st;
 
 	/* get new eval_state for this node */
-	st = pull_eval_state(bvf);
+	st = pull_eval_state(&bvf->evst_sr_pool);
 	if (st == NULL) {
 		RTE_BPF_LOG(ERR,
 			"%s: internal error (out of space) at pc: %u\n",
@@ -2156,11 +2224,13 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 	memcpy(st, bvf->evst, sizeof(*st));
 
 	/* swap current state with new one */
-	node->evst = bvf->evst;
+	RTE_ASSERT(node->evst.cur == NULL);
+	node->evst.cur = bvf->evst;
 	bvf->evst = st;
 
 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
-		__func__, bvf, get_node_idx(bvf, node), node->evst, bvf->evst);
+		__func__, bvf, get_node_idx(bvf, node), node->evst.cur,
+		bvf->evst);
 
 	return 0;
 }
@@ -2169,14 +2239,15 @@ save_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
  * Restore previous eval state and mark current eval state as free.
  */
 static void
-restore_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
+restore_cur_eval_state(struct bpf_verifier *bvf, struct inst_node *node)
 {
 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
-		__func__, bvf, get_node_idx(bvf, node), bvf->evst, node->evst);
+		__func__, bvf, get_node_idx(bvf, node), bvf->evst,
+		node->evst.cur);
 
-	bvf->evst = node->evst;
-	node->evst = NULL;
-	push_eval_state(bvf);
+	bvf->evst = node->evst.cur;
+	node->evst.cur = NULL;
+	push_eval_state(&bvf->evst_sr_pool);
 }
 
 static void
@@ -2193,26 +2264,124 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
 
 	rte_log(loglvl, rte_bpf_logtype,
 		"r%u={\n"
-		"\tv={type=%u, size=%zu},\n"
+		"\tv={type=%u, size=%zu, buf_size=%zu},\n"
 		"\tmask=0x%" PRIx64 ",\n"
 		"\tu={min=0x%" PRIx64 ", max=0x%" PRIx64 "},\n"
 		"\ts={min=%" PRId64 ", max=%" PRId64 "},\n"
 		"};\n",
 		ins->dst_reg,
-		rv->v.type, rv->v.size,
+		rv->v.type, rv->v.size, rv->v.buf_size,
 		rv->mask,
 		rv->u.min, rv->u.max,
 		rv->s.min, rv->s.max);
 }
 
 /*
- * Do second pass through CFG and try to evaluate instructions
- * via each possible path.
- * Right now evaluation functionality is quite limited.
- * Still need to add extra checks for:
- * - use/return uninitialized registers.
- * - use uninitialized data from the stack.
- * - memory boundaries violation.
+ * compare two evaluation states.
+ * returns zero if @lv is more conservative (safer) then @rv.
+ * returns non-zero value otherwise.
+ */
+static int
+cmp_reg_val_within(const struct bpf_reg_val *lv, const struct bpf_reg_val *rv)
+{
+	/* expect @v and @mask to be identical */
+	if (memcmp(&lv->v, &rv->v, sizeof(lv->v)) != 0 || lv->mask != rv->mask)
+		return -1;
+
+	/* exact match only for mbuf and stack pointers */
+	if (lv->v.type == RTE_BPF_ARG_PTR_MBUF ||
+			lv->v.type == BPF_ARG_PTR_STACK)
+		return -1;
+
+	if (lv->u.min <= rv->u.min && lv->u.max >= rv->u.max &&
+			lv->s.min <= rv->s.min && lv->s.max >= rv->s.max)
+		return 0;
+
+	return -1;
+}
+
+/*
+ * compare two evaluation states.
+ * returns zero if they are identical.
+ * returns positive value if @lv is more conservative (safer) then @rv.
+ * returns negative value otherwise.
+ */
+static int
+cmp_eval_state(const struct bpf_eval_state *lv, const struct bpf_eval_state *rv)
+{
+	int32_t rc;
+	uint32_t i, k;
+
+	/* for stack expect identical values */
+	rc = memcmp(lv->sv, rv->sv, sizeof(lv->sv));
+	if (rc != 0)
+		return -(2 * EBPF_REG_NUM);
+
+	k = 0;
+	/* check register values */
+	for (i = 0; i != RTE_DIM(lv->rv); i++) {
+		rc = memcmp(&lv->rv[i], &rv->rv[i], sizeof(lv->rv[i]));
+		if (rc != 0 && cmp_reg_val_within(&lv->rv[i], &rv->rv[i]) != 0)
+			return -(i + 1);
+		k += (rc != 0);
+	}
+
+	return k;
+}
+
+/*
+ * check did we already evaluated that path and can it be pruned that time.
+ */
+static int
+prune_eval_state(struct bpf_verifier *bvf, const struct inst_node *node,
+	struct inst_node *next)
+{
+	int32_t rc;
+	struct bpf_eval_state *safe;
+
+	rc = INT32_MIN;
+	SLIST_FOREACH(safe, &next->evst.safe, next) {
+		rc = cmp_eval_state(safe, bvf->evst);
+		if (rc >= 0)
+			break;
+	}
+
+	rc = (rc >= 0) ? 0 : -1;
+
+	/*
+	 * current state doesn't match any safe states,
+	 * so no prunning is possible right now,
+	 * track current state for future references.
+	 */
+	if (rc != 0)
+		save_start_eval_state(bvf, next);
+
+	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
+		"next->evst.start=%p, next->evst.nb_safe=%u\n",
+		__func__, bvf, get_node_idx(bvf, node),
+		get_node_idx(bvf, next), rc,
+		next->evst.start, next->evst.nb_safe);
+	return rc;
+}
+
+/* Do second pass through CFG and try to evaluate instructions
+ * via each possible path. The verifier will try all paths, tracking types of
+ * registers used as input to instructions, and updating resulting type via
+ * register state values. Plus for each register and possible stack value it
+ * tries to estimate possible max/min value.
+ * For conditional jumps, a stack is used to save evaluation state, so one
+ * path is explored while the state for the other path is pushed onto the stack.
+ * Then later, we backtrack to the first pushed instruction and repeat the cycle
+ * until the stack is empty and we're done.
+ * For program with many conditional branches walking through all possible path
+ * could be very excessive. So to minimize number of evaluations we use
+ * heuristic similar to what Linux kernel does - state pruning:
+ * If from given instruction for given program state we explore all possible
+ * paths and for each of them reach _exit() without any complaints and a valid
+ * R0 value, then for that instruction, that program state can be marked as
+ * 'safe'. When we later arrive at the same instruction with a state
+ * equivalent to an earlier instruction's 'safe' state, we can prune the search.
+ * For now, only states for JCC  targets are saved/examined.
  */
 static int
 evaluate(struct bpf_verifier *bvf)
@@ -2223,6 +2392,13 @@ evaluate(struct bpf_verifier *bvf)
 	const struct ebpf_insn *ins;
 	struct inst_node *next, *node;
 
+	struct {
+		uint32_t nb_eval;
+		uint32_t nb_prune;
+		uint32_t nb_save;
+		uint32_t nb_restore;
+	} stats;
+
 	/* initial state of frame pointer */
 	static const struct bpf_reg_val rvfp = {
 		.v = {
@@ -2246,6 +2422,8 @@ evaluate(struct bpf_verifier *bvf)
 	next = node;
 	rc = 0;
 
+	memset(&stats, 0, sizeof(stats));
+
 	while (node != NULL && rc == 0) {
 
 		/*
@@ -2259,11 +2437,14 @@ evaluate(struct bpf_verifier *bvf)
 			op = ins[idx].code;
 
 			/* for jcc node make a copy of evaluation state */
-			if (node->nb_edge > 1)
-				rc |= save_eval_state(bvf, node);
+			if (node->nb_edge > 1) {
+				rc |= save_cur_eval_state(bvf, node);
+				stats.nb_save++;
+			}
 
 			if (ins_chk[op].eval != NULL && rc == 0) {
 				err = ins_chk[op].eval(bvf, ins + idx);
+				stats.nb_eval++;
 				if (err != NULL) {
 					RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
 						__func__, err, idx);
@@ -2277,21 +2458,37 @@ evaluate(struct bpf_verifier *bvf)
 
 		/* proceed through CFG */
 		next = get_next_node(bvf, node);
+
 		if (next != NULL) {
 
 			/* proceed with next child */
 			if (node->cur_edge == node->nb_edge &&
-					node->evst != NULL)
-				restore_eval_state(bvf, node);
+					node->evst.cur != NULL) {
+				restore_cur_eval_state(bvf, node);
+				stats.nb_restore++;
+			}
 
-			next->prev_node = get_node_idx(bvf, node);
-			node = next;
+			/*
+			 * for jcc targets: check did we already evaluated
+			 * that path and can it's evaluation be skipped that
+			 * time.
+			 */
+			if (node->nb_edge > 1 && prune_eval_state(bvf, node,
+					next) == 0) {
+				next = NULL;
+				stats.nb_prune++;
+			} else {
+				next->prev_node = get_node_idx(bvf, node);
+				node = next;
+			}
 		} else {
 			/*
 			 * finished with current node and all it's kids,
-			 * proceed with parent
+			 * mark it's @start state as safe for future references,
+			 * and proceed with parent.
 			 */
 			node->cur_edge = 0;
+			save_safe_eval_state(bvf, node);
 			node = get_prev_node(bvf, node);
 
 			/* finished */
@@ -2300,6 +2497,14 @@ evaluate(struct bpf_verifier *bvf)
 		}
 	}
 
+	RTE_BPF_LOG(DEBUG, "%s(%p) returns %d, stats:\n"
+		"node evaluations=%u;\n"
+		"state pruned=%u;\n"
+		"state saves=%u;\n"
+		"state restores=%u;\n",
+		__func__, bvf, rc,
+		stats.nb_eval, stats.nb_prune, stats.nb_save, stats.nb_restore);
+
 	return rc;
 }
 
-- 
2.39.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-07-15 16:19:35.197489954 +0100
+++ 0008-bpf-fix-load-hangs-with-six-IPv6-addresses.patch	2024-07-15 16:19:34.448203901 +0100
@@ -1 +1 @@
-From a258eebdfb22f95a8a44d31b0eab639aed0a0c4b Mon Sep 17 00:00:00 2001
+From e03493d52e9d59c40d1ccb31e27578be841d034e Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit a258eebdfb22f95a8a44d31b0eab639aed0a0c4b ]
+
@@ -38 +39,0 @@
-Cc: stable@dpdk.org
@@ -49 +50 @@
-index 11344fff4d..4f47d6dc7b 100644
+index 1bf91fa05b..ae2dad46bb 100644
@@ -123,4 +124,4 @@
--		RTE_BPF_LOG_LINE(ERR, "%s: program boundary violation at pc: %u, "
--			"next pc: %u",
-+		RTE_BPF_LOG_LINE(ERR,
-+			"%s: program boundary violation at pc: %u, next pc: %u",
+-		RTE_BPF_LOG(ERR, "%s: program boundary violation at pc: %u, "
+-			"next pc: %u\n",
++		RTE_BPF_LOG(ERR,
++			"%s: program boundary violation at pc: %u, next pc: %u\n",
@@ -241 +242 @@
-+	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;",
++	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,state=%p): nb_safe=%u;\n",
@@ -261,2 +262,2 @@
- 		RTE_BPF_LOG_LINE(ERR,
- 			"%s: internal error (out of space) at pc: %u",
+ 		RTE_BPF_LOG(ERR,
+ 			"%s: internal error (out of space) at pc: %u\n",
@@ -272 +273 @@
- 	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -286 +287 @@
- 	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;",
+ 	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u) old/new states: %p/%p;\n",
@@ -300 +301 @@
-@@ -2193,26 +2264,124 @@ log_dbg_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
+@@ -2193,26 +2264,124 @@ log_eval_state(const struct bpf_verifier *bvf, const struct ebpf_insn *ins,
@@ -302 +303 @@
- 	RTE_LOG(DEBUG, BPF,
+ 	rte_log(loglvl, rte_bpf_logtype,
@@ -405,2 +406,2 @@
-+	RTE_BPF_LOG_LINE(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
-+		"next->evst.start=%p, next->evst.nb_safe=%u",
++	RTE_BPF_LOG(DEBUG, "%s(bvf=%p,node=%u,next=%u) returns %d, "
++		"next->evst.start=%p, next->evst.nb_safe=%u\n",
@@ -472 +473 @@
- 					RTE_BPF_LOG_LINE(ERR, "%s: %s at pc: %u",
+ 					RTE_BPF_LOG(ERR, "%s: %s at pc: %u\n",
@@ -521 +522 @@
-+	RTE_LOG(DEBUG, BPF, "%s(%p) returns %d, stats:\n"
++	RTE_BPF_LOG(DEBUG, "%s(%p) returns %d, stats:\n"

  parent reply	other threads:[~2024-07-15 15:27 UTC|newest]

Thread overview: 210+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-24 23:57 patch 'test: force IOVA mode on PPC64 without huge pages' " luca.boccassi
2024-06-24 23:57 ` patch 'bus/pci: fix build with musl 1.2.4 / Alpine 3.19' " luca.boccassi
2024-06-24 23:57 ` patch 'eal/unix: support ZSTD compression for firmware' " luca.boccassi
2024-06-24 23:57 ` patch 'pcapng: add memcpy check' " luca.boccassi
2024-06-24 23:57 ` patch 'net/virtio-user: " luca.boccassi
2024-06-24 23:57 ` patch 'eal/windows: install sched.h file' " luca.boccassi
2024-06-24 23:57 ` patch 'latencystats: fix literal float suffix' " luca.boccassi
2024-06-24 23:57 ` patch 'net/nfp: fix representor port queue release' " luca.boccassi
2024-06-24 23:57 ` patch 'net/bonding: fix failover time of LACP with mode 4' " luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix offload flag of IEEE 1588' " luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix Rx timestamp flag' " luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix double free for Rx/Tx queue' " luca.boccassi
2024-06-24 23:57 ` patch 'net/hns3: fix variable overflow' " luca.boccassi
2024-06-24 23:58 ` patch 'net/hns3: disable SCTP verification tag for RSS hash input' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_packet: align Rx/Tx structs to cache line' " luca.boccassi
2024-06-24 23:58 ` patch 'doc: fix testpmd ring size command' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: fix port ID in Rx mbuf' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: count mbuf allocation failures' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: fix stats reset' " luca.boccassi
2024-06-24 23:58 ` patch 'net/af_xdp: remove unused local statistic' " luca.boccassi
2024-06-24 23:58 ` patch 'net/tap: fix file descriptor check in isolated flow' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix MDIO access for non-zero ports and CL45 PHYs' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: reset link when link never comes back' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix fluctuations for 1G Bel Fuse SFP' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: update DMA coherency values' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: disable interrupts during device removal' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: disable RRC for yellow carp devices' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: enable PLL control for fixed PHY modes only' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix SFP codes check for DAC cables' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix connection for SFP+ active " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: check only minimum speed for " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix Tx flow on 30H HW' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: delay AN timeout during KR training' " luca.boccassi
2024-06-24 23:58 ` patch 'net/axgbe: fix linkup in PHY status' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ice: fix check for outer UDP checksum offload' " luca.boccassi
2024-06-24 23:58 ` patch 'app/testpmd: fix outer IP " luca.boccassi
2024-06-24 23:58 ` patch 'net: fix outer UDP checksum in Intel prepare helper' " luca.boccassi
2024-06-24 23:58 ` patch 'net/i40e: fix outer UDP checksum offload for X710' " luca.boccassi
2024-06-24 23:58 ` patch 'net/iavf: remove outer UDP checksum offload for X710 VF' " luca.boccassi
2024-06-24 23:58 ` patch 'app/testpmd: fix lcore ID restriction' " luca.boccassi
2024-06-24 23:58 ` patch 'hash: fix return code description in Doxygen' " luca.boccassi
2024-06-24 23:58 ` patch 'hash: check name when creating a hash' " luca.boccassi
2024-06-24 23:58 ` patch 'mempool: replace GCC pragma with cast' " luca.boccassi
2024-06-24 23:58 ` patch 'vhost: fix build with GCC 13' " luca.boccassi
2024-06-24 23:58 ` patch 'vhost: cleanup resubmit info before inflight setup' " luca.boccassi
2024-06-24 23:58 ` patch 'net/virtio: fix MAC table update' " luca.boccassi
2024-06-24 23:58 ` patch 'baseband/acc: fix memory barrier' " luca.boccassi
2024-06-24 23:58 ` patch 'event/sw: fix warning from useless snprintf' " luca.boccassi
2024-06-24 23:58 ` patch 'eventdev/crypto: fix opaque field handling' " luca.boccassi
2024-06-24 23:58 ` patch 'eal: fix logs for '--lcores'' " luca.boccassi
2024-06-24 23:58 ` patch 'net/fm10k: fix cleanup during init failure' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe: do not update link status in secondary process' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe: do not create delayed interrupt handler twice' " luca.boccassi
2024-06-24 23:58 ` patch 'net/e1000/base: fix link power down' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe/base: revert advertising for X550 2.5G/5G' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe/base: fix 5G link speed reported on VF' " luca.boccassi
2024-06-24 23:58 ` patch 'net/ixgbe/base: fix PHY ID for X550' " luca.boccassi
2024-06-24 23:58 ` patch 'net/cnxk: fix RSS config' " luca.boccassi
2024-06-24 23:58 ` patch 'net/cnxk: fix outbound security with higher packet burst' " luca.boccassi
2024-06-24 23:58 ` patch 'net/cnxk: fix promiscuous state after MAC change' " luca.boccassi
2024-06-24 23:58 ` patch 'graph: fix ID collisions' " luca.boccassi
2024-06-24 23:58 ` patch 'bpf: disable on 32-bit x86' " luca.boccassi
2024-06-24 23:58 ` patch 'hash: fix RCU reclamation size' " luca.boccassi
2024-06-24 23:58 ` patch 'common/mlx5: fix unsigned/signed mismatch' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: decrease log level for creation failure' " luca.boccassi
2024-06-24 23:58 ` patch 'common/mlx5: fix PRM structs' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix function comment' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix spinlock release on context open' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: add template match none flag' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5/hws: fix action template dump' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5: fix indexed pool with invalid index' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5: fix hash Rx queue release in flow sample' " luca.boccassi
2024-06-24 23:58 ` patch 'net/mlx5: fix flow template indirect action failure' " luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: break flow resource release loop' " luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: fix access to flow template operations' " luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: support jump in meter hierarchy' " luca.boccassi
2024-06-24 23:59 ` patch 'net/mlx5: fix crash on counter pool destroy' " luca.boccassi
2024-06-24 23:59 ` patch 'test/crypto: fix enqueue/dequeue callback case' " luca.boccassi
2024-06-24 23:59 ` patch 'telemetry: lower log level on socket error' " luca.boccassi
2024-06-24 23:59 ` patch 'bus/vdev: revert fix devargs in secondary process' " luca.boccassi
2024-06-24 23:59 ` patch 'doc: fix link to hugepage mapping from Linux guide' " luca.boccassi
2024-07-15 15:25   ` patch 'config: fix warning for cross build with meson >= 1.3.0' " luca.boccassi
2024-07-15 15:25     ` patch 'build: use builtin helper for python dependencies' " luca.boccassi
2024-07-15 15:25     ` patch 'app/bbdev: fix interrupt tests' " luca.boccassi
2024-07-15 15:25     ` patch 'dmadev: fix structure alignment' " luca.boccassi
2024-07-15 15:25     ` patch 'vdpa/sfc: remove dead code' " luca.boccassi
2024-07-15 15:25     ` patch 'mbuf: fix dynamic fields copy' " luca.boccassi
2024-07-15 15:25     ` patch 'bpf: fix MOV instruction evaluation' " luca.boccassi
2024-07-15 15:25     ` luca.boccassi [this message]
2024-07-15 15:25     ` patch 'telemetry: fix connection parameter parsing' " luca.boccassi
2024-07-15 15:25     ` patch 'baseband/la12xx: forbid secondary process' " luca.boccassi
2024-07-15 15:25     ` patch 'app/crypto-perf: remove redundant local variable' " luca.boccassi
2024-07-15 15:25     ` patch 'app/crypto-perf: fix result for asymmetric' " luca.boccassi
2024-07-15 15:25     ` patch 'crypto/cnxk: fix minimal input normalization' " luca.boccassi
2024-07-15 15:25     ` patch 'cryptodev: fix build without crypto callbacks' " luca.boccassi
2024-07-15 15:25     ` patch 'cryptodev: validate crypto callbacks from next node' " luca.boccassi
2024-07-15 15:25     ` patch 'examples/fips_validation: fix dereference and out-of-bound' " luca.boccassi
2024-07-15 15:25     ` patch 'crypto/openssl: fix GCM and CCM thread unsafe contexts' " luca.boccassi
2024-07-15 15:25     ` patch 'crypto/openssl: optimize 3DES-CTR context init' " luca.boccassi
2024-07-15 15:25     ` patch 'crypto/openssl: make per-QP cipher context clones' " luca.boccassi
2024-07-15 15:25     ` patch 'crypto/openssl: make per-QP auth " luca.boccassi
2024-07-15 15:25     ` patch 'crypto/openssl: set cipher padding once' " luca.boccassi
2024-07-15 15:26     ` patch 'common/dpaax/caamflib: fix PDCP-SDAP watchdog error' " luca.boccassi
2024-07-15 15:26     ` patch 'common/dpaax/caamflib: fix PDCP AES-AES " luca.boccassi
2024-07-15 15:26     ` patch 'crypto/dpaa_sec: fix IPsec descriptor' " luca.boccassi
2024-07-15 15:26     ` patch 'crypto/dpaa2_sec: fix event queue user context' " luca.boccassi
2024-07-15 15:26     ` patch 'examples/ipsec-secgw: fix SA salt endianness' " luca.boccassi
2024-07-15 15:26     ` patch 'fbarray: fix incorrect lookahead behavior' " luca.boccassi
2024-07-15 15:26     ` patch 'fbarray: fix incorrect lookbehind " luca.boccassi
2024-07-15 15:26     ` patch 'fbarray: fix lookahead ignore mask handling' " luca.boccassi
2024-07-15 15:26     ` patch 'fbarray: fix lookbehind " luca.boccassi
2024-07-15 15:26     ` patch 'usertools/devbind: fix indentation' " luca.boccassi
2024-07-15 15:26     ` patch 'eal/linux: lower log level on allocation attempt failure' " luca.boccassi
2024-07-15 15:26     ` patch 'dma/idxd: fix setup with Ubuntu 24.04' " luca.boccassi
2024-07-15 15:26     ` patch 'app/testpmd: fix help string of BPF load command' " luca.boccassi
2024-07-15 15:26     ` patch 'bus/dpaa: fix bus scan for DMA devices' " luca.boccassi
2024-07-15 15:26     ` patch 'bus/dpaa: fix memory leak in bus scan' " luca.boccassi
2024-07-15 15:26     ` patch 'common/dpaax: fix IOVA table cleanup' " luca.boccassi
2024-07-15 15:26     ` patch 'common/dpaax: fix node array overrun' " luca.boccassi
2024-07-15 15:26     ` patch 'bus/dpaa: remove redundant file descriptor check' " luca.boccassi
2024-07-15 15:26     ` patch 'net/dpaa: forbid MTU configuration for shared interface' " luca.boccassi
2024-07-15 15:26     ` patch 'net/mlx5: fix start without duplicate flow patterns' " luca.boccassi
2024-07-15 15:26     ` patch 'fbarray: fix finding for unaligned length' " luca.boccassi
2024-07-15 15:26     ` patch 'buildtools: fix build with clang 17 and ASan' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix pointer to variable outside scope' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix memory leak in firmware version check' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix sign extension' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix size when allocating children arrays' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix GCS descriptor field offsets' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix return type of bitmap hamming weight' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix check for existing switch rule' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix potential TLV length overflow' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix board type definition' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix preparing PHY for timesync command' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice/base: fix masking when reading context' " luca.boccassi
2024-07-15 15:26     ` patch 'common/idpf: fix flex descriptor mask' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ice: fix sizing of filter hash table' " luca.boccassi
2024-07-15 15:26     ` patch 'app/testpmd: handle IEEE1588 init failure' " luca.boccassi
2024-07-15 15:26     ` patch 'doc: remove empty section from testpmd guide' " luca.boccassi
2024-07-15 15:26     ` patch 'app/testpmd: fix parsing for connection tracking item' " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: fix tunnel packet parsing' " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: fix flow filters in VT mode' " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: fix Tx hang on queue disable' " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: restrict configuration of VLAN strip offload' " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: reconfigure more MAC Rx registers' " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: fix VF promiscuous and allmulticast' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ngbe: add special config for YT8531SH-CA PHY' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ngbe: keep PHY power down while device probing' " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: fix hotplug remove' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ngbe: " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: fix MTU range' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ngbe: " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: fix memory leaks' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ngbe: " luca.boccassi
2024-07-15 15:26     ` patch 'net/txgbe: fix Rx interrupt' " luca.boccassi
2024-07-15 15:26     ` patch 'net/vmxnet3: fix init logs' " luca.boccassi
2024-07-15 15:26     ` patch 'net/nfp: fix IPv6 TTL and DSCP flow action' " luca.boccassi
2024-07-15 15:26     ` patch 'net/nfp: fix allocation of switch domain' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ionic: fix mbuf double-free when emptying array' " luca.boccassi
2024-07-15 15:26     ` patch 'net/nfp: disable ctrl VNIC queues on close' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ena: fix bad checksum handling' " luca.boccassi
2024-07-15 15:26     ` patch 'net/ena: fix return value check' " luca.boccassi
2024-07-15 15:27     ` patch 'net/ena: fix checksum handling' " luca.boccassi
2024-07-15 15:27     ` patch 'net/nfp: forbid offload flow rules with empty action list' " luca.boccassi
2024-07-15 15:27     ` patch 'net/nfp: remove redundant function call' " luca.boccassi
2024-07-15 15:27     ` patch 'net/nfp: adapt reverse sequence card' " luca.boccassi
2024-07-15 15:27     ` patch 'net/nfp: fix disabling 32-bit build' " luca.boccassi
2024-07-24 11:32       ` patch 'crypto/qat: fix GEN4 write' " luca.boccassi
2024-07-24 11:32         ` patch 'crypto/ipsec_mb: fix function comment' " luca.boccassi
2024-07-24 11:32         ` patch 'test/crypto: fix allocation " luca.boccassi
2024-07-24 11:32         ` patch 'crypto/qat: fix log message typo' " luca.boccassi
2024-07-24 11:32         ` patch 'doc: fix typo in l2fwd-crypto guide' " luca.boccassi
2024-07-24 11:32         ` patch 'test/crypto: remove unused stats in setup' " luca.boccassi
2024-07-24 11:32         ` patch 'test/crypto: fix asymmetric capability test' " luca.boccassi
2024-07-24 11:32         ` patch 'crypto/qat: fix placement of OOP offset' " luca.boccassi
2024-07-24 11:32         ` patch 'net/ice: fix memory leaks in raw pattern parsing' " luca.boccassi
2024-07-24 11:32         ` patch 'net/ice: fix return value for " luca.boccassi
2024-07-24 11:32         ` patch 'net/mlx5: fix Arm build with GCC 9.1' " luca.boccassi
2024-07-24 11:32         ` patch 'net/mlx5: fix MTU configuration' " luca.boccassi
2024-07-24 11:32         ` patch 'net/mlx5/hws: fix deletion of action vport' " luca.boccassi
2024-07-24 11:32         ` patch 'net/mlx5/hws: fix port ID on root item convert' " luca.boccassi
2024-07-24 11:32         ` patch 'net/mlx5/hws: remove unused variable' " luca.boccassi
2024-07-24 11:32         ` patch 'net/mlx5: fix end condition of reading xstats' " luca.boccassi
2024-07-24 11:32         ` patch 'net/mlx5: fix uplink port probing in bonding mode' " luca.boccassi
2024-07-24 11:32         ` patch 'common/mlx5: remove unneeded field when modify RQ table' " luca.boccassi
2024-07-24 11:32         ` patch 'net/mlx5: fix disabling E-Switch default flow rules' " luca.boccassi
2024-07-24 11:32         ` patch 'net/hns3: check Rx DMA address alignmnent' " luca.boccassi
2024-07-24 11:32         ` patch 'net/ark: fix index arithmetic' " luca.boccassi
2024-07-24 11:33         ` patch 'ethdev: fix GENEVE option item conversion' " luca.boccassi
2024-07-24 11:33         ` patch 'app/testpmd: add postpone option to async flow destroy' " luca.boccassi
2024-07-24 11:33         ` patch 'ethdev: fix device init without socket-local memory' " luca.boccassi
2024-07-24 11:33         ` patch 'app/testpmd: fix build on signed comparison' " luca.boccassi
2024-07-24 11:33         ` patch 'bus/pci: fix UIO resource mapping in secondary process' " luca.boccassi
2024-07-24 11:33         ` patch 'bus/pci: fix FD " luca.boccassi
2024-07-24 11:33         ` patch 'dma/hisilicon: remove support for HIP09 platform' " luca.boccassi
2024-07-24 11:33         ` patch 'app/dumpcap: handle SIGTERM and SIGHUP' " luca.boccassi
2024-07-24 11:33         ` patch 'app/pdump: " luca.boccassi
2024-07-24 11:33         ` patch 'malloc: fix multi-process wait condition handling' " luca.boccassi
2024-07-24 11:33         ` patch 'bus/vdev: fix device reinitialization' " luca.boccassi
2024-07-24 11:33         ` patch 'examples/l3fwd: fix crash in ACL mode for mixed traffic' " luca.boccassi
2024-07-24 11:33         ` patch 'examples/l3fwd: fix crash on multiple sockets' " luca.boccassi
2024-07-24 11:33         ` patch 'net/hns3: fix uninitialized variable in FEC query' " luca.boccassi
2024-07-24 11:33         ` patch 'net/ice/base: fix temporary failures reading NVM' " luca.boccassi
2024-07-24 11:33         ` patch 'examples: fix queue ID restriction' " luca.boccassi
2024-07-24 11:33         ` patch 'examples: fix lcore " luca.boccassi
2024-07-24 11:33         ` patch 'examples: fix port " luca.boccassi
2024-07-24 11:33         ` patch 'doc: remove reference to mbuf pkt field' " luca.boccassi
2024-07-29 23:33           ` patch 'examples/ipsec-secgw: revert SA salt endianness' " luca.boccassi
2024-07-29 23:33             ` patch 'doc: fix mbuf flags' " luca.boccassi
2024-07-29 23:33             ` patch 'doc: add baseline mode in l3fwd-power guide' " luca.boccassi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240715152704.2229503-8-luca.boccassi@gmail.com \
    --to=luca.boccassi@gmail.com \
    --cc=iboukris@gmail.com \
    --cc=konstantin.ananyev@huawei.com \
    --cc=mb@smartsharesystems.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).