Skip to content

Commit 6d76d57

Browse files
ziweixiaojfraker
authored andcommitted
gve: Fix the napi_schedule coccinelle patch
RHEL 8.10 and >=9.4 has backported the napi_reschedule change. Update the coccinelle patch to avoid it being applied to these images.
1 parent 6ef4684 commit 6d76d57

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

build/gve_main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
#define GVE_DEFAULT_RX_COPYBREAK (256)
3939

4040
#define DEFAULT_MSG_LEVEL (NETIF_MSG_DRV | NETIF_MSG_LINK)
41-
#define GVE_VERSION "1.4.2-17-8633c55-313865b-oot"
41+
#define GVE_VERSION "1.4.2-19-8633c55-1e04169-oot"
4242
#define GVE_VERSION_PREFIX "GVE-"
4343

4444
// Minimum amount of time between queue kicks in msec (10 seconds)
@@ -429,11 +429,11 @@ int gve_napi_poll(struct napi_struct *napi, int budget)
429429
if (block->rx)
430430
reschedule |= gve_rx_work_pending(block->rx);
431431

432-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0)
432+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,10) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(9,0))
433433
if (reschedule && napi_schedule(napi))
434-
#else /* LINUX_VERSION_CODE < KERNEL_VERSION(6,7,0) */
434+
#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,10) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(9,0)) */
435435
if (reschedule && napi_reschedule(napi))
436-
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0) */
436+
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,10) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(9,0)) */
437437
iowrite32be(GVE_IRQ_MASK, irq_doorbell);
438438
}
439439
return work_done;

patches/napi_reschedule.cocci

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
expression reschedule,mask,doorbell;
33
@@
44

5-
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0)
5+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,10) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(9,0))
66
if (reschedule && napi_schedule(napi))
7-
+#else /* LINUX_VERSION_CODE < KERNEL_VERSION(6,7,0) */
7+
+#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,10) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(9,0)) */
88
+ if (reschedule && napi_reschedule(napi))
9-
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0) */
9+
+#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(6,7,0) || RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9,4) || (RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(8,10) && RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(9,0)) */
1010
iowrite32be(mask, doorbell);

0 commit comments

Comments
 (0)