mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 17:47:38 +07:00
nfp: bpf: add short busy wait for FW replies
Scheduling out and in for every FW message can slow us down unnecessarily. Our experiments show that even under heavy load the FW responds to 99.9% messages within 200 us. Add a short busy wait before entering the wait queue. Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
parent
7fedbb7c5a
commit
ca027a1c45
@ -157,7 +157,14 @@ nfp_bpf_cmsg_wait_reply(struct nfp_app_bpf *bpf, enum nfp_bpf_cmsg_type type,
|
|||||||
int tag)
|
int tag)
|
||||||
{
|
{
|
||||||
struct sk_buff *skb;
|
struct sk_buff *skb;
|
||||||
int err;
|
int i, err;
|
||||||
|
|
||||||
|
for (i = 0; i < 50; i++) {
|
||||||
|
udelay(4);
|
||||||
|
skb = nfp_bpf_reply(bpf, tag);
|
||||||
|
if (skb)
|
||||||
|
return skb;
|
||||||
|
}
|
||||||
|
|
||||||
err = wait_event_interruptible_timeout(bpf->cmsg_wq,
|
err = wait_event_interruptible_timeout(bpf->cmsg_wq,
|
||||||
skb = nfp_bpf_reply(bpf, tag),
|
skb = nfp_bpf_reply(bpf, tag),
|
||||||
|
Loading…
Reference in New Issue
Block a user