All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mohsin Bashir <mohsin.bashr@gmail.com>
To: Alexander Duyck <alexander.duyck@gmail.com>,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org, alexanderduyck@fb.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, horms@kernel.org, vadim.fedorenko@linux.dev,
	jdamato@fastly.com, sdf@fomichev.me,
	aleksander.lobakin@intel.com, ast@kernel.org,
	daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com
Subject: Re: [PATCH net-next 5/9] eth: fbnic: Add XDP pass, drop, abort support
Date: Thu, 7 Aug 2025 14:24:12 -0700	[thread overview]
Message-ID: <a5b3f56f-a7f8-4fa5-8cd6-de9c836db2ac@gmail.com> (raw)
In-Reply-To: <CAKgT0Ud-QVX=xn8QZN-MBkVwHdcxE8FDz_AzhW-vdZJyLrLTkQ@mail.gmail.com>

>>>> Hi Mohsin,
>>>>
>>>> I thought we were past the times when we read prog pointer per each
>>>> processed packet and agreed on reading the pointer once per napi loop?
>>>
>>> This is reading the cached pointer from the netdev. Are you saying you
>>> would rather have this as a stack pointer instead? I don't really see
>>> the advantage to making this a once per napi poll session versus just
>>> reading it once per packet.
>>
>> Hi Alex,
>>
>> this is your only reason (at least currently in this patch) to load the
>> cacheline from netdev struct whereas i was just suggesting to piggyback on
>> the fact that bpf prog pointer will not change within single napi loop.
>>
>> it's up to you of course and should be considered as micro-optimization.
> 
> The cost for the "extra cacheline" should be nil as from what I can
> tell xdp_prog shares the cacheline with gro_max_size and _rx so in
> either path that cacheline is going to eventually be pulled in anyway
> regardless of what path it goes with.
> 

Hi Maciej,

Appreciate your suggestion regarding the micro-optimization. However, at 
this time, we are not planning to adopt this change. I am all ears to 
any further thoughts or concerns you may have about it.

  reply	other threads:[~2025-08-07 21:24 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23 14:59 [PATCH net-next 0/9] eth: fbnic Add XDP support for fbnic Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 1/9] eth: fbnic: Add support for HDS configuration Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 2/9] eth: fbnic: Update Headroom Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 3/9] eth: fbnic: Use shinfo to track frags state on Rx Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 4/9] eth: fbnic: Prefetch packet headers " Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 5/9] eth: fbnic: Add XDP pass, drop, abort support Mohsin Bashir
2025-07-23 17:35   ` Maciej Fijalkowski
2025-07-24 15:47     ` Mohsin Bashir
2025-07-24 16:51       ` Jakub Kicinski
2025-07-24 21:14     ` Alexander H Duyck
2025-07-25  9:56       ` Maciej Fijalkowski
2025-07-25 15:10         ` Alexander Duyck
2025-08-07 21:24           ` Mohsin Bashir [this message]
2025-07-23 14:59 ` [PATCH net-next 6/9] eth: fbnic: Add support for XDP queues Mohsin Bashir
2025-07-23 23:54   ` Jakub Kicinski
2025-07-23 14:59 ` [PATCH net-next 7/9] eth: fbnic: Add support for XDP_TX action Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 8/9] eth: fbnic: Collect packet statistics for XDP Mohsin Bashir
2025-07-24 10:18   ` Simon Horman
2025-07-24 15:48     ` Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 9/9] eth: fbnic: Report XDP stats via ethtool Mohsin Bashir

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=a5b3f56f-a7f8-4fa5-8cd6-de9c836db2ac@gmail.com \
    --to=mohsin.bashr@gmail.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=alexander.duyck@gmail.com \
    --cc=alexanderduyck@fb.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=vadim.fedorenko@linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.