From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.bufferbloat.net (Postfix) with ESMTPS id 349EA3B29D for ; Thu, 8 Dec 2022 20:28:07 -0500 (EST) Received: by mail-wr1-x429.google.com with SMTP id u12so3721309wrr.11 for ; Thu, 08 Dec 2022 17:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=rg7RwK3tFDr1oGfNLX/Bwosbqg+w0rwUYF4bqK5Epmo=; b=RyC14rgxhGCix1Ehdi1fPe/2jPBI6FaFSX5q9rYjg58AGEleB+USI/akG4XFYGKJWh kvJ5pbFGnwJe3A3SeUAvILkMfWWRnHrhvM5fzZO7yxj/RdBbwuppHdH5J7xxgQtLs4cJ 2hhm+QDXh74GnuiOHY0NH9o7jETxIgj1ht6iR08PSRYiEbA/7biUAs0uanPAh1zHGpbG SUqYfky1VOL44DdfoqvPYkSLAPK5xmNfSzhLoCi3A15EZBZ9XK6SSSGjL3xpEC26YHNm TUEW5e35hrTUq0GVy289X3vng95tO2SxHTw0kWWbHHB6gnqtJD3BLlbV2xdBOW4Vz547 hOvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rg7RwK3tFDr1oGfNLX/Bwosbqg+w0rwUYF4bqK5Epmo=; b=4IqUDNT9TZpqgIeBk0z94qlOk5HIz0giRGxJj2Jd5I3uYRPiutJvJQcOh/ph4VWXjf QF8DtmdXwuaaW+hCfGKSo0fPEmTlmEiDiCH/SX+SnMux/1Vv7ZD/hQ7D/E5FbieUkHyl P7hKB6r1DVufMpNp273va/yKib0kYwxTbGhPuYqYZU0yvtquhza0dwcy4LeQJ2Xr6ClU m6uJ1NUZZd1KoS/+vVoUjp5bQrmNDKlEkPu3LILguh+4IIXvIrnp0zkibbSZYPEzkJCX weuYrCNS64uOCPgx4NDzHz7FyTWlYvMXxGD0grUosb99xlbojhCnSwJLWUjypaka8zTX oquw== X-Gm-Message-State: ANoB5pk0PXNOQxEpk6fbgGOeIxaY2OeQLQE/w7tCbRZ72w4Go317bnU/ D/EO6HmFIbZRxxkU/mjr6UfEVIpHSEjEH0L7jyiUaraHxeg= X-Google-Smtp-Source: AA0mqf46i2o90pA2gl4JCuJOTPp3H6CCebiod+u0392twpqjXAWAjhtZn48sk7jStAiRQ0SH8Px+FLqp40uV4PDrZa0= X-Received: by 2002:adf:d4cd:0:b0:241:fc9e:fb90 with SMTP id w13-20020adfd4cd000000b00241fc9efb90mr38246643wrk.430.1670549285759; Thu, 08 Dec 2022 17:28:05 -0800 (PST) MIME-Version: 1.0 References: <20221206024554.3826186-1-sdf@google.com> <20221206024554.3826186-12-sdf@google.com> <875yellcx6.fsf@toke.dk> In-Reply-To: <875yellcx6.fsf@toke.dk> From: Dave Taht Date: Thu, 8 Dec 2022 17:27:53 -0800 Message-ID: To: libreqos Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: [LibreQoS] Fwd: [PATCH bpf-next v3 11/12] mlx5: Support RX XDP metadata X-BeenThere: libreqos@lists.bufferbloat.net X-Mailman-Version: 2.1.20 Precedence: list List-Id: Many ISPs need the kinds of quality shaping cake can do List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Dec 2022 01:28:07 -0000 ---------- Forwarded message --------- From: Toke H=C3=B8iland-J=C3=B8rgensen 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 , Cc: , , , , , , , , , , , Saeed Mahameed , David Ahern , Jakub Kicinski , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , , Stanislav Fomichev writes: > From: Toke H=C3=B8iland-J=C3=B8rgensen > > 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 --=20 This song goes out to all the folk that thought Stadia would work: https://www.linkedin.com/posts/dtaht_the-mushroom-song-activity-69813666656= 07352320-FXtz Dave T=C3=A4ht CEO, TekLibre, LLC