FBSD: Handle 1-arg NET_EPOCH_ENTER

FreeBSD commit a68cc388790587b330a01380a0c1864fb9ff3f1e (Mechanical
cleanup of epoch(9) usage in network stack.) changed NET_EPOCH_ENTER()
and related macros so that we must pass in a struct epoch_tracker.
Previously these macros declared their own epoch_tracker in the macro
and used it; to keep things simple, change our RX_NET_EPOCH_*() macros
to do the same, since our callers are all simple and fine to declare
vars in.

Change-Id: I1564ba7dd6e0dacc3a4532fe03709e74f3c1e019
Reviewed-on: https://gerrit.openafs.org/15168
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Andrew Deason 2022-10-25 15:18:45 -05:00
parent 606d794b2b
commit 849fb93efb
2 changed files with 9 additions and 1 deletions

View File

@ -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

View File

@ -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