udp: add udp gso
Implement generic segmentation offload support for udp datagrams. A follow-up patch adds support to the protocol stack to generate such packets. UDP GSO is not UFO. UFO fragments a single large datagram. GSO splits a large payload into a number of discrete UDP datagrams. The implementation adds a GSO type SKB_UDP_GSO_L4 to differentiate it from UFO (SKB_UDP_GSO). IPPROTO_UDPLITE is excluded, as that protocol has no gso handler registered. [ Export __udp_gso_segment for ipv6. -DaveM ] Signed-off-by: Willem de Bruijn <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
1cd7884dfd
commit
ee80d1ebe5
@@ -4940,6 +4940,8 @@ static unsigned int skb_gso_transport_seglen(const struct sk_buff *skb)
|
||||
thlen = tcp_hdrlen(skb);
|
||||
} else if (unlikely(skb_is_gso_sctp(skb))) {
|
||||
thlen = sizeof(struct sctphdr);
|
||||
} else if (shinfo->gso_type & SKB_GSO_UDP_L4) {
|
||||
thlen = sizeof(struct udphdr);
|
||||
}
|
||||
/* UFO sets gso_size to the size of the fragmentation
|
||||
* payload, i.e. the size of the L4 (UDP) header is already
|
||||
|
Reference in New Issue
Block a user