[Intel-wired-lan] [PATCH bpf-next V1] igc: enable and fix RX hash usage by netstack

Alexander Lobakin aleksander.lobakin at intel.com
Mon Feb 27 14:24:30 UTC 2023


From: Alexander Lobakin <aleksander.lobakin at intel.com>
Date: Fri, 24 Feb 2023 17:41:58 +0100

> From: Jesper Dangaard Brouer <jbrouer at redhat.com>
> Date: Wed, 22 Feb 2023 16:00:30 +0100

[...]

>>>>> Why define those empty if you could do a bound check in the code
>>>>> instead? E.g. `if (unlikely(bigger_than_9)) return PKT_HASH_TYPE_L2`.
>>>>
>>>> Having a branch for this is likely slower.  On godbolt I see that this
>>>> generates suboptimal and larger code.

BTW, it's funny that when I proposed an optimization, you said "it makes
no sense on 2.5G NICs", but when you omit bounds checking and just
extend the array with zero fields, it suddenly starts making sense to
save a couple instructions :D

(just an observation)

>>>
>>> But you have to verify HW output anyway, right? Or would like to rely on
>>> that on some weird revision it won't spit BIT(69) on you?
[...]

Thanks,
Olek


More information about the Intel-wired-lan mailing list