On (12/03/15 14:33), David Miller wrote: > > Doesn't skb_cow_data() contribute significantly to the ESP base cost, > especially for TCP packets? Indeed. For esp-null, it's about half of the total time spent in esp_output (for one run that I just instrumented with perf tracepoints 2.5 ms compared to 5.8 ms) It never goes into the slow path of skb_cow_data (the path with comment about mincer fragments) because whether or not you do this after GSO, TCP makes sure to fit within the MSS, so (unless you have Jumbo enabled?) you'd send it something that does not have a fraglist. Was the cow_data call just intended to handle the fraglist case? Or is there something else more generic going on here (it's hard to tell because esp_output doesnt have too many comments to explain what it thinks its doing, as it juggles different len fields around) > I mean, we're copying every TCP data frame. > > If this is the case, even with GSO/whatever offloads, I expect that > performance will be roughly halfed. The other obvious "low-hanging fruit" is to address the TODO in the comment above esp_alloc_tmp. --Sowmini -- To unsubscribe from this list: send the line "unsubscribe linux-crypto" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html