XDP hardware hints discussion mail archive
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Jesper Dangaard Brouer <jbrouer@redhat.com>
Cc: Paul Menzel <pmenzel@molgen.mpg.de>,
	brouer@redhat.com, bpf@vger.kernel.org,
	xdp-hints@xdp-project.net, martin.lau@kernel.org,
	daniel@iogearbox.net, netdev@vger.kernel.org, ast@kernel.org,
	Stanislav Fomichev <sdf@google.com>,
	yoong.siang.song@intel.com, anthony.l.nguyen@intel.com,
	intel-wired-lan@lists.osuosl.org
Subject: [xdp-hints] Re: [Intel-wired-lan] [PATCH bpf-next V1] igc: enable and fix RX hash usage by netstack
Date: Mon, 27 Feb 2023 15:53:57 +0100	[thread overview]
Message-ID: <2d3ccbe7-262b-c579-a8a7-eea84d7aa91e@intel.com> (raw)
In-Reply-To: <a499a5df-e128-b75f-50d0-69a868b18a71@intel.com>

From: Alexander Lobakin <aleksander.lobakin@intel.com>
Date: Thu, 16 Feb 2023 16:43:04 +0100

> From: Jesper Dangaard Brouer <jbrouer@redhat.com>
> Date: Thu, 16 Feb 2023 16:17:46 +0100

[...]

>> Summary, the only thing we can save is replacing some movzx
>> (zero-extend) with mov instructions.
> 
> Good stuff, thanks! When I call to not use short types on the stack, the
> only thing I care about is the resulting object code, not simple "just
> don't use it, I said so". So when a developer inspects the results from
> using one or another type, he's free in picking whatever he wants if it
> doesn't hurt optimization.

Oh, forgot to mention: I just don't want to give people "bad" example. I
mean, someone may look at some code where u8-u16s are actively used and
start thinking that it's a regular/standard practice, while it's not.
I've seen a lot of places in the kernel where the short types were used
only because "the queue index can't be bigger than 255", "we won't
handle more than 64Kb of data in one loop anyway" and then the stack is
full of u8s and u16s and the object code (I'm talking more about
hotpaths, but generally is applicable to any code) is full of masking
and other completely avoidable operations.

> 
> [...]
Thanks,
Olek

  reply	other threads:[~2023-02-27 14:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 15:07 [xdp-hints] " Jesper Dangaard Brouer
2023-02-10 15:23 ` [xdp-hints] " Jesper Dangaard Brouer
2023-02-14 13:21 ` Alexander Lobakin
2023-02-16 16:46   ` Jesper Dangaard Brouer
2023-02-20 15:39     ` Alexander Lobakin
2023-02-22 15:00       ` Jesper Dangaard Brouer
2023-02-24 16:41         ` Alexander Lobakin
2023-02-27 14:24           ` Alexander Lobakin
2023-02-14 15:00 ` [xdp-hints] Re: [Intel-wired-lan] " Paul Menzel
2023-02-14 15:13   ` Alexander Lobakin
2023-02-16 15:17     ` Jesper Dangaard Brouer
2023-02-16 15:43       ` Alexander Lobakin
2023-02-27 14:53         ` Alexander Lobakin [this message]
2023-02-16 13:29   ` Jesper Dangaard Brouer
2023-02-16 15:34     ` Alexander Lobakin

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.xdp-project.net/postorius/lists/xdp-hints.xdp-project.net/

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

  git send-email \
    --in-reply-to=2d3ccbe7-262b-c579-a8a7-eea84d7aa91e@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=brouer@redhat.com \
    --cc=daniel@iogearbox.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jbrouer@redhat.com \
    --cc=martin.lau@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=sdf@google.com \
    --cc=xdp-hints@xdp-project.net \
    --cc=yoong.siang.song@intel.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