diff --git a/src/vnet/pg/input.c b/src/vnet/pg/input.c
index 2d850e9..151624f 100644
--- a/src/vnet/pg/input.c
+++ b/src/vnet/pg/input.c
@@ -50,6 +50,9 @@
 #include <vnet/vnet.h>
 #include <vnet/ethernet/ethernet.h>
 #include <vnet/feature/feature.h>
+#include <vnet/ip/ip4_packet.h>
+#include <vnet/ip/ip6_packet.h>
+#include <vnet/udp/udp_packet.h>
 #include <vnet/devices/devices.h>
 
 static int
@@ -1523,6 +1526,70 @@
     }
 }
 
+static_always_inline void
+fill_gso_buffer_flags (vlib_main_t * vm, u32 * buffers, u32 n_buffers,
+		       u32 packet_data_size)
+{
+
+  for (int i = 0; i < n_buffers; i++)
+    {
+      vlib_buffer_t *b0 = vlib_get_buffer (vm, buffers[i]);
+      u8 l4_proto = 0;
+      u8 l4_hdr_sz = 0;
+
+      ethernet_header_t *eh = (ethernet_header_t *) b0->data;
+      u16 ethertype = clib_net_to_host_u16 (eh->type);
+      u16 l2hdr_sz = sizeof (ethernet_header_t);
+
+      vnet_buffer (b0)->l2_hdr_offset = 0;
+      vnet_buffer (b0)->l3_hdr_offset = l2hdr_sz;
+      if (PREDICT_TRUE (ethertype == ETHERNET_TYPE_IP4))
+	{
+	  ip4_header_t *ip4 = (ip4_header_t *) (b0->data + l2hdr_sz);
+	  vnet_buffer (b0)->l4_hdr_offset = l2hdr_sz + ip4_header_bytes (ip4);
+	  l4_proto = ip4->protocol;
+	  b0->flags |=
+	    (VNET_BUFFER_F_IS_IP4 | VNET_BUFFER_F_L2_HDR_OFFSET_VALID
+	     | VNET_BUFFER_F_L3_HDR_OFFSET_VALID |
+	     VNET_BUFFER_F_L4_HDR_OFFSET_VALID);
+	  b0->flags |= VNET_BUFFER_F_OFFLOAD_IP_CKSUM;
+	}
+      else if (PREDICT_TRUE (ethertype == ETHERNET_TYPE_IP6))
+	{
+	  ip6_header_t *ip6 = (ip6_header_t *) (b0->data + l2hdr_sz);
+	  /* FIXME IPv6 EH traversal */
+	  vnet_buffer (b0)->l4_hdr_offset = l2hdr_sz + sizeof (ip6_header_t);
+	  l4_proto = ip6->protocol;
+	  b0->flags |=
+	    (VNET_BUFFER_F_IS_IP6 | VNET_BUFFER_F_L2_HDR_OFFSET_VALID
+	     | VNET_BUFFER_F_L3_HDR_OFFSET_VALID |
+	     VNET_BUFFER_F_L4_HDR_OFFSET_VALID);
+	  b0->flags |= VNET_BUFFER_F_OFFLOAD_IP_CKSUM;
+	}
+      if (l4_proto == IP_PROTOCOL_TCP)
+	{
+	  b0->flags |= VNET_BUFFER_F_OFFLOAD_TCP_CKSUM;
+	  tcp_header_t *tcp = (tcp_header_t *) (b0->data +
+						vnet_buffer
+						(b0)->l4_hdr_offset);
+	  l4_hdr_sz = tcp_header_bytes (tcp);
+	  tcp->checksum = 0;
+	  vnet_buffer2 (b0)->gso_l4_hdr_sz = l4_hdr_sz;
+	  vnet_buffer2 (b0)->gso_size = packet_data_size;
+	  b0->flags |= VNET_BUFFER_F_GSO;
+	}
+      else if (l4_proto == IP_PROTOCOL_UDP)
+	{
+	  b0->flags |= VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
+	  udp_header_t *udp = (udp_header_t *) (b0->data +
+						vnet_buffer
+						(b0)->l4_hdr_offset);
+	  vnet_buffer2 (b0)->gso_l4_hdr_sz = sizeof (*udp);
+	  udp->checksum = 0;
+	}
+    }
+}
+
 static uword
 pg_generate_packets (vlib_node_runtime_t * node,
 		     pg_main_t * pg,
@@ -1538,6 +1605,7 @@
   u8 feature_arc_index = fm->device_input_feature_arc_index;
   cm = &fm->feature_config_mains[feature_arc_index];
   u32 current_config_index = ~(u32) 0;
+  pg_interface_t *pi = pool_elt_at_index (pg->interfaces, s->pg_if_index);
   int i;
 
   bi0 = s->buffer_indices;
@@ -1564,14 +1632,12 @@
 	  vlib_next_frame_t *nf;
 	  vlib_frame_t *f;
 	  ethernet_input_frame_t *ef;
-	  pg_interface_t *pi;
 	  vlib_get_new_next_frame (vm, node, next_index, to_next, n_left);
 	  nf = vlib_node_runtime_get_next_frame (vm, node, next_index);
 	  f = vlib_get_frame (vm, nf->frame);
 	  f->flags = ETH_INPUT_FRAME_F_SINGLE_SW_IF_IDX;
 
 	  ef = vlib_frame_scalar_args (f);
-	  pi = pool_elt_at_index (pg->interfaces, s->pg_if_index);
 	  ef->sw_if_index = pi->sw_if_index;
 	  ef->hw_if_index = pi->hw_if_index;
 	  vlib_frame_no_append (f);
@@ -1615,6 +1681,9 @@
 	    vnet_buffer (b)->feature_arc_index = feature_arc_index;
 	  }
 
+      if (pi->gso_enabled)
+	fill_gso_buffer_flags (vm, to_next, n_this_frame, pi->gso_size);
+
       n_trace = vlib_get_trace_count (vm, node);
       if (n_trace > 0)
 	{
