mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
tcp: remove indirect calls for icsk->icsk_af_ops->send_check
Mitigate RETPOLINE costs in __tcp_transmit_skb() by using INDIRECT_CALL_INET() wrapper. Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
05e22e8395
commit
dd2e0b86fc
4 changed files with 14 additions and 10 deletions
|
@ -1066,6 +1066,7 @@ static void tcp_update_skb_after_send(struct sock *sk, struct sk_buff *skb,
|
|||
|
||||
INDIRECT_CALLABLE_DECLARE(int ip_queue_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl));
|
||||
INDIRECT_CALLABLE_DECLARE(int inet6_csk_xmit(struct sock *sk, struct sk_buff *skb, struct flowi *fl));
|
||||
INDIRECT_CALLABLE_DECLARE(void tcp_v4_send_check(struct sock *sk, struct sk_buff *skb));
|
||||
|
||||
/* This routine actually transmits TCP packets queued in by
|
||||
* tcp_do_sendmsg(). This is used by both the initial
|
||||
|
@ -1210,7 +1211,9 @@ static int __tcp_transmit_skb(struct sock *sk, struct sk_buff *skb,
|
|||
}
|
||||
#endif
|
||||
|
||||
icsk->icsk_af_ops->send_check(sk, skb);
|
||||
INDIRECT_CALL_INET(icsk->icsk_af_ops->send_check,
|
||||
tcp_v6_send_check, tcp_v4_send_check,
|
||||
sk, skb);
|
||||
|
||||
if (likely(tcb->tcp_flags & TCPHDR_ACK))
|
||||
tcp_event_ack_sent(sk, tcp_skb_pcount(skb), rcv_nxt);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue