[net-next v3 5/5] netdev: use napi_schedule bool instead of napi_schedule_prep/__napi_schedule

2023-10-09 Thread Christian Marangi
Replace if condition of napi_schedule_prep/__napi_schedule and use bool from napi_schedule directly where possible. Signed-off-by: Christian Marangi --- Changes v3: - Drop toshiba change and rework in separate patch --- drivers/net/ethernet/atheros/atlx/atl1.c | 4 +--- drivers/net/wireless

[net-next v3 4/5] net: tc35815: rework network interface interrupt logic

2023-10-09 Thread Christian Marangi
) and drop the printk and BUG() call. With these change, in the event of a NAPI already scheduled, the interrupt is simply ignored with nothing done. Suggested-by: Eric Dumazet Signed-off-by: Christian Marangi --- drivers/net/ethernet/toshiba/tc35815.c | 10 +++--- 1 file changed, 3 insertions

[net-next v3 3/5] netdev: replace napi_reschedule with napi_schedule

2023-10-09 Thread Christian Marangi
rent logic. Convert every user of napi_reschedule to napi_schedule. Signed-off-by: Christian Marangi Acked-by: Jeff Johnson # ath10k Acked-by: Nick Child # ibm Acked-by: Marc Kleine-Budde # for can/dev/rx-offload.c Reviewed-by: Eric Dumazet --- Changes v3: - Add Reviewed-by tag Changes v2: - A

[net-next v3 2/5] netdev: make napi_schedule return bool on NAPI successful schedule

2023-10-09 Thread Christian Marangi
Change napi_schedule to return a bool on NAPI successful schedule. This might be useful for some driver to do additional steps after a NAPI has been scheduled. Suggested-by: Eric Dumazet Signed-off-by: Christian Marangi Reviewed-by: Eric Dumazet --- Changes v2: - Add Suggested-by tag - Add

[net-next v3 1/5] netdev: replace simple napi_schedule_prep/__napi_schedule to napi_schedule

2023-10-09 Thread Christian Marangi
Replace drivers that still use napi_schedule_prep/__napi_schedule with napi_schedule helper as it does the same exact check and call. Signed-off-by: Christian Marangi Reviewed-by: Eric Dumazet --- Changes v3: - Add Reviewed-by tag Changes v2: - Add missing semicolon --- drivers/net/ethernet/ni

Re: [net-next PATCH v2 4/4] netdev: use napi_schedule bool instead of napi_schedule_prep/__napi_schedule

2023-10-08 Thread Christian Marangi
On Sun, Oct 08, 2023 at 09:08:41AM +0200, Eric Dumazet wrote: > On Fri, Oct 6, 2023 at 8:49 PM Christian Marangi wrote: > > > > On Thu, Oct 05, 2023 at 06:16:26PM +0200, Eric Dumazet wrote: > > > On Tue, Oct 3, 2023 at 8:36 PM Christian Marangi > > > wrote: >

Re: [net-next PATCH v2 4/4] netdev: use napi_schedule bool instead of napi_schedule_prep/__napi_schedule

2023-10-07 Thread Christian Marangi
On Thu, Oct 05, 2023 at 06:16:26PM +0200, Eric Dumazet wrote: > On Tue, Oct 3, 2023 at 8:36 PM Christian Marangi wrote: > > > > Replace if condition of napi_schedule_prep/__napi_schedule and use bool > > from napi_schedule directly where possible. > > > >

Re: [net-next PATCH v2 3/4] netdev: replace napi_reschedule with napi_schedule

2023-10-07 Thread Christian Marangi
On Thu, Oct 05, 2023 at 06:41:03PM +0200, Eric Dumazet wrote: > On Thu, Oct 5, 2023 at 6:32 PM Jakub Kicinski wrote: > > > > On Thu, 5 Oct 2023 18:11:56 +0200 Eric Dumazet wrote: > > > OK, but I suspect some users of napi_reschedule() might not be > > > race-free... > > > > What's the race

[net-next PATCH v2 4/4] netdev: use napi_schedule bool instead of napi_schedule_prep/__napi_schedule

2023-10-03 Thread Christian Marangi
Replace if condition of napi_schedule_prep/__napi_schedule and use bool from napi_schedule directly where possible. Signed-off-by: Christian Marangi --- drivers/net/ethernet/atheros/atlx/atl1.c | 4 +--- drivers/net/ethernet/toshiba/tc35815.c | 4 +--- drivers/net/wireless/intel

[net-next PATCH v2 3/4] netdev: replace napi_reschedule with napi_schedule

2023-10-03 Thread Christian Marangi
rent logic. Convert every user of napi_reschedule to napi_schedule. Signed-off-by: Christian Marangi Acked-by: Jeff Johnson # ath10k Acked-by: Nick Child # ibm Acked-by: Marc Kleine-Budde # for can/dev/rx-offload.c --- Changes v2: - Add ack tag --- drivers/infiniband/ulp/ipoib/

[net-next PATCH v2 2/4] netdev: make napi_schedule return bool on NAPI successful schedule

2023-10-03 Thread Christian Marangi
Change napi_schedule to return a bool on NAPI successful schedule. This might be useful for some driver to do additional steps after a NAPI has been scheduled. Suggested-by: Eric Dumazet Signed-off-by: Christian Marangi Reviewed-by: Eric Dumazet --- Changes v2: - Add Suggested-by tag - Add

[net-next PATCH v2 1/4] netdev: replace simple napi_schedule_prep/__napi_schedule to napi_schedule

2023-10-03 Thread Christian Marangi
Replace drivers that still use napi_schedule_prep/__napi_schedule with napi_schedule helper as it does the same exact check and call. Signed-off-by: Christian Marangi --- Changes v2: - Add missing semicolon --- drivers/net/ethernet/ni/nixge.c | 3 +-- drivers/net/ethernet/wiznet/w5100.c | 4

Re: [net-next PATCH 3/4] netdev: replace napi_reschedule with napi_schedule

2023-10-03 Thread Christian Marangi
On Tue, Oct 03, 2023 at 09:16:33AM +0200, Marc Kleine-Budde wrote: > On 02.10.2023 17:10:22, Christian Marangi wrote: > > Now that napi_schedule return a bool, we can drop napi_reschedule that > > does the same exact function. The function comes from a very old commit > > bf

Re: [net-next PATCH 2/4] netdev: make napi_schedule return bool on NAPI successful schedule

2023-10-03 Thread Christian Marangi
On Tue, Oct 03, 2023 at 07:21:46AM +0200, Eric Dumazet wrote: > On Mon, Oct 2, 2023 at 5:10 PM Christian Marangi wrote: > > > > Change napi_schedule to return a bool on NAPI successful schedule. This > > might be useful for some driver to do additional step after a NAP

[net-next PATCH 4/4] netdev: use napi_schedule bool instead of napi_schedule_prep/__napi_schedule

2023-10-02 Thread Christian Marangi
Replace if condition of napi_schedule_prep/__napi_schedule and use bool from napi_schedule directly where possible. Signed-off-by: Christian Marangi --- drivers/net/ethernet/atheros/atlx/atl1.c | 4 +--- drivers/net/ethernet/toshiba/tc35815.c | 4 +--- drivers/net/wireless/intel

[net-next PATCH 3/4] netdev: replace napi_reschedule with napi_schedule

2023-10-02 Thread Christian Marangi
rent logic. Convert every user of napi_reschedule to napi_schedule. Signed-off-by: Christian Marangi --- drivers/infiniband/ulp/ipoib/ipoib_ib.c| 4 ++-- drivers/net/can/dev/rx-offload.c | 2 +- drivers/net/ethernet/chelsio/cxgb4/sge.c | 2 +

[net-next PATCH 2/4] netdev: make napi_schedule return bool on NAPI successful schedule

2023-10-02 Thread Christian Marangi
Change napi_schedule to return a bool on NAPI successful schedule. This might be useful for some driver to do additional step after a NAPI ahs been scheduled. Signed-off-by: Christian Marangi --- include/linux/netdevice.h | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff

[net-next PATCH 1/4] netdev: replace simple napi_schedule_prep/__napi_schedule to napi_schedule

2023-10-02 Thread Christian Marangi
Replace drivers that still use napi_schedule_prep/__napi_schedule with napi_schedule helper as it does the same exact check and call. Signed-off-by: Christian Marangi --- drivers/net/ethernet/ni/nixge.c | 3 +-- drivers/net/ethernet/wiznet/w5100.c | 4 ++-- 2 files changed, 3 insertions