Skip to content

Commit

Permalink
mptcp: export mptcp_subflow_early_fallback()
Browse files Browse the repository at this point in the history
This helper will be used outside protocol.h in the following commit.

While at it, also add a 'pr_fallback()' debug print, to help identifying
fallbacks.

Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
  • Loading branch information
matttbe authored and intel-lab-lkp committed Sep 2, 2024
1 parent 44106bc commit 6ce57ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
7 changes: 0 additions & 7 deletions net/mptcp/protocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -3717,13 +3717,6 @@ static int mptcp_ioctl(struct sock *sk, int cmd, int *karg)
return 0;
}

static void mptcp_subflow_early_fallback(struct mptcp_sock *msk,
struct mptcp_subflow_context *subflow)
{
subflow->request_mptcp = 0;
__mptcp_do_fallback(msk);
}

static int mptcp_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)
{
struct mptcp_subflow_context *subflow;
Expand Down
8 changes: 8 additions & 0 deletions net/mptcp/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,14 @@ static inline void mptcp_do_fallback(struct sock *ssk)

#define pr_fallback(a) pr_debug("%s:fallback to TCP (msk=%p)\n", __func__, a)

static inline void mptcp_subflow_early_fallback(struct mptcp_sock *msk,
struct mptcp_subflow_context *subflow)
{
pr_fallback(msk);
subflow->request_mptcp = 0;
__mptcp_do_fallback(msk);
}

static inline bool mptcp_check_infinite_map(struct sk_buff *skb)
{
struct mptcp_ext *mpext;
Expand Down

0 comments on commit 6ce57ce

Please sign in to comment.