+ if (b0->flags & VNET_BUFFER_F_OFFLOAD_IP_CKSUM)
+ {
+ ip0->checksum = ip4_header_checksum (ip0);
+ b0->flags &= ~VNET_BUFFER_F_OFFLOAD_IP_CKSUM;
+ }
+ if (PREDICT_FALSE
+ (b0->flags & VNET_BUFFER_F_OFFLOAD_TCP_CKSUM))
+ {
+ tcp0->checksum =
+ ip4_tcp_udp_compute_checksum (vm, b0, ip0);
+ b0->flags &= ~VNET_BUFFER_F_OFFLOAD_TCP_CKSUM;
+ }
+ if (PREDICT_FALSE
+ (b0->flags & VNET_BUFFER_F_OFFLOAD_UDP_CKSUM))
+ {
+ udp0->checksum =
+ ip4_tcp_udp_compute_checksum (vm, b0, ip0);
+ b0->flags &= ~VNET_BUFFER_F_OFFLOAD_UDP_CKSUM;
+ }