Signed-off-by: Maxim Uvarov <maxim.uva...@linaro.org> --- platform/linux-generic/pktio/netmap.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/platform/linux-generic/pktio/netmap.c b/platform/linux-generic/pktio/netmap.c index 794c82e..920c365 100644 --- a/platform/linux-generic/pktio/netmap.c +++ b/platform/linux-generic/pktio/netmap.c @@ -168,6 +168,12 @@ static int netmap_open(odp_pktio_t id ODP_UNUSED, pktio_entry_t *pktio_entry, if (err) goto error; + /* netmap uses only ethtool to get statistics counters */ + pktio_entry->s.use_ethtool = 1; + err = sock_stats_reset(pktio_entry); + if (err != 0) + goto error; + /* Wait for the link to come up */ for (i = 0; i < NM_OPEN_RETRIES; i++) { err = netmap_do_ioctl(pktio_entry, SIOCETHTOOL, ETHTOOL_GLINK); @@ -313,6 +319,8 @@ const pktio_if_ops_t netmap_pktio_ops = { .close = netmap_close, .start = NULL, .stop = NULL, + .stats = sock_stats, + .stats_reset = sock_stats_reset, .recv = netmap_recv, .send = netmap_send, .mtu_get = netmap_mtu_get, -- 1.9.1 _______________________________________________ lng-odp mailing list lng-odp@lists.linaro.org https://lists.linaro.org/mailman/listinfo/lng-odp