From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: Kernel 4.19 network performance - forwarding/routing normal users traffic Date: Fri, 9 Nov 2018 17:06:59 -0700 Message-ID: References: <61697e49-e839-befc-8330-fc00187c48ee@itcare.pl> <3a88bb53-9d17-3e85-638e-a605f5bfe0fb@gmail.com> <20181101115522.10b0dd0a@redhat.com> <63198d68-6752-3695-f406-d86fb395c12b@itcare.pl> <7141e1e0-93e4-ab20-bce6-17f1e14682f1@gmail.com> <394a0bf2-fa97-1085-2eda-98ddf476895c@itcare.pl> <6ed1666d-47bc-24e7-d432-a0c0027452ed@gmail.com> <8dde3b32-59ce-38f3-5913-2ce08264e9dc@itcare.pl> <6165513d-1e27-31dc-8f94-9de029a73f93@gmail.com> <77027868-2b96-8c1d-f485-c7b36c6d9fa9@itcare.pl> <1017e0cd-d8a1-ca2f-7d1d-8edad5a37eeb@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: netdev , Yoel Caspersen To: =?UTF-8?Q?Pawe=c5=82_Staszewski?= , Jesper Dangaard Brouer Return-path: Received: from mail-pl1-f195.google.com ([209.85.214.195]:46207 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726688AbeKJJt7 (ORCPT ); Sat, 10 Nov 2018 04:49:59 -0500 Received: by mail-pl1-f195.google.com with SMTP id c13-v6so1618385plz.13 for ; Fri, 09 Nov 2018 16:07:02 -0800 (PST) In-Reply-To: <1017e0cd-d8a1-ca2f-7d1d-8edad5a37eeb@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/9/18 9:21 AM, David Ahern wrote: >> Is there possible to add only counters from xdp for vlans ? >> This will help me in testing. > I will take a look today at adding counters that you can dump using > bpftool. It will be a temporary solution for this xdp program only. > Same tree, kernel-tables-wip-02 branch. Compile kernel and install. Compile samples as before. If you give the userspace program a -t arg, it loop showing stats. Ctrl-C to break. The xdp programs are not detached on exit. Example: ./xdp_fwd -t 5 eth1 eth2 eth3 eth4 15:59:32: rx tx dropped skipped l3_dev fib_dev index 3: 901158 901158 0 18 0 0 index 4: 901159 901158 0 20 0 901139 index 10: 0 0 0 0 19 19 index 11: 0 0 0 0 901139 901139 index 15: 0 0 0 0 19 19 index 16: 0 0 0 0 901139 0 Rx and Tx counters are for the physical port. VLANs show up as l3_dev (ingress) and fib_dev (egress). dropped is anytime the xdp program returns XDP_DROP (e.g., invalid packet) skipped is anytime the program returns XDP_PASS (e.g., not ipv4 or ipv6, local traffic, or needs full stack assist).