Index: sys/net/pktqueue.c =================================================================== RCS file: /cvsroot/src/sys/net/pktqueue.c,v retrieving revision 1.12 diff -u -p -r1.12 pktqueue.c --- sys/net/pktqueue.c 11 Sep 2020 14:29:00 -0000 1.12 +++ sys/net/pktqueue.c 24 Mar 2021 07:54:47 -0000 @@ -52,21 +52,19 @@ __KERNEL_RCSID(0, "$NetBSD: pktqueue.c,v #include -/* - * WARNING: update this if struct pktqueue changes. - */ -#define PKTQ_CLPAD \ - MAX(COHERENCY_UNIT, COHERENCY_UNIT - sizeof(kmutex_t) - sizeof(u_int)) - struct pktqueue { /* * The lock used for a barrier mechanism. The barrier counter, * as well as the drop counter, are managed atomically though. * Ensure this group is in a separate cache line. */ - kmutex_t pq_lock; - volatile u_int pq_barrier; - uint8_t _pad[PKTQ_CLPAD]; + union { + struct { + kmutex_t pq_lock; + volatile u_int pq_barrier; + }; + uint8_t _pad[COHERENCY_UNIT]; + }; /* The size of the queue, counters and the interrupt handler. */ u_int pq_maxlen;