vlib: fix the offload flags size
Type: fix
Change-Id: I433fe3799975fe3ba00fa30226f6e8dae34e88fc
Signed-off-by: Mohsin Kazmi <sykazmi@cisco.com>
diff --git a/src/vnet/devices/af_packet/node.c b/src/vnet/devices/af_packet/node.c
index 16cd69a..9fd115f 100644
--- a/src/vnet/devices/af_packet/node.c
+++ b/src/vnet/devices/af_packet/node.c
@@ -120,7 +120,7 @@
mark_tcp_udp_cksum_calc (vlib_buffer_t *b, u8 *l4_hdr_sz)
{
ethernet_header_t *eth = vlib_buffer_get_current (b);
- u32 oflags = 0;
+ vnet_buffer_oflags_t oflags = 0;
if (clib_net_to_host_u16 (eth->type) == ETHERNET_TYPE_IP4)
{
ip4_header_t *ip4 =
diff --git a/src/vnet/devices/virtio/device.c b/src/vnet/devices/virtio/device.c
index 2026478..666cd16 100644
--- a/src/vnet/devices/virtio/device.c
+++ b/src/vnet/devices/virtio/device.c
@@ -285,7 +285,7 @@
set_checksum_offsets (vlib_buffer_t *b, virtio_net_hdr_v1_t *hdr,
const int is_l2)
{
- u32 oflags = vnet_buffer (b)->oflags;
+ vnet_buffer_oflags_t oflags = vnet_buffer (b)->oflags;
if (b->flags & VNET_BUFFER_F_IS_IP4)
{
@@ -334,7 +334,7 @@
static void
set_gso_offsets (vlib_buffer_t *b, virtio_net_hdr_v1_t *hdr, const int is_l2)
{
- u32 oflags = vnet_buffer (b)->oflags;
+ vnet_buffer_oflags_t oflags = vnet_buffer (b)->oflags;
if (b->flags & VNET_BUFFER_F_IS_IP4)
{
diff --git a/src/vnet/devices/virtio/node.c b/src/vnet/devices/virtio/node.c
index f91dc87..c36c080 100644
--- a/src/vnet/devices/virtio/node.c
+++ b/src/vnet/devices/virtio/node.c
@@ -75,7 +75,7 @@
if (hdr->flags & VIRTIO_NET_HDR_F_NEEDS_CSUM)
{
u16 ethertype = 0, l2hdr_sz = 0;
- u32 oflags = 0;
+ vnet_buffer_oflags_t oflags = 0;
if (type == VIRTIO_IF_TYPE_TUN)
{
diff --git a/src/vnet/devices/virtio/vhost_user_input.c b/src/vnet/devices/virtio/vhost_user_input.c
index 1636bd8..69fba41 100644
--- a/src/vnet/devices/virtio/vhost_user_input.c
+++ b/src/vnet/devices/virtio/vhost_user_input.c
@@ -253,7 +253,7 @@
ethernet_header_t *eh = (ethernet_header_t *) b0_data;
u16 ethertype = clib_net_to_host_u16 (eh->type);
u16 l2hdr_sz = sizeof (ethernet_header_t);
- u32 oflags = 0;
+ vnet_buffer_oflags_t oflags = 0;
if (ethernet_frame_is_tagged (ethertype))
{
diff --git a/src/vnet/devices/virtio/vhost_user_output.c b/src/vnet/devices/virtio/vhost_user_output.c
index 6406fe3..59ea810 100644
--- a/src/vnet/devices/virtio/vhost_user_output.c
+++ b/src/vnet/devices/virtio/vhost_user_output.c
@@ -225,7 +225,7 @@
generic_header_offset_t gho = { 0 };
int is_ip4 = b->flags & VNET_BUFFER_F_IS_IP4;
int is_ip6 = b->flags & VNET_BUFFER_F_IS_IP6;
- u32 oflags = vnet_buffer (b)->oflags;
+ vnet_buffer_oflags_t oflags = vnet_buffer (b)->oflags;
ASSERT (!(is_ip4 && is_ip6));
vnet_generic_header_offset_parser (b, &gho, 1 /* l2 */ , is_ip4, is_ip6);