examples/vhost: fix offload settings
authorYuanhan Liu <yuanhan.liu@linux.intel.com>
Fri, 25 Mar 2016 07:58:51 +0000 (15:58 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Fri, 25 Mar 2016 18:53:00 +0000 (19:53 +0100)
commitdf40169ac0e2f82847812b4082258dee518572fb
treee84b18202c94098f5d6c1ed417d63592e5d7983a
parent5674dad222d62130ae3ba59fe818caaa4843957c
examples/vhost: fix offload settings

Comments for PKT_TX_TCP_SEG at rte_mbuf says that we should only set
PKT_TX_IP_CKSUM and reset ip hdr checksum for IPv4:

  - if it's IPv4, set the PKT_TX_IP_CKSUM flag and write the IP checksum
    to 0 in the packet

Fixes: 9fd72e3cbd29 ("examples/vhost: add virtio offload")

Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
examples/vhost/main.c