fix the build using __builtin_prefetch() instead of redefining prefetch()
This commit is contained in:
parent
c826a64307
commit
2e159ef0b5
@ -220,8 +220,8 @@ ixgbe_netmap_txsync(struct netmap_adapter *na, u_int ring_nr, int flags)
|
||||
if (nm_i != cur) { /* we have new packets to send */
|
||||
nic_i = netmap_idx_k2n(kring, nm_i);
|
||||
|
||||
prefetch(&ring->slot[nm_i]);
|
||||
prefetch(&txr->tx_buffers[nic_i]);
|
||||
__builtin_prefetch(&ring->slot[nm_i]);
|
||||
__builtin_prefetch(&txr->tx_buffers[nic_i]);
|
||||
|
||||
for (n = 0; nm_i != cur; n++) {
|
||||
struct netmap_slot *slot = &ring->slot[nm_i];
|
||||
@ -237,8 +237,8 @@ ixgbe_netmap_txsync(struct netmap_adapter *na, u_int ring_nr, int flags)
|
||||
IXGBE_TXD_CMD_RS : 0;
|
||||
|
||||
/* prefetch for next round */
|
||||
prefetch(&ring->slot[nm_i + 1]);
|
||||
prefetch(&txr->tx_buffers[nic_i + 1]);
|
||||
__builtin_prefetch(&ring->slot[nm_i + 1]);
|
||||
__builtin_prefetch(&txr->tx_buffers[nic_i + 1]);
|
||||
|
||||
NM_CHECK_ADDR_LEN(addr, len);
|
||||
|
||||
|
@ -61,7 +61,6 @@
|
||||
#define NM_ATOMIC_TEST_AND_SET(p) (!atomic_cmpset_acq_int((p), 0, 1))
|
||||
#define NM_ATOMIC_CLEAR(p) atomic_store_rel_int((p), 0)
|
||||
|
||||
#define prefetch(x) __builtin_prefetch(x)
|
||||
|
||||
MALLOC_DECLARE(M_NETMAP);
|
||||
|
||||
|
@ -79,8 +79,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <sys/endian.h>
|
||||
#include <sys/refcount.h>
|
||||
|
||||
// #define prefetch(x) __builtin_prefetch(x)
|
||||
|
||||
|
||||
#define BDG_RWLOCK_T struct rwlock // struct rwlock
|
||||
|
||||
@ -1003,7 +1001,7 @@ nm_bdg_preflush(struct netmap_vp_adapter *na, u_int ring_nr,
|
||||
ft[ft_i].ft_next = NM_FT_NULL;
|
||||
buf = ft[ft_i].ft_buf = (slot->flags & NS_INDIRECT) ?
|
||||
(void *)(uintptr_t)slot->ptr : BDG_NMB(&na->up, slot);
|
||||
prefetch(buf);
|
||||
__builtin_prefetch(buf);
|
||||
++ft_i;
|
||||
if (slot->flags & NS_MOREFRAG) {
|
||||
frags++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user