diff options
author | Lance Richardson <lrichard@redhat.com> | 2016-11-09 15:04:39 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-10 12:01:54 -0500 |
commit | 0ace81ec7192201af48528c309ee0b4103021f55 (patch) | |
tree | 31392af30d170c97f2162b616407c3b341910157 | |
parent | 9b6c14d51bd2304b92f842e96172a9cc822fc77c (diff) |
ipv4: update comment to document GSO fragmentation cases.
This is a follow-up to commit 9ee6c5dc816a ("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 <shmulik.ladkani@gmail.com>
Reviewed-by: Shmulik Ladkani <shmulik.ladkani@gmail.com>
Signed-off-by: Lance Richardson <lrichard@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/ipv4/ip_output.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index 9403fa3850be..105908d841a3 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c | |||
@@ -244,12 +244,18 @@ static int ip_finish_output_gso(struct net *net, struct sock *sk, | |||
244 | if (skb_gso_validate_mtu(skb, mtu)) | 244 | if (skb_gso_validate_mtu(skb, mtu)) |
245 | return ip_finish_output2(net, sk, skb); | 245 | return ip_finish_output2(net, sk, skb); |
246 | 246 | ||
247 | /* Slowpath - GSO segment length is exceeding the dst MTU. | 247 | /* Slowpath - GSO segment length exceeds the egress MTU. |
248 | * | 248 | * |
249 | * This can happen in two cases: | 249 | * This can happen in several cases: |
250 | * 1) TCP GRO packet, DF bit not set | 250 | * - Forwarding of a TCP GRO skb, when DF flag is not set. |
251 | * 2) skb arrived via virtio-net, we thus get TSO/GSO skbs directly | 251 | * - Forwarding of an skb that arrived on a virtualization interface |
252 | * from host network stack. | 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. | ||
253 | */ | 259 | */ |
254 | features = netif_skb_features(skb); | 260 | features = netif_skb_features(skb); |
255 | BUILD_BUG_ON(sizeof(*IPCB(skb)) > SKB_SGO_CB_OFFSET); | 261 | BUILD_BUG_ON(sizeof(*IPCB(skb)) > SKB_SGO_CB_OFFSET); |