Skip to contentSkip to conversation

About over-MTU-sized skb in virtualized env

Discussion Du Fan 2 participants 2 messages Dec 3, 2014

Subsystems (2)
lore
Share & tools
lore

Du Fan

author
#0 lore raw

Sorry for resend this mail, because my company email is rejected by netdev.

Hi Florian

214 static int ip_finish_output_gso(struct sk_buff *skb) 215 {

 216     netdev_features_t features;
 217     struct sk_buff *segs;
 218     int ret = 0;

219
220 /* common case: locally created skb or seglen is <= mtu */
221 if (((IPCB(skb)->flags & IPSKB_FORWARDED) == 0) ||
222 skb_gso_network_seglen(skb) <= ip_skb_dst_mtu(skb))
223 return ip_finish_output2(skb);

Could you please state _concrete_ reason why locally created skb length is _always_ fitting into MTU size? or why we needs this checking.
Especially in below scenario:
http://docs.openstack.org/admin-guide-cloud/content/figures/14/a/a/common/figures/under-the-hood-scenario-1-ovs-compute.png

As many people have discuss it in this thread:
http://marc.info/?t=141715669700004&r=1&w=2

#1 lore raw
Quoted 16 lines · Du Fan

Sorry for resend this mail, because my company email is rejected by netdev.

Hi Florian

214 static int ip_finish_output_gso(struct sk_buff *skb) 215 {

 216     netdev_features_t features;
 217     struct sk_buff *segs;
 218     int ret = 0;

219
220 /* common case: locally created skb or seglen is <= mtu */
221 if (((IPCB(skb)->flags & IPSKB_FORWARDED) == 0) ||
222 skb_gso_network_seglen(skb) <= ip_skb_dst_mtu(skb))
223 return ip_finish_output2(skb);

Quoted 3 lines

Could you please state _concrete_ reason why locally created skb length is _always_ fitting into MTU size? or why we needs this checking.

We don't "need" this checking. Its just to avoid skb_gso_network_seglen() computation for the common (local-out) case.

Locally generated GSO packet is not supposed to exceed dst_mtu, as that is the PMTU discovery start point in absence of lower/learned value.