Re: Use of Indirect function calls

2018-03-07 Thread David Miller
From: Rao Shoaib Date: Tue, 6 Mar 2018 21:53:19 -0800 > Also while I have your attention can I ask your opinion about > breaking up some TCP functions, mostly control functions into > smaller units so that if a little different behavior is desired it > can be achieved and common code could still

Re: Use of Indirect function calls

2018-03-06 Thread Rao Shoaib
On 03/06/2018 10:32 PM, Eric Dumazet wrote: On Tue, 2018-03-06 at 21:53 -0800, Rao Shoaib wrote: David, Thanks a lot for your prompt response. Do you have a specific solution in mind or will the calls be replaced with simple checks ? There is upcoming work for that, but not specific to TCP s

Re: Use of Indirect function calls

2018-03-06 Thread Eric Dumazet
On Tue, 2018-03-06 at 21:53 -0800, Rao Shoaib wrote: > David, > > Thanks a lot for your prompt response. Do you have a specific > solution  > in mind or will the calls be replaced with simple checks ? There is upcoming work for that, but not specific to TCP stack. > > Also while I have your att

Re: Use of Indirect function calls

2018-03-06 Thread Rao Shoaib
David, Thanks a lot for your prompt response. Do you have a specific solution in mind or will the calls be replaced with simple checks ? Also while I have your attention can I ask your opinion about breaking up some TCP functions, mostly control functions into smaller units so that if a litt

Re: Use of Indirect function calls

2018-03-06 Thread David Miller
From: Rao Shoaib Date: Tue, 6 Mar 2018 19:35:46 -0800 > I do not expect any measurable overhead as modern CPU's use > pre-fetching and multiple parallel execution engines. Please see Spectre and retpolines, all of this parallel execution and prefetching is essentially disabled to address those v

Use of Indirect function calls

2018-03-06 Thread Rao Shoaib
I am working on a change which introduces a couple of indirect function calls in the fast path. I used indirect function calls instead of "if/else" as it keeps the code cleaner and more readable and provides for extensibility. I do not expect any measurable overhead as modern CPU's use pre-fet