Skip to content

Commit 0ace81e

Browse files
hlrichardsondavem330
authored andcommitted
ipv4: update comment to document GSO fragmentation cases.
This is a follow-up to commit 9ee6c5d ("ipv4: allow local fragmentation in ip_finish_output_gso()"), updating the comment documenting cases in which fragmentation is needed for egress GSO packets. Suggested-by: Shmulik Ladkani <[email protected]> Reviewed-by: Shmulik Ladkani <[email protected]> Signed-off-by: Lance Richardson <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9b6c14d commit 0ace81e

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

net/ipv4/ip_output.c

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,12 +244,18 @@ static int ip_finish_output_gso(struct net *net, struct sock *sk,
244244
if (skb_gso_validate_mtu(skb, mtu))
245245
return ip_finish_output2(net, sk, skb);
246246

247-
/* Slowpath - GSO segment length is exceeding the dst MTU.
247+
/* Slowpath - GSO segment length exceeds the egress MTU.
248248
*
249-
* This can happen in two cases:
250-
* 1) TCP GRO packet, DF bit not set
251-
* 2) skb arrived via virtio-net, we thus get TSO/GSO skbs directly
252-
* from host network stack.
249+
* This can happen in several cases:
250+
* - Forwarding of a TCP GRO skb, when DF flag is not set.
251+
* - Forwarding of an skb that arrived on a virtualization interface
252+
* (virtio-net/vhost/tap) with TSO/GSO size set by other network
253+
* stack.
254+
* - Local GSO skb transmitted on an NETIF_F_TSO tunnel stacked over an
255+
* interface with a smaller MTU.
256+
* - Arriving GRO skb (or GSO skb in a virtualized environment) that is
257+
* bridged to a NETIF_F_TSO tunnel stacked over an interface with an
258+
* insufficent MTU.
253259
*/
254260
features = netif_skb_features(skb);
255261
BUILD_BUG_ON(sizeof(*IPCB(skb)) > SKB_SGO_CB_OFFSET);

0 commit comments

Comments
 (0)