##summary
When nic supports hardware checksum, tcp only partially calculate the sum and fill the related info into skb three item:
ip_summed
csum_start
csum_offset
when nic driver sends the packet, it will fill these information to hardware’s correspond register.
##call trace
1 | > tcp_sendmsg |
注:__tcp_push_pending_frames
和 tcp_push_one
最终都调用tcp_write_xmit
##relate source
###tcp_prot
and tcp_sendmsg
1 | 2612 struct proto tcp_prot = { |
###tcp_sendmsg
1 | 916 int tcp_sendmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg, |
1 | 1828 void __tcp_push_pending_frames(struct sock *sk, unsigned int cur_mss, |
###tcp_push_one
1 | 1845 void tcp_push_one(struct sock *sk, unsigned int mss_now) |
###tcp_write_xmit
1 | 1743 static int tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle, |
###tcp_transmit_skb
1 | 796 static int tcp_transmit_skb(struct sock *sk, struct sk_buff *skb, int clone_it, |
###tcp_v4_init_sock
1 | 1875 static int tcp_v4_init_sock(struct sock *sk) |
###inet_connection_sock_af_ops
1 | 1844 const struct inet_connection_sock_af_ops ipv4_specific = { |
###tcp_v4_send_check
1 | 546 /* This routine computes an IPv4 TCP checksum. */ |
###__tcp_v4_send_check
1 | 529 static void __tcp_v4_send_check(struct sk_buff *skb, |
neigh operations
1 | 129 static const struct neigh_ops arp_generic_ops = { |
1 | 1280 int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb) |
1 | 2511 int dev_queue_xmit(struct sk_buff *skb) |
###dev_hard_start_xmit
1 | 2184 int dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev, |
###nic dirver e1000
1 | 847 static const struct net_device_ops e1000_netdev_ops = { |
1 | 5013 static netdev_tx_t e1000_xmit_frame(struct sk_buff *skb, |
1 | 2781 static bool e1000_tx_csum(struct e1000_adapter *adapter, |
1 | 201 static struct pci_driver e1000_driver = { |
1 | 942 static int __devinit e1000_probe(struct pci_dev *pdev, |