DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] bpf: delete meaningless code
@ 2021-04-21 11:35 Min Hu (Connor)
  2021-04-21 11:43 ` Ananyev, Konstantin
  0 siblings, 1 reply; 5+ messages in thread
From: Min Hu (Connor) @ 2021-04-21 11:35 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, konstantin.ananyev

'rd->u.max = rd->u.max' is meaningless which should be deleted.

This patch fixed it.

Fixes: 8021917293d0 ("bpf: add extra validation for input BPF program")
Cc: stable@dpdk.org

Signed-off-by: Min Hu (Connor) <humin29@huawei.com>
---
 lib/librte_bpf/bpf_validate.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/librte_bpf/bpf_validate.c b/lib/librte_bpf/bpf_validate.c
index 9214f15..c5ad951 100644
--- a/lib/librte_bpf/bpf_validate.c
+++ b/lib/librte_bpf/bpf_validate.c
@@ -517,8 +517,6 @@ eval_divmod(uint32_t op, struct bpf_reg_val *rd, struct bpf_reg_val *rs,
 	} else {
 		if (op == BPF_MOD)
 			rd->u.max = RTE_MIN(rd->u.max, rs->u.max - 1);
-		else
-			rd->u.max = rd->u.max;
 		rd->u.min = 0;
 	}
 
-- 
2.7.4


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-22 11:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 11:35 [dpdk-dev] [PATCH] bpf: delete meaningless code Min Hu (Connor)
2021-04-21 11:43 ` Ananyev, Konstantin
2021-04-21 12:02   ` Min Hu (Connor)
2021-04-22 11:29     ` Ananyev, Konstantin
2021-04-22 11:39       ` Min Hu (Connor)

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).