Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Julia Lawall <julia.lawall@inria.fr>,
	netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v1] idpf: refactor some missing field get/prep conversions
Date: Wed, 6 Dec 2023 13:33:13 +0100	[thread overview]
Message-ID: <1bed60db-3f6b-4b99-84b7-8021787c9508@intel.com> (raw)
In-Reply-To: <eff20fb6-d2d3-4b12-8d46-1cd891ad0156@intel.com>

From: Jesse Brandeburg <jesse.brandeburg@intel.com>
Date: Tue, 5 Dec 2023 17:10:58 -0800

> On 12/4/2023 2:26 AM, Alexander Lobakin wrote:
> yping.
>>
>> What is "not a constant"?
>>
>> 	ring[nta] = FIELD_PREP(IDPF_RX_BI_GEN_M,
>> 			       test_bit(__IDPF_Q_GEN_CHK, flags));
>>
>> Is there a problem with this ^ code?
>>
>> "The scripts ignored that" is not a good argument I'd say :>
> 
> Fixed in v2
> 
> 
>>> Generally I'd prefer that the kind of check above returned a bool with a
>>> constant conversion of the mask (compile time) to an LE16 mask, and then
>>> use that, which is why all of our other drivers do that instead.
>>
>> Ah, good point. Smth like
>>
>> 		gen = !!(tx_desc->qid_comptype_gen &
>> 			 IDPF_TXQ_COMPLQ_GEN_M_LE);
> 
> Yeah, it would be nice but I didn't add that to this series. But you
> have the idea.
> 
>>
>> OTOH x86 is always LE and BE is seen more and more rarely nowadays. It
>> might just not worth having a LE-version of each such mask for the sake
>> of a bit more optimized code on architectures where our drivers are
>> barely used.
> 
> Our drivers should work on BE, IMO. sparse annotations takes care of
> making sure we have the conversions right, they cost nothing on x86.

They do work, what I meant is that adding _LE constant masks would make
the code a bit more optimized on BE only, then would it make sense to
add +1 line per each such mask to get some almost invisible
optimizations on non-common architectures?

Thanks,
Olek
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan

      reply	other threads:[~2023-12-06 12:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-30 21:45 [Intel-wired-lan] [PATCH iwl-next v1] idpf: refactor some missing field get/prep conversions Jesse Brandeburg
2023-12-01  7:52 ` Przemek Kitszel
2023-12-01 14:32 ` Alexander Lobakin
2023-12-01 20:12   ` Jesse Brandeburg
2023-12-01 20:43     ` Julia Lawall
2023-12-04 10:26     ` Alexander Lobakin
2023-12-06  1:10       ` Jesse Brandeburg
2023-12-06 12:33         ` Alexander Lobakin [this message]

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=1bed60db-3f6b-4b99-84b7-8021787c9508@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=julia.lawall@inria.fr \
    --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