Skip to content

Commit

Permalink
TODO
Browse files Browse the repository at this point in the history
Signed-off-by: Geliang Tang <[email protected]>
  • Loading branch information
Geliang Tang committed Nov 29, 2024
1 parent dcb329c commit 468347b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion net/mptcp/bpf.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,10 @@ static const struct bpf_func_proto bpf_mptcp_ssk_cast_proto = {
.func = bpf_mptcp_ssk_cast,
.gpl_only = false,
.ret_type = RET_PTR_TO_BTF_ID_OR_NULL,
.arg1_type = ARG_ANYTHING,
//ARG_CONST_SIZE_OR_ZERO,
//.arg1_type = ARG_PTR_TO_CTX,
//.arg1_type = ARG_PTR_TO_STACK,
.arg1_type = ARG_PTR_TO_BTF_ID,
.ret_btf_id = &btf_sock_ids[BTF_SOCK_TYPE_SOCK],
};

Expand Down
1 change: 1 addition & 0 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -2277,6 +2277,7 @@ static int mptcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len,

if (!timeo) {
copied = -EAGAIN;
pr_info("%s return EAGAIN\n", __func__);
break;
}

Expand Down
8 changes: 4 additions & 4 deletions tools/testing/selftests/bpf/network_helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,8 +652,8 @@ static void *send_recv_server(void *arg)
if (nr_sent == -1 && errno == EINTR)
continue;
if (nr_sent == -1) {
if (errno == EAGAIN)
continue;
//if (errno == EAGAIN)
// continue;
err = -errno;
break;
}
Expand Down Expand Up @@ -703,8 +703,8 @@ int send_recv_data(int lfd, int fd, uint32_t total_bytes, int timeout_ms)
if (nr_recv == -1 && errno == EINTR)
continue;
if (nr_recv == -1) {
if (errno == EAGAIN)
continue;
//if (errno == EAGAIN)
// continue;
err = -errno;
break;
}
Expand Down
3 changes: 3 additions & 0 deletions tools/testing/selftests/bpf/progs/mptcp_bpf_bytes.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ int BPF_PROG(trace_mptcp_sched_get_send, struct mptcp_sock *msk)
if (!msk->pm.server_side)
return 0;

bytes_sent_1 = 0;
bytes_sent_2 = 0;

mptcp_for_each_subflow(msk, subflow) {
struct tcp_sock *tp;
struct sock *ssk;
Expand Down

0 comments on commit 468347b

Please sign in to comment.