Thread (23 messages) 23 messages, 6 authors, 2019-05-06

Re: [net-next 01/12] i40e: replace switch-statement to speed-up retpoline-enabled builds

From: Daniel Borkmann <daniel@iogearbox.net>
Date: 2019-05-02 14:47:52

On 04/29/2019 09:16 PM, Jeff Kirsher wrote:
From: Björn Töpel <redacted>

GCC will generate jump tables for switch-statements with more than 5
case statements. An entry into the jump table is an indirect call,
which means that for CONFIG_RETPOLINE builds, this is rather
expensive.

This commit replaces the switch-statement that acts on the XDP program
result with an if-clause.

The if-clause was also refactored into a common function that can be
used by AF_XDP zero-copy and non-zero-copy code.
Isn't it fixed upstream by now already (also in gcc)?

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=ce02ef06fcf7a399a6276adb83f37373d10cbbe1
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a9d57ef15cbe327fe54416dd194ee0ea66ae53a4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help