[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1cadcc9e-c934-3d25-98c4-296b0ace0877@intel.com>
Date: Thu, 23 Feb 2023 14:47:35 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: <netdev@...r.kernel.org>
Subject: Re: [PATCH net] net: add no-op for napi_busy_loop if
CONFIG_NET_RX_BUSY_POLL=n
On 2/22/2023 8:53 PM, Jakub Kicinski wrote:
> On Wed, 22 Feb 2023 17:22:58 -0800 Jacob Keller wrote:
>> Commit 7db6b048da3b ("net: Commonize busy polling code to focus on napi_id
>> instead of socket") introduced napi_busy_loop and refactored sk_busy_loop
>> to call this new function. The commit removed the no-op implementation of
>> sk_busy_loop in the #else block for CONFIG_NET_RX_BUSY_POLL, and placed the
>> declaration of napi_busy_poll inside the # block where sk_busy_loop used to
>> be declared.
>>
>> Because of this, if a module tries to use napi_busy_loop it must wrap the
>> use inside a IS_ENABLED(CONFIG_NET_RX_BUSY_POLL) check, as the function is
>> not declared when this is false.
>>
>> The original sk_busy_loop function had both a declaration and a no-op
>> variant when the config flag was set to N. Do the same for napi_busy_loop
>> by adding a no-op implementation in the #else block as expected.
>>
>> Fixes: 7db6b048da3b ("net: Commonize busy polling code to focus on napi_id instead of socket")
>
> We need a reference to which module needs this or a Kconfig snippet
> + build failure output.
Hm, fair. I found this while investigating something else with code not
yet submitted that uses this function in the ice driver without checking
CONFIG_NET_RX_BUSY_POLL. I assumed this would be a problem somewhere
else too...
However, I just looked through the current tree and the only user of
napi_busy_loop happens to be under a CONFIG_NET_RX_BUSY_POLL check
already so I don't think this is possible to trigger with any in-tree
code at present.
Thanks,
Jake
Powered by blists - more mailing lists