Hi, 11/03/2014 05:38, Hiroshi Shimamoto: > From: Hiroshi Shimamoto <h-shimamoto at ct.jp.nec.com> > > Implement missing feature to account statistics. > This patch adds just an infrastructure. > > Signed-off-by: Hiroshi Shimamoto <h-shimamoto at ct.jp.nec.com> > Reviewed-by: Hayato Momma <h-momma at ce.jp.nec.com>
[...] > @@ -51,6 +51,7 @@ struct memnic_adapter { > int up_idx, down_idx; > struct rte_mempool *mp; > struct ether_addr mac_addr; > + struct rte_eth_stats stats[RTE_MAX_LCORE]; > }; Could you make a comment to explain why you allocate a structure per core? It is easier to read when locking strategy is described. > + for (i = 0; i < RTE_MAX_LCORE; i++) { > + struct rte_eth_stats *st = &adapter->stats[i]; > + > + memset(st, 0, sizeof(*st)); > + } Could you use only one memset for the array? -- Thomas