Bug 54491 - UFO (UDP fragmentation offload) does not work if the payload size specified is within the range ( (MTU-28) to (MTU-8) )
Summary: UFO (UDP fragmentation offload) does not work if the payload size specified i...
Status: NEW
Alias: None
Product: Networking
Classification: Unclassified
Component: IPV4 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-26 08:52 UTC by Sergey Berezin
Modified: 2016-02-15 20:17 UTC (History)
1 user (show)

See Also:
Kernel Version: 3.3.4
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Sergey Berezin 2013-02-26 08:52:24 UTC
For IPv4/UDP if the payload size specified is within the range ( (MTU-28) 
to (MTU-8) ) packet gets segmented in kernel even if the following netdev features are set:

NETIF_F_SG 
NETIF_F_GEN_CSUM 
NETIF_F_UFO 
NETIF_F_TSO 
NETIF_F_GSO 
NETIF_F_GSO_ROBUST

Analysis:
udp_sendmsg() computes packet length by adding UDP header size to payload size: “ulen += sizeof(struct udphdr)”
Then the function calls ip_make_skb(), however IP header size is not added to the packet length.
ip_make_skb() in turn calls __ip_append_data(). The same packet length is used here. 
__ip_append_data() compares the packet length with MTU. The packet length still does not include IP header size (20 bytes).
In result, when payload size “is within the range ( (MTU-28) to (MTU-8) )” standard branch is taken rather than ip_ufo_append_data(). Gso_size is not computed, therefore IP fragmentation is triggered from ip_finish_output().

The issue was reproduced on 3.4.3 as well

Note You need to log in before you can comment on or make changes to this bug.