diff options
author | Kip Macy <kmacy@FreeBSD.org> | 2008-11-22 05:55:56 +0000 |
---|---|---|
committer | Kip Macy <kmacy@FreeBSD.org> | 2008-11-22 05:55:56 +0000 |
commit | db7f0b974f2ab273540a458ab50929ccbb1aa581 (patch) | |
tree | 0291af1a0fda6ca2d8e62cb1f363d45baefe0303 /sys/amd64 | |
parent | 2a1b9f07fc64f33b96e7077bedaafc167afc2625 (diff) | |
download | src-db7f0b974f2ab273540a458ab50929ccbb1aa581.tar.gz src-db7f0b974f2ab273540a458ab50929ccbb1aa581.zip |
- bump __FreeBSD version to reflect added buf_ring, memory barriers,
and ifnet functions
- add memory barriers to <machine/atomic.h>
- update drivers to only conditionally define their own
- add lockless producer / consumer ring buffer
- remove ring buffer implementation from cxgb and update its callers
- add if_transmit(struct ifnet *ifp, struct mbuf *m) to ifnet to
allow drivers to efficiently manage multiple hardware queues
(i.e. not serialize all packets through one ifq)
- expose if_qflush to allow drivers to flush any driver managed queues
This work was supported by Bitgravity Inc. and Chelsio Inc.
Notes
Notes:
svn path=/head/; revision=185162
Diffstat (limited to 'sys/amd64')
-rw-r--r-- | sys/amd64/include/atomic.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h index 0edbfff52ff7..d2a3846172d9 100644 --- a/sys/amd64/include/atomic.h +++ b/sys/amd64/include/atomic.h @@ -32,6 +32,10 @@ #error this file needs sys/cdefs.h as a prerequisite #endif +#define mb() __asm__ __volatile__ ("mfence;": : :"memory") +#define wmb() __asm__ __volatile__ ("sfence;": : :"memory") +#define rmb() __asm__ __volatile__ ("lfence;": : :"memory") + /* * Various simple operations on memory, each of which is atomic in the * presence of interrupts and multiple processors. |