48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
From a25ae52b1381527b89a61e0ed0c34d5fac6ffca4 Mon Sep 17 00:00:00 2001
|
|
From: Jiping Ma <jiping.ma2@windriver.com>
|
|
Date: Tue, 24 Aug 2021 00:30:02 -0700
|
|
Subject: [PATCH] ice_xsk: Avoid dependency on napi_busy_loop with PREEMPT_RT
|
|
|
|
This commit fixes the following error encountered when compiling the ice
|
|
device driver against PREEMPT_RT-enabled kernels:
|
|
|
|
error: implicit declaration of function 'napi_busy_loop'
|
|
|
|
This error is encountered, because, with recent kernels, defining
|
|
CONFIG_PREEMPT_RT unsets the CONFIG_NET_RX_BUSY_POLL kernel
|
|
configuration option, which in turn causes the napi_busy_loop function
|
|
to not be defined.
|
|
|
|
The fix implemented in this patch was confirmed to be correct by
|
|
consulting colleagues at Intel.
|
|
|
|
Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
|
|
[mvb: Update commit message.]
|
|
Signed-off-by: M. Vefa Bicakci <vefa.bicakci@windriver.com>
|
|
---
|
|
src/ice_xsk.c | 2 ++
|
|
1 file changed, 2 insertions(+)
|
|
|
|
diff --git a/src/ice_xsk.c b/src/ice_xsk.c
|
|
index 43012bb9b115..795cdba3d5c1 100644
|
|
--- a/src/ice_xsk.c
|
|
+++ b/src/ice_xsk.c
|
|
@@ -1302,12 +1302,14 @@ int ice_xsk_async_xmit(struct net_device *netdev, u32 queue_id)
|
|
*/
|
|
q_vector = ring->q_vector;
|
|
if (!napi_if_scheduled_mark_missed(&q_vector->napi)) {
|
|
+#ifdef CONFIG_NET_RX_BUSY_POLL
|
|
if (ice_ring_ch_enabled(vsi->rx_rings[queue_id]) &&
|
|
!ice_vsi_pkt_inspect_opt_ena(vsi))
|
|
#define ICE_BUSY_POLL_BUDGET 8
|
|
napi_busy_loop(q_vector->napi.napi_id, NULL, NULL,
|
|
false, ICE_BUSY_POLL_BUDGET);
|
|
else
|
|
+#endif
|
|
ice_trigger_sw_intr(&vsi->back->hw, q_vector);
|
|
}
|
|
|
|
--
|
|
2.29.2
|
|
|