diff options
Diffstat (limited to 'src/plugins/avf/output.c')
-rw-r--r-- | src/plugins/avf/output.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/plugins/avf/output.c b/src/plugins/avf/output.c index b50a1e23c7a..decd8b5b939 100644 --- a/src/plugins/avf/output.c +++ b/src/plugins/avf/output.c @@ -63,9 +63,14 @@ avf_tx_prepare_cksum (vlib_buffer_t * b, u8 is_tso) vnet_buffer_oflags_t oflags = vnet_buffer (b)->oflags; u32 is_tcp = is_tso || oflags & VNET_BUFFER_OFFLOAD_F_TCP_CKSUM; u32 is_udp = !is_tso && oflags & VNET_BUFFER_OFFLOAD_F_UDP_CKSUM; + + if (!is_tcp && !is_udp) + return 0; + u32 is_ip4 = b->flags & VNET_BUFFER_F_IS_IP4; u32 is_ip6 = b->flags & VNET_BUFFER_F_IS_IP6; - ASSERT (!is_tcp || !is_udp); + + ASSERT (!(is_tcp && is_udp)); ASSERT (is_ip4 || is_ip6); i16 l2_hdr_offset = b->current_data; i16 l3_hdr_offset = vnet_buffer (b)->l3_hdr_offset; |