+ if (offset == 0)
+ {
+ b0->total_length_not_including_first_buffer = 0;
+ b0->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID;
+ vnet_buffer (b0)->sw_if_index[VLIB_RX] =
+ apif->sw_if_index;
+ vnet_buffer (b0)->sw_if_index[VLIB_TX] = (u32) ~0;
+ first_bi0 = bi0;
+ first_b0 = vlib_get_buffer (vm, first_bi0);
+ if (tph->tp_status & TP_STATUS_CSUMNOTREADY)
+ mark_tcp_udp_cksum_calc (first_b0, &l4_hdr_sz);
+ /* This is a trade-off for GSO. As kernel isn't passing
+ * us the GSO state or size, we guess it by comparing it
+ * to the host MTU of the interface */
+ if (tph->tp_snaplen > (apif->host_mtu + eth_header_size))
+ fill_gso_buffer_flags (first_b0, apif->host_mtu,
+ l4_hdr_sz);
+ }
+ else
+ buffer_add_to_chain (vm, bi0, first_bi0, prev_bi0);