Re: [dpdk-dev] [PATCH] net/virtio: do not gso when no header is present

2017-01-30 Thread Yuanhan Liu
On Tue, Jan 24, 2017 at 09:36:03PM +0100, Emmanuel Roullit wrote: > Found with clang static analysis: > lib/librte_vhost/virtio_net.c:723:17: warning: > Access to field 'data_off' results in a dereference of a null pointer > (loaded from variable 'tcp_hdr') > m->l4_len = (tcp_hdr->data_off

[dpdk-dev] [PATCH] net/virtio: do not gso when no header is present

2017-01-24 Thread Emmanuel Roullit
Found with clang static analysis: lib/librte_vhost/virtio_net.c:723:17: warning: Access to field 'data_off' results in a dereference of a null pointer (loaded from variable 'tcp_hdr') m->l4_len = (tcp_hdr->data_off & 0xf0) >> 2; ^ Fixes: 2a51b1091cb5 ("