diff --git a/dp-core/vr_interface.c b/dp-core/vr_interface.c index 68f58fba2..ec3b4fe5d 100644 --- a/dp-core/vr_interface.c +++ b/dp-core/vr_interface.c @@ -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) diff --git a/include/vr_packet.h b/include/vr_packet.h index 897a0bf73..19f26c906 100644 --- a/include/vr_packet.h +++ b/include/vr_packet.h @@ -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; } diff --git a/linux/vhost_dev.c b/linux/vhost_dev.c index 6187056a6..8be7ea910 100644 --- a/linux/vhost_dev.c +++ b/linux/vhost_dev.c @@ -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 diff --git a/linux/vr_host_interface.c b/linux/vr_host_interface.c index 8c2ffb409..89ea5e74f 100644 --- a/linux/vr_host_interface.c +++ b/linux/vr_host_interface.c @@ -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);