netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: John Fastabend <john.fastabend@gmail.com>
To: Magnus Karlsson <magnus.karlsson@gmail.com>,
	magnus.karlsson@intel.com, bjorn.topel@intel.com, ast@kernel.org,
	daniel@iogearbox.net, netdev@vger.kernel.org,
	jonathan.lemon@gmail.com
Cc: maciejromanfijalkowski@gmail.com,
	intel-wired-lan@lists.osuosl.org, bpf@vger.kernel.org
Subject: RE: [Intel-wired-lan] [PATCH bpf-next 2/6] samples/bpf: increment Tx stats at sending
Date: Mon, 09 Nov 2020 12:47:32 -0800	[thread overview]
Message-ID: <5fa9aae46c442_8c0e208b5@john-XPS-13-9370.notmuch> (raw)
In-Reply-To: <1604498942-24274-3-git-send-email-magnus.karlsson@gmail.com>

Magnus Karlsson wrote:
> From: Magnus Karlsson <magnus.karlsson@intel.com>
> 
> Increment the statistics over how many Tx packets have been sent at
> the time of sending instead of at the time of completion. This as a
> completion event means that the buffer has been sent AND returned to
> user space. The packet always gets sent shortly after sendto() is
> called. The kernel might, for performance reasons, decide to not
> return every single buffer to user space immediately after sending,
> for example, only after a batch of packets have been
> transmitted. Incrementing the number of packets sent at completion,
> will in that case be confusing as if you send a single packet, the
> counter might show zero for a while even though the packet has been
> transmitted.
> 
> Signed-off-by: Magnus Karlsson <magnus.karlsson@intel.com>
> ---

LGTM. Just one question then if we wanted to know the old value, packet
completion counter it looks like (tx_npkts - outstanding_tx) would give
that value?

Acked-by: John Fastabend <john.fastabend@gmail.com>

  reply	other threads:[~2020-11-09 20:47 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-04 14:08 [PATCH bpf-next 0/6] xsk: i40e: Tx performance improvements Magnus Karlsson
2020-11-04 14:08 ` [PATCH bpf-next 1/6] i40e: introduce lazy Tx completions for AF_XDP zero-copy Magnus Karlsson
2020-11-04 23:33   ` Jakub Kicinski
2020-11-04 23:35     ` Jakub Kicinski
2020-11-05 14:17     ` Magnus Karlsson
2020-11-05 15:45       ` Jakub Kicinski
2020-11-06 19:09         ` Magnus Karlsson
2020-11-04 14:08 ` [PATCH bpf-next 2/6] samples/bpf: increment Tx stats at sending Magnus Karlsson
2020-11-09 20:47   ` John Fastabend [this message]
2020-11-10  7:12     ` [Intel-wired-lan] " Magnus Karlsson
2020-11-04 14:08 ` [PATCH bpf-next 3/6] i40e: remove unnecessary sw_ring access from xsk Tx Magnus Karlsson
2020-11-09 20:48   ` [Intel-wired-lan] " John Fastabend
2020-11-04 14:09 ` [PATCH bpf-next 4/6] xsk: introduce padding between more ring pointers Magnus Karlsson
2020-11-09 20:43   ` [Intel-wired-lan] " John Fastabend
2020-11-04 14:09 ` [PATCH bpf-next 5/6] xsk: introduce batched Tx descriptor interfaces Magnus Karlsson
2020-11-09 21:06   ` [Intel-wired-lan] " John Fastabend
2020-11-10  8:28     ` Magnus Karlsson
2020-11-04 14:09 ` [PATCH bpf-next 6/6] i40e: use batched xsk Tx interfaces to increase performance Magnus Karlsson
2020-11-04 23:01   ` Maciej Fijalkowski
2020-11-05  7:19     ` Magnus Karlsson
2020-11-09 21:10   ` [Intel-wired-lan] " John Fastabend

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=5fa9aae46c442_8c0e208b5@john-XPS-13-9370.notmuch \
    --to=john.fastabend@gmail.com \
    --cc=ast@kernel.org \
    --cc=bjorn.topel@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jonathan.lemon@gmail.com \
    --cc=maciejromanfijalkowski@gmail.com \
    --cc=magnus.karlsson@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@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 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).