Skip to content

Commit 04d8825

Browse files
Paolo Abenidavem330
Paolo Abeni
authored andcommitted
tcp: expose the tcp_mark_push() and tcp_skb_entail() helpers
the tcp_skb_entail() helper is actually skb_entail(), renamed to provide proper scope. The two helper will be used by the next patch. RFC -> v1: - rename skb_entail to tcp_skb_entail (Eric) Acked-by: Mat Martineau <[email protected]> Signed-off-by: Paolo Abeni <[email protected]> Reviewed-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent efe686f commit 04d8825

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

include/net/tcp.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -581,6 +581,8 @@ __u32 cookie_v6_init_sequence(const struct sk_buff *skb, __u16 *mss);
581581
#endif
582582
/* tcp_output.c */
583583

584+
void tcp_skb_entail(struct sock *sk, struct sk_buff *skb);
585+
void tcp_mark_push(struct tcp_sock *tp, struct sk_buff *skb);
584586
void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss,
585587
int nonagle);
586588
int __tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb, int segs);

net/ipv4/tcp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ int tcp_ioctl(struct sock *sk, int cmd, unsigned long arg)
647647
}
648648
EXPORT_SYMBOL(tcp_ioctl);
649649

650-
static inline void tcp_mark_push(struct tcp_sock *tp, struct sk_buff *skb)
650+
void tcp_mark_push(struct tcp_sock *tp, struct sk_buff *skb)
651651
{
652652
TCP_SKB_CB(skb)->tcp_flags |= TCPHDR_PSH;
653653
tp->pushed_seq = tp->write_seq;
@@ -658,7 +658,7 @@ static inline bool forced_push(const struct tcp_sock *tp)
658658
return after(tp->write_seq, tp->pushed_seq + (tp->max_window >> 1));
659659
}
660660

661-
static void skb_entail(struct sock *sk, struct sk_buff *skb)
661+
void tcp_skb_entail(struct sock *sk, struct sk_buff *skb)
662662
{
663663
struct tcp_sock *tp = tcp_sk(sk);
664664
struct tcp_skb_cb *tcb = TCP_SKB_CB(skb);
@@ -985,7 +985,7 @@ struct sk_buff *tcp_build_frag(struct sock *sk, int size_goal, int flags,
985985
#ifdef CONFIG_TLS_DEVICE
986986
skb->decrypted = !!(flags & MSG_SENDPAGE_DECRYPTED);
987987
#endif
988-
skb_entail(sk, skb);
988+
tcp_skb_entail(sk, skb);
989989
copy = size_goal;
990990
}
991991

@@ -1314,7 +1314,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size)
13141314
process_backlog++;
13151315
skb->ip_summed = CHECKSUM_PARTIAL;
13161316

1317-
skb_entail(sk, skb);
1317+
tcp_skb_entail(sk, skb);
13181318
copy = size_goal;
13191319

13201320
/* All packets are restored as if they have

0 commit comments

Comments
 (0)