summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorSimon Zhang <yuwei1.zhang@intel.com>2019-04-22 23:20:47 +0800
committerDamjan Marion <dmarion@me.com>2019-04-25 20:43:15 +0000
commit746dddc553d7ecf77880525ef875a00a77f6cb9c (patch)
tree198fc518609d991cdd1b0706f8c8061eca20dc0c /src/plugins
parent286aa593a58df59e3a7d6f71bb2159dd439d7f76 (diff)
Change dpdk thread data flags type to u16 from u8 to get more useful data
Change-Id: Idc3763c38f5aa638d4f290f4d4730577601d78b8 Signed-off-by: Simon Zhang <yuwei1.zhang@intel.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/dpdk/device/dpdk.h2
-rw-r--r--src/plugins/dpdk/device/node.c11
2 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/dpdk/device/dpdk.h b/src/plugins/dpdk/device/dpdk.h
index fda42f996e9..bd9b35901d5 100644
--- a/src/plugins/dpdk/device/dpdk.h
+++ b/src/plugins/dpdk/device/dpdk.h
@@ -393,7 +393,7 @@ typedef struct
u32 buffers[DPDK_RX_BURST_SZ];
u16 next[DPDK_RX_BURST_SZ];
u16 etype[DPDK_RX_BURST_SZ];
- u8 flags[DPDK_RX_BURST_SZ];
+ u16 flags[DPDK_RX_BURST_SZ];
vlib_buffer_t buffer_template;
} dpdk_per_thread_data_t;
diff --git a/src/plugins/dpdk/device/node.c b/src/plugins/dpdk/device/node.c
index dd38272ecff..b859d48b9d4 100644
--- a/src/plugins/dpdk/device/node.c
+++ b/src/plugins/dpdk/device/node.c
@@ -145,7 +145,7 @@ dpdk_prefetch_buffer_x4 (struct rte_mbuf *mb[])
*/
static_always_inline u8
-dpdk_ol_flags_extract (struct rte_mbuf **mb, u8 * flags, int count)
+dpdk_ol_flags_extract (struct rte_mbuf **mb, u16 * flags, int count)
{
u8 rv = 0;
int i;
@@ -153,7 +153,7 @@ dpdk_ol_flags_extract (struct rte_mbuf **mb, u8 * flags, int count)
{
/* all flags we are interested in are in lower 8 bits but
that might change */
- flags[i] = (u8) mb[i]->ol_flags;
+ flags[i] = (u16) mb[i]->ol_flags;
rv |= flags[i];
}
return rv;
@@ -161,13 +161,14 @@ dpdk_ol_flags_extract (struct rte_mbuf **mb, u8 * flags, int count)
static_always_inline uword
dpdk_process_rx_burst (vlib_main_t * vm, dpdk_per_thread_data_t * ptd,
- uword n_rx_packets, int maybe_multiseg, u8 * or_flagsp)
+ uword n_rx_packets, int maybe_multiseg,
+ u16 * or_flagsp)
{
u32 n_left = n_rx_packets;
vlib_buffer_t *b[4];
struct rte_mbuf **mb = ptd->mbufs;
uword n_bytes = 0;
- u8 *flags, or_flags = 0;
+ u16 *flags, or_flags = 0;
vlib_buffer_t bt;
mb = ptd->mbufs;
@@ -292,7 +293,7 @@ dpdk_device_input (vlib_main_t * vm, dpdk_main_t * dm, dpdk_device_t * xd,
struct rte_mbuf **mb;
vlib_buffer_t *b0;
u16 *next;
- u8 or_flags;
+ u16 or_flags;
u32 n;
int single_next = 0;