Lines Matching refs:hdr
29 const struct virtio_net_hdr *hdr)
34 switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
51 const struct virtio_net_hdr *hdr,
60 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
61 switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
87 if (hdr->gso_type & VIRTIO_NET_HDR_GSO_ECN)
90 if (hdr->gso_size == 0)
96 if (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM) {
97 u32 start = __virtio16_to_cpu(little_endian, hdr->csum_start);
98 u32 off = __virtio16_to_cpu(little_endian, hdr->csum_offset);
122 virtio_net_hdr_set_proto(skb, hdr);
123 else if (!virtio_net_hdr_match_proto(protocol, hdr->gso_type))
154 if (hdr->gso_type != VIRTIO_NET_HDR_GSO_NONE) {
155 u16 gso_size = __virtio16_to_cpu(little_endian, hdr->gso_size);
165 if (!(hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM))
195 struct virtio_net_hdr *hdr,
200 memset(hdr, 0, sizeof(*hdr)); /* no info leak */
206 hdr->hdr_len = __cpu_to_virtio16(little_endian,
208 hdr->gso_size = __cpu_to_virtio16(little_endian,
211 hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV4;
213 hdr->gso_type = VIRTIO_NET_HDR_GSO_TCPV6;
215 hdr->gso_type = VIRTIO_NET_HDR_GSO_UDP_L4;
219 hdr->gso_type |= VIRTIO_NET_HDR_GSO_ECN;
221 hdr->gso_type = VIRTIO_NET_HDR_GSO_NONE;
224 hdr->flags = VIRTIO_NET_HDR_F_NEEDS_CSUM;
225 hdr->csum_start = __cpu_to_virtio16(little_endian,
227 hdr->csum_offset = __cpu_to_virtio16(little_endian,
231 hdr->flags = VIRTIO_NET_HDR_F_DATA_VALID;