Commit a16c054b authored by Geliang Tang's avatar Geliang Tang Committed by Jakub Kicinski

mptcp: use mptcp_get_ext helper

Use mptcp_get_ext() helper defined in protocol.h instead of open-coding
it in mptcp_sendmsg_frag().
Reviewed-by: default avatarMatthieu Baerts <matttbe@kernel.org>
Signed-off-by: default avatarGeliang Tang <geliang.tang@suse.com>
Signed-off-by: default avatarMat Martineau <martineau@kernel.org>
Link: https://lore.kernel.org/r/20231025-send-net-next-20231025-v1-6-db8f25f798eb@kernel.orgSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 83d580dd
...@@ -1267,7 +1267,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk, ...@@ -1267,7 +1267,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
* queue management operation, to avoid breaking the ext <-> * queue management operation, to avoid breaking the ext <->
* SSN association set here * SSN association set here
*/ */
mpext = skb_ext_find(skb, SKB_EXT_MPTCP); mpext = mptcp_get_ext(skb);
if (!mptcp_skb_can_collapse_to(data_seq, skb, mpext)) { if (!mptcp_skb_can_collapse_to(data_seq, skb, mpext)) {
TCP_SKB_CB(skb)->eor = 1; TCP_SKB_CB(skb)->eor = 1;
goto alloc_skb; goto alloc_skb;
...@@ -1289,7 +1289,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk, ...@@ -1289,7 +1289,7 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
i = skb_shinfo(skb)->nr_frags; i = skb_shinfo(skb)->nr_frags;
reuse_skb = false; reuse_skb = false;
mpext = skb_ext_find(skb, SKB_EXT_MPTCP); mpext = mptcp_get_ext(skb);
} }
/* Zero window and all data acked? Probe. */ /* Zero window and all data acked? Probe. */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment