lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <2674df91-ec6f-baf7-e2cc-aa0fd807cb2c@intel.com> Date: Mon, 27 Feb 2023 15:24:30 +0100 From: Alexander Lobakin <aleksander.lobakin@...el.com> To: Jesper Dangaard Brouer <jbrouer@...hat.com> CC: <brouer@...hat.com>, <bpf@...r.kernel.org>, <netdev@...r.kernel.org>, Stanislav Fomichev <sdf@...gle.com>, <martin.lau@...nel.org>, <ast@...nel.org>, <daniel@...earbox.net>, <yoong.siang.song@...el.com>, <anthony.l.nguyen@...el.com>, <intel-wired-lan@...ts.osuosl.org>, <xdp-hints@...-project.net>, Sasha Neftin <sasha.neftin@...el.com> Subject: Re: [PATCH bpf-next V1] igc: enable and fix RX hash usage by netstack From: Alexander Lobakin <aleksander.lobakin@...el.com> Date: Fri, 24 Feb 2023 17:41:58 +0100 > From: Jesper Dangaard Brouer <jbrouer@...hat.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
Powered by blists - more mailing lists