Type: fix
virtio transmit node uses header offsets to set the
appropriate metadata for packet with offloads. But
l2_hdr_offset is not correctly set by previous node(s).
This patch makes use of curren_data field as l2_hdr_offset.
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
Change-Id: Id2f41a7650be45c9cc1ebacc7bec298be79bf218
const int is_l2)
{
vnet_buffer_oflags_t oflags = vnet_buffer (b)->oflags;
- i16 l4_hdr_offset =
- vnet_buffer (b)->l4_hdr_offset - vnet_buffer (b)->l2_hdr_offset;
+ i16 l4_hdr_offset = vnet_buffer (b)->l4_hdr_offset - b->current_data;
if (b->flags & VNET_BUFFER_F_IS_IP4)
{
ip4_header_t *ip4;
const int is_l2)
{
vnet_buffer_oflags_t oflags = vnet_buffer (b)->oflags;
- i16 l4_hdr_offset =
- vnet_buffer (b)->l4_hdr_offset - vnet_buffer (b)->l2_hdr_offset;
+ i16 l4_hdr_offset = vnet_buffer (b)->l4_hdr_offset - b->current_data;
if (b->flags & VNET_BUFFER_F_IS_IP4)
{