Skip to content

Commit

Permalink
Squash to "selftests/bpf: Add bpf_burst scheduler"
Browse files Browse the repository at this point in the history
Use mptcp_snd_nxt in bpf_burst.

Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
geliangtang authored and intel-lab-lkp committed Jul 10, 2024
1 parent 38703b0 commit e3c0cc2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/testing/selftests/bpf/progs/mptcp_bpf_burst.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ struct bpf_subflow_send_info {
extern bool mptcp_subflow_active(struct mptcp_subflow_context *subflow) __ksym;
extern void mptcp_set_timeout(struct sock *sk) __ksym;
extern __u64 mptcp_wnd_end(const struct mptcp_sock *msk) __ksym;
extern __u64 mptcp_snd_nxt(const struct mptcp_sock *msk) __ksym;
extern bool tcp_stream_memory_free(const struct sock *sk, int wake) __ksym;
extern bool bpf_mptcp_subflow_queues_empty(struct sock *sk) __ksym;
extern void mptcp_pm_subflow_chk_stale(const struct mptcp_sock *msk, struct sock *ssk) __ksym;
Expand Down Expand Up @@ -121,7 +122,7 @@ static int bpf_burst_get_send(struct mptcp_sock *msk,
if (!ssk || !sk_stream_memory_free(ssk))
return -1;

burst = min(MPTCP_SEND_BURST_SIZE, mptcp_wnd_end(msk) - msk->snd_nxt);
burst = min(MPTCP_SEND_BURST_SIZE, mptcp_wnd_end(msk) - mptcp_snd_nxt(msk));
wmem = ssk->sk_wmem_queued;
if (!burst)
goto out;
Expand Down

0 comments on commit e3c0cc2

Please sign in to comment.