Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Feb 2023 00:26:18 GMT
From:      Eric Joyner <erj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e894da6d9a1d - stable/13 - irdma(4): hide tasklet-related definitions to avoid redefines
Message-ID:  <202302080026.3180QIJd096175@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by erj:

URL: https://cgit.FreeBSD.org/src/commit/?id=e894da6d9a1d3a96bdac5f330c3c94d75be8f83b

commit e894da6d9a1d3a96bdac5f330c3c94d75be8f83b
Author:     Bartosz Sobczak <bartosz.sobczak@intel.com>
AuthorDate: 2023-01-23 10:17:53 +0000
Commit:     Eric Joyner <erj@FreeBSD.org>
CommitDate: 2023-02-08 00:24:01 +0000

    irdma(4): hide tasklet-related definitions to avoid redefines
    
    checking if either from_tasklet or tasklet_setup
    exists before defining irdma's own version.
    
    This is a result of changes introduced in:
    f2978460c7fd ("LinuxKPI: tasklet add (*callback) support", 2022-11-08)
    
    The code should be kept until the from_timer and
    tasklet_setup is defined in linuxkpi's interrupt.h
    
    This is a direct commit to the stable/13 branch.
    
    Signed-off-by: Bartosz Sobczak <bartosz.sobczak@intel.com>
    Signed-off-by: Eric Joyner <erj@FreeBSD.org>
---
 sys/dev/irdma/fbsd_kcompat.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/sys/dev/irdma/fbsd_kcompat.h b/sys/dev/irdma/fbsd_kcompat.h
index 179229d6be03..60be5e74d91d 100644
--- a/sys/dev/irdma/fbsd_kcompat.h
+++ b/sys/dev/irdma/fbsd_kcompat.h
@@ -40,12 +40,15 @@
 #define TASKLET_DATA_TYPE	unsigned long
 #define TASKLET_FUNC_TYPE	void (*)(TASKLET_DATA_TYPE)
 
+#ifndef tasklet_setup
 #define tasklet_setup(tasklet, callback)				\
 	tasklet_init((tasklet), (TASKLET_FUNC_TYPE)(callback),		\
 		      (TASKLET_DATA_TYPE)(tasklet))
-
+#endif
+#ifndef from_tasklet
 #define from_tasklet(var, callback_tasklet, tasklet_fieldname) \
 	container_of(callback_tasklet, typeof(*var), tasklet_fieldname)
+#endif
 
 #define IRDMA_SET_RDMA_OBJ_SIZE(ib_struct, drv_struct, member)    \
 	(sizeof(struct drv_struct) +                              \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302080026.3180QIJd096175>