File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
tools/testing/selftests/bpf/progs Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -74,9 +74,9 @@ static int bpf_burst_get_send(struct mptcp_sock *msk,
74
74
struct mptcp_subflow_context * subflow ;
75
75
struct sock * sk = (struct sock * )msk ;
76
76
__u32 pace , burst , wmem ;
77
+ int i , nr_active = 0 ;
77
78
__u64 linger_time ;
78
79
struct sock * ssk ;
79
- int i ;
80
80
81
81
/* pick the subflow with the lower wmem/wspace ratio */
82
82
for (i = 0 ; i < SSK_MODE_MAX ; ++ i ) {
@@ -97,6 +97,7 @@ static int bpf_burst_get_send(struct mptcp_sock *msk,
97
97
if (!mptcp_subflow_active (subflow ))
98
98
continue ;
99
99
100
+ nr_active += !backup ;
100
101
pace = subflow -> avg_pacing_rate ;
101
102
if (!pace ) {
102
103
/* init pacing rate from socket */
@@ -115,7 +116,7 @@ static int bpf_burst_get_send(struct mptcp_sock *msk,
115
116
mptcp_set_timeout (sk );
116
117
117
118
/* pick the best backup if no other subflow is active */
118
- if (send_info [ SSK_MODE_ACTIVE ]. subflow_id == MPTCP_SUBFLOWS_MAX )
119
+ if (! nr_active )
119
120
send_info [SSK_MODE_ACTIVE ].subflow_id = send_info [SSK_MODE_BACKUP ].subflow_id ;
120
121
121
122
subflow = bpf_mptcp_subflow_ctx_by_pos (data , send_info [SSK_MODE_ACTIVE ].subflow_id );
You can’t perform that action at this time.
0 commit comments