Re: [PATCH v2] i40e: replace switch-statement to speed-up retpoline-enabled builds

2019-01-29 Thread Björn Töpel
Den tis 29 jan. 2019 kl 12:17 skrev Daniel Borkmann : > > On 01/29/2019 10:57 AM, bjorn.to...@gmail.com wrote: > > From: Björn Töpel > > > > 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 t

Re: [PATCH v2] i40e: replace switch-statement to speed-up retpoline-enabled builds

2019-01-29 Thread Daniel Borkmann
On 01/29/2019 10:57 AM, bjorn.to...@gmail.com wrote: > From: Björn Töpel > > 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. > > T

[PATCH v2] i40e: replace switch-statement to speed-up retpoline-enabled builds

2019-01-29 Thread bjorn . topel
From: Björn Töpel 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