Many ISPs need the kinds of quality shaping cake can do
 help / color / mirror / Atom feed
From: Dave Taht <dave.taht@gmail.com>
To: libreqos <libreqos@lists.bufferbloat.net>
Subject: [LibreQoS] Fwd: [PATCH bpf-next v3 11/12] mlx5: Support RX XDP metadata
Date: Thu, 8 Dec 2022 17:27:53 -0800	[thread overview]
Message-ID: <CAA93jw5Wff7n3TfBQQZYTano8UxuNgFHFJg3bxPQAV71H6FR+g@mail.gmail.com> (raw)
In-Reply-To: <875yellcx6.fsf@toke.dk>

---------- Forwarded message ---------
From: Toke Høiland-Jørgensen <toke@redhat.com>
Date: Thu, Dec 8, 2022 at 3:06 PM
Subject: Re: [PATCH bpf-next v3 11/12] mlx5: Support RX XDP metadata
To: Stanislav Fomichev <sdf@google.com>, <bpf@vger.kernel.org>
Cc: <ast@kernel.org>, <daniel@iogearbox.net>, <andrii@kernel.org>,
<martin.lau@linux.dev>, <song@kernel.org>, <yhs@fb.com>,
<john.fastabend@gmail.com>, <kpsingh@kernel.org>, <sdf@google.com>,
<haoluo@google.com>, <jolsa@kernel.org>, Saeed Mahameed
<saeedm@nvidia.com>, David Ahern <dsahern@gmail.com>, Jakub Kicinski
<kuba@kernel.org>, Willem de Bruijn <willemb@google.com>, Jesper
Dangaard Brouer <brouer@redhat.com>, Anatoly Burakov
<anatoly.burakov@intel.com>, Alexander Lobakin
<alexandr.lobakin@intel.com>, Magnus Karlsson
<magnus.karlsson@gmail.com>, Maryam Tahhan <mtahhan@redhat.com>,
<xdp-hints@xdp-project.net>, <netdev@vger.kernel.org>


Stanislav Fomichev <sdf@google.com> writes:

> From: Toke Høiland-Jørgensen <toke@redhat.com>
>
> Support RX hash and timestamp metadata kfuncs. We need to pass in the cqe
> pointer to the mlx5e_skb_from* functions so it can be retrieved from the
> XDP ctx to do this.

So I finally managed to get enough ducks in row to actually benchmark
this. With the caveat that I suddenly can't get the timestamp support to
work (it was working in an earlier version, but now
timestamp_supported() just returns false). I'm not sure if this is an
issue with the enablement patch, or if I just haven't gotten the
hardware configured properly. I'll investigate some more, but figured
I'd post these results now:

Baseline XDP_DROP:         25,678,262 pps / 38.94 ns/pkt
XDP_DROP + read metadata:  23,924,109 pps / 41.80 ns/pkt
Overhead:                   1,754,153 pps /  2.86 ns/pkt

As per the above, this is with calling three kfuncs/pkt
(metadata_supported(), rx_hash_supported() and rx_hash()). So that's
~0.95 ns per function call, which is a bit less, but not far off from
the ~1.2 ns that I'm used to. The tests where I accidentally called the
default kfuncs cut off ~1.3 ns for one less kfunc call, so it's
definitely in that ballpark.

I'm not doing anything with the data, just reading it into an on-stack
buffer, so this is the smallest possible delta from just getting the
data out of the driver. I did confirm that the call instructions are
still in the BPF program bytecode when it's dumped back out from the
kernel.

-Toke



-- 
This song goes out to all the folk that thought Stadia would work:
https://www.linkedin.com/posts/dtaht_the-mushroom-song-activity-6981366665607352320-FXtz
Dave Täht CEO, TekLibre, LLC

      parent reply	other threads:[~2022-12-09  1:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221206024554.3826186-1-sdf@google.com>
     [not found] ` <20221206024554.3826186-12-sdf@google.com>
2022-12-06  3:03   ` Dave Taht
     [not found]   ` <875yellcx6.fsf@toke.dk>
2022-12-09  1:27     ` Dave Taht [this message]

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

  List information: https://lists.bufferbloat.net/postorius/lists/libreqos.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAA93jw5Wff7n3TfBQQZYTano8UxuNgFHFJg3bxPQAV71H6FR+g@mail.gmail.com \
    --to=dave.taht@gmail.com \
    --cc=libreqos@lists.bufferbloat.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox