From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [RFC 3/5] tap: remove unnecessary cast in call to bpf_load
Date: Fri, 5 Jan 2024 14:28:09 -0800 [thread overview]
Message-ID: <20240105222909.139674-4-stephen@networkplumber.org> (raw)
In-Reply-To: <20240105222909.139674-1-stephen@networkplumber.org>
The callers already have the correct data type.
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
drivers/net/tap/tap_bpf_api.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/tap/tap_bpf_api.c b/drivers/net/tap/tap_bpf_api.c
index d176da0802eb..c754c167a764 100644
--- a/drivers/net/tap/tap_bpf_api.c
+++ b/drivers/net/tap/tap_bpf_api.c
@@ -32,9 +32,8 @@ int tap_flow_bpf_cls_q(__u32 queue_idx)
cls_q_insns[1].imm = queue_idx;
return bpf_load(BPF_PROG_TYPE_SCHED_CLS,
- (struct bpf_insn *)cls_q_insns,
- RTE_DIM(cls_q_insns),
- "Dual BSD/GPL");
+ cls_q_insns, RTE_DIM(cls_q_insns),
+ "Dual BSD/GPL");
}
/**
@@ -55,9 +54,8 @@ int tap_flow_bpf_calc_l3_l4_hash(__u32 key_idx, int map_fd)
l3_l4_hash_insns[9].imm = map_fd;
return bpf_load(BPF_PROG_TYPE_SCHED_ACT,
- (struct bpf_insn *)l3_l4_hash_insns,
- RTE_DIM(l3_l4_hash_insns),
- "Dual BSD/GPL");
+ l3_l4_hash_insns, RTE_DIM(l3_l4_hash_insns),
+ "Dual BSD/GPL");
}
/**
--
2.43.0
next prev parent reply other threads:[~2024-01-05 22:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-05 22:28 [RFC 0/5] BPF infrastructure enhancements Stephen Hemminger
2024-01-05 22:28 ` [RFC 1/5] tap: move forward declaration of bpf_load Stephen Hemminger
2024-01-05 22:28 ` [RFC 2/5] tap: remove unnecessary bzero() calls in bpf api Stephen Hemminger
2024-01-05 22:28 ` Stephen Hemminger [this message]
2024-01-05 22:28 ` [RFC 4/5] tap: get errors from kernel on bpf load failure Stephen Hemminger
2024-01-05 22:28 ` [RFC 5/5] tap: stop "vendoring" linux bpf header Stephen Hemminger
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=20240105222909.139674-4-stephen@networkplumber.org \
--to=stephen@networkplumber.org \
--cc=dev@dpdk.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).