diff --git a/src/config/param.generic_fbsd.h b/src/config/param.generic_fbsd.h index 7d119e5ed1..a0f5b67b02 100644 --- a/src/config/param.generic_fbsd.h +++ b/src/config/param.generic_fbsd.h @@ -128,6 +128,11 @@ enum vcexcl { NONEXCL, EXCL }; # define AFS_FBSD_NET_FOREACH TAILQ_FOREACH #endif +/* r342872 changed NET_EPOCH_ENTER() et al to use explicit epoch trackers. */ +#if __FreeBSD_version >= 1300008 +# define FBSD_NET_ET_EXPLICIT +#endif + /* r343030 removed getpbuf() et al, use UMA alloc instead */ #if __FreeBSD_version >= 1300008 # define FBSD_UMA_GETPBUF diff --git a/src/rx/rx_kernel.h b/src/rx/rx_kernel.h index ec5070935b..6274e20e67 100644 --- a/src/rx/rx_kernel.h +++ b/src/rx/rx_kernel.h @@ -65,7 +65,10 @@ extern void osi_Panic(char *fmt, ...) #define osi_YieldIfPossible() #define osi_WakeupAndYieldIfPossible(x) rx_Wakeup(x) -#ifdef AFS_FBSD120_ENV +#ifdef FBSD_NET_ET_EXPLICIT +# define RX_NET_EPOCH_ENTER() struct epoch_tracker _rx_epoch_et; NET_EPOCH_ENTER(_rx_epoch_et) +# define RX_NET_EPOCH_EXIT() NET_EPOCH_EXIT(_rx_epoch_et) +#elif defined(AFS_FBSD120_ENV) # define RX_NET_EPOCH_ENTER() NET_EPOCH_ENTER() # define RX_NET_EPOCH_EXIT() NET_EPOCH_EXIT() #else