From: Jesper Dangaard Brouer <brouer@redhat.com>
To: "İbrahim Ercan" <ibrahim.metu@gmail.com>
Cc: xdp-newbies@vger.kernel.org, brouer@redhat.com,
David Ahern <dsahern@gmail.com>
Subject: Re: ethtool isn't showing xdp statistics
Date: Mon, 10 Jun 2019 12:15:40 +0200 [thread overview]
Message-ID: <20190610121540.36391dc3@carbon> (raw)
In-Reply-To: <CAK6Qs9=ig3-PWKtSk7UJfm1gcWz9cSGYU7uDxxUw=xju5TtP9w@mail.gmail.com>
On Mon, 10 Jun 2019 12:55:07 +0300
İbrahim Ercan <ibrahim.metu@gmail.com> wrote:
> Hi.
> I'm trying to do a xdp performance test on redhat based environment.
> To do so, I compiled kernel 5.0.13 and iproute 4.6.0
> Then I loaded compiled code to interface with below command.
> #ip -force link set dev enp7s0f0 xdp object xdptest.o
>
> After that packets dropped as expected but I can not see statistics
> with ethtool command like below.
> #ethtool -S enp7s0f0 | grep xdp
>
> ethtool version is 4.8
> I did my test with that NIC
> Intel Corporation 82599ES 10-Gigabit SFI/SFP+ Network Connection (rev 01)
>
> I wonder why I can't see statistics. Did I miss something while
> compiling kernel or iproute? Should I also compile ethtool too?
You did nothing wrong. Consistency for statistics with XDP is a known
issue, see [1]. The behavior varies per driver, which obviously is bad
from a user perspective. You NIC is based on ixgbe driver, which don't
have ethtool stats counters for XDP, instead it actually updates
ifconfig counters correctly. While for mlx5 it's opposite (p.s. I use
this[2] ethtool stats tool).
We want to bring consistency in this area, but there are performance
concerns. As any stat counter will bring overhead, and XDP is all
about maximum performance. Thus, we want this counter overhead to be
opt-in (that is not on as default).
Currently you have to add the stats your want to the XDP/BPF program
itself. That is the current opt-in mechanism. To help you coded this,
we have an example here[3].
[1] https://github.com/xdp-project/xdp-project/blob/master/xdp-project.org#consistency-for-statistics-with-xdp
[2] https://github.com/netoptimizer/network-testing/blob/master/bin/ethtool_stats.pl
[3] https://github.com/xdp-project/xdp-tutorial/blob/master/common/xdp_stats_kern.h
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2019-06-10 10:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-10 9:55 ethtool isn't showing xdp statistics İbrahim Ercan
2019-06-10 10:15 ` Jesper Dangaard Brouer [this message]
2019-06-11 9:18 ` İbrahim Ercan
2019-06-11 10:42 ` Jesper Dangaard Brouer
2019-06-11 13:18 ` İbrahim Ercan
2019-06-11 14:45 ` Jesper Dangaard Brouer
2019-06-12 6:57 ` İbrahim Ercan
2019-06-12 7:53 ` Jesper Dangaard Brouer
2019-06-12 8:59 ` İbrahim Ercan
2019-06-13 13:02 ` İbrahim Ercan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190610121540.36391dc3@carbon \
--to=brouer@redhat.com \
--cc=dsahern@gmail.com \
--cc=ibrahim.metu@gmail.com \
--cc=xdp-newbies@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.