dpdk: Prefetch correct size of rte_mbuf
[vpp.git] / src / plugins / dpdk / device / device.c
index 836357f..8778d71 100644 (file)
@@ -214,7 +214,7 @@ static_always_inline void
 dpdk_prefetch_buffer (vlib_main_t * vm, struct rte_mbuf *mb)
 {
   vlib_buffer_t *b = vlib_buffer_from_rte_mbuf (mb);
-  CLIB_PREFETCH (mb, 2 * CLIB_CACHE_LINE_BYTES, STORE);
+  CLIB_PREFETCH (mb, sizeof (struct rte_mbuf), STORE);
   CLIB_PREFETCH (b, CLIB_CACHE_LINE_BYTES, LOAD);
 }
 
@@ -397,6 +397,7 @@ dpdk_clear_hw_interface_counters (u32 instance)
   dpdk_main_t *dm = &dpdk_main;
   dpdk_device_t *xd = vec_elt_at_index (dm->devices, instance);
 
+  rte_eth_stats_reset (xd->port_id);
   rte_eth_xstats_reset (xd->port_id);
 }