netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: alexei.starovoitov@gmail.com, daniel@iogearbox.net
Cc: netdev@vger.kernel.org, oss-drivers@netronome.com,
	jaco.gericke@netronome.com,
	Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH bpf-next 0/2] nfp: bpf: add simple map op cache
Date: Tue, 27 Aug 2019 22:36:27 -0700	[thread overview]
Message-ID: <20190828053629.28658-1-jakub.kicinski@netronome.com> (raw)

Hi!

This set adds a small batching and cache mechanism to the driver.
Map dumps require two operations per element - get next, and
lookup. Each of those needs a round trip to the device, and on
a loaded system scheduling out and in of the dumping process.
This set makes the driver request a number of entries at the same
time, and if no operation which would modify the map happens
from the host side those entries are used to serve lookup
requests for up to 250us, at which point they are considered
stale.

This set has been measured to provide almost 4x dumping speed
improvement, Jaco says:

OLD dump times
    500 000 elements: 26.1s
      1 000 000 elements: 54.5s

NEW dump times
    500 000 elements: 7.6s
      1 000 000 elements: 16.5s

Jakub Kicinski (2):
  nfp: bpf: rework MTU checking
  nfp: bpf: add simple map op cache

 drivers/net/ethernet/netronome/nfp/bpf/cmsg.c | 187 ++++++++++++++++--
 drivers/net/ethernet/netronome/nfp/bpf/fw.h   |   1 +
 drivers/net/ethernet/netronome/nfp/bpf/main.c |  33 ++++
 drivers/net/ethernet/netronome/nfp/bpf/main.h |  24 +++
 .../net/ethernet/netronome/nfp/bpf/offload.c  |   3 +
 drivers/net/ethernet/netronome/nfp/nfp_net.h  |   2 +-
 .../ethernet/netronome/nfp/nfp_net_common.c   |   9 +-
 7 files changed, 239 insertions(+), 20 deletions(-)

-- 
2.21.0


             reply	other threads:[~2019-08-28  5:36 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-28  5:36 Jakub Kicinski [this message]
2019-08-28  5:36 ` [PATCH bpf-next 1/2] nfp: bpf: rework MTU checking Jakub Kicinski
2019-08-29 21:30   ` Song Liu
2019-08-28  5:36 ` [PATCH bpf-next 2/2] nfp: bpf: add simple map op cache Jakub Kicinski
2019-08-29 21:29   ` Song Liu
2019-08-29 21:36     ` Jakub Kicinski
2019-08-30 23:23 ` [PATCH bpf-next 0/2] " Daniel Borkmann

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=20190828053629.28658-1-jakub.kicinski@netronome.com \
    --to=jakub.kicinski@netronome.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=jaco.gericke@netronome.com \
    --cc=netdev@vger.kernel.org \
    --cc=oss-drivers@netronome.com \
    /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;
as well as URLs for NNTP newsgroup(s).