Skip to content

Commit

Permalink
Merge "Enable GSO on vhost0 interface. Avoid setting gso_size to 0 wh…
Browse files Browse the repository at this point in the history
…en trapping packets to the agent and truncate the packets if they are GSO packets."
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Apr 4, 2015
2 parents 2364e22 + a7f5fac commit 5fc244f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions dp-core/vr_interface.c
Expand Up @@ -413,6 +413,10 @@ agent_send(struct vr_interface *vif, struct vr_packet *pkt,

vr_preset(pkt);

if (pkt_is_gso(pkt)) {
truncate = true;
}

if ((params->trap_reason == AGENT_TRAP_HANDLE_DF) ||
(params->trap_reason == AGENT_TRAP_ZERO_TTL)) {
if (pkt_len(pkt) > VR_AGENT_MIN_PACKET_LEN)
Expand Down
2 changes: 1 addition & 1 deletion include/vr_packet.h
Expand Up @@ -735,7 +735,7 @@ vr_init_forwarding_md(struct vr_forwarding_md *fmd)
static inline bool
pkt_is_gso(struct vr_packet *pkt)
{
if (vr_pgso_size(pkt))
if (vr_pgso_size && vr_pgso_size(pkt))
return true;
return false;
}
Expand Down
3 changes: 3 additions & 0 deletions linux/vhost_dev.c
Expand Up @@ -227,6 +227,9 @@ vhost_if_add(struct vr_interface *vif)

vp->vp_vifp = vif;
if (vif->vif_type == VIF_TYPE_HOST) {
dev->features |= (NETIF_F_GSO | NETIF_F_TSO |
NETIF_F_SG | NETIF_F_IP_CSUM);

if (vif->vif_bridge) {
/*
* if there already was an association, need to remove that
Expand Down
3 changes: 0 additions & 3 deletions linux/vr_host_interface.c
Expand Up @@ -321,9 +321,6 @@ linux_xmit(struct vr_interface *vif, struct sk_buff *skb,
skb->ip_summed == CHECKSUM_NONE)
skb->ip_summed = CHECKSUM_UNNECESSARY;

if (vif->vif_type == VIF_TYPE_AGENT)
skb_shinfo(skb)->gso_size = 0;

if ((type == VP_TYPE_IPOIP) &&
(skb->len > skb->dev->mtu + skb->dev->hard_header_len))
return linux_inet_fragment(vif, skb, type);
Expand Down

0 comments on commit 5fc244f

Please sign in to comment.