Lines Matching refs:tso

8 void tso_build_hdr(const struct sk_buff *skb, char *hdr, struct tso_t *tso,  in tso_build_hdr()  argument
11 int hdr_len = skb_transport_offset(skb) + tso->tlen; in tso_build_hdr()
15 if (!tso->ipv6) { in tso_build_hdr()
18 iph->id = htons(tso->ip_id); in tso_build_hdr()
20 tso->ip_id++; in tso_build_hdr()
24 iph->payload_len = htons(size + tso->tlen); in tso_build_hdr()
27 if (tso->tlen != sizeof(struct udphdr)) { in tso_build_hdr()
30 put_unaligned_be32(tso->tcp_seq, &tcph->seq); in tso_build_hdr()
46 void tso_build_data(const struct sk_buff *skb, struct tso_t *tso, int size) in tso_build_data() argument
48 tso->tcp_seq += size; /* not worth avoiding this operation for UDP */ in tso_build_data()
49 tso->size -= size; in tso_build_data()
50 tso->data += size; in tso_build_data()
52 if ((tso->size == 0) && in tso_build_data()
53 (tso->next_frag_idx < skb_shinfo(skb)->nr_frags)) { in tso_build_data()
54 skb_frag_t *frag = &skb_shinfo(skb)->frags[tso->next_frag_idx]; in tso_build_data()
57 tso->size = skb_frag_size(frag); in tso_build_data()
58 tso->data = skb_frag_address(frag); in tso_build_data()
59 tso->next_frag_idx++; in tso_build_data()
64 int tso_start(struct sk_buff *skb, struct tso_t *tso) in tso_start() argument
69 tso->tlen = tlen; in tso_start()
70 tso->ip_id = ntohs(ip_hdr(skb)->id); in tso_start()
71 tso->tcp_seq = (tlen != sizeof(struct udphdr)) ? ntohl(tcp_hdr(skb)->seq) : 0; in tso_start()
72 tso->next_frag_idx = 0; in tso_start()
73 tso->ipv6 = vlan_get_protocol(skb) == htons(ETH_P_IPV6); in tso_start()
76 tso->size = skb_headlen(skb) - hdr_len; in tso_start()
77 tso->data = skb->data + hdr_len; in tso_start()
78 if ((tso->size == 0) && in tso_start()
79 (tso->next_frag_idx < skb_shinfo(skb)->nr_frags)) { in tso_start()
80 skb_frag_t *frag = &skb_shinfo(skb)->frags[tso->next_frag_idx]; in tso_start()
83 tso->size = skb_frag_size(frag); in tso_start()
84 tso->data = skb_frag_address(frag); in tso_start()
85 tso->next_frag_idx++; in tso_start()