On Sat, Apr 9, 2016 at 8:52 AM, Jesse Gross <je...@kernel.org> wrote: > On Fri, Apr 8, 2016 at 7:04 PM, Alexander Duyck > <alexander.du...@gmail.com> wrote: >> On Fri, Apr 8, 2016 at 2:40 PM, Jesse Gross <je...@kernel.org> wrote: >>> Maybe I missed it but I didn't see any checks for the DF bit being set >>> when we transmit a packet with NETIF_F_TSO_MANGLEID. Even if I am >>> comfortable mangling my IDs in the DF case, I don't think this would >>> ever extend to non-DF packets. In the documentation you noted that it >>> is the driver's responsibility to do this check but I couldn't find it >>> in either ixgbe or igb. It would also be nice if the core stack could >>> enforce it somehow as well rather than each driver. >> >> Yeah I had glossed over that in the igb and ixgbe patches. A check is >> only really needed for the incrementing to non-incrementing case and I >> wasn't sure how common it was to have TCP with an IP header that >> didn't set the DF bit. In the case of the outer headers igb and ixgbe >> will increment the IP ID always so we don't have to worry about if DF >> is set of not there. For the inner headers I had fudged it a bit and >> didn't add the validation. If needed I can see about adding that >> shortly. > > TCP without the DF bit set is not the default but it is possible (it > can be enabled by setting /proc/sys/net/ipv4/ip_no_pmtu_disc). I also > did a quick check of some Internet services and at least some of them > seem to return TCP without DF, so it's not too rare.
For next version I plan to include a check in netif_skb_features that will clear NETIF_F_TSO_MANGLEID if the DF bit is not set. - Alex