eal: introduce macro for no inline

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
This commit is contained in:
Jerin Jacob 2017-05-13 14:57:27 +05:30 committed by Thomas Monjalon
parent c0583d98a9
commit c6dfeecb15
4 changed files with 10 additions and 5 deletions

View File

@ -120,7 +120,7 @@ static int bnx2x_alloc_mem(struct bnx2x_softc *sc);
static void bnx2x_free_mem(struct bnx2x_softc *sc); static void bnx2x_free_mem(struct bnx2x_softc *sc);
static int bnx2x_alloc_fw_stats_mem(struct bnx2x_softc *sc); static int bnx2x_alloc_fw_stats_mem(struct bnx2x_softc *sc);
static void bnx2x_free_fw_stats_mem(struct bnx2x_softc *sc); static void bnx2x_free_fw_stats_mem(struct bnx2x_softc *sc);
static __attribute__ ((noinline)) static __rte_noinline
int bnx2x_nic_load(struct bnx2x_softc *sc); int bnx2x_nic_load(struct bnx2x_softc *sc);
static int bnx2x_handle_sp_tq(struct bnx2x_softc *sc); static int bnx2x_handle_sp_tq(struct bnx2x_softc *sc);
@ -1962,7 +1962,7 @@ static void bnx2x_squeeze_objects(struct bnx2x_softc *sc)
} }
/* stop the controller */ /* stop the controller */
__attribute__ ((noinline)) __rte_noinline
int int
bnx2x_nic_unload(struct bnx2x_softc *sc, uint32_t unload_mode, uint8_t keep_link) bnx2x_nic_unload(struct bnx2x_softc *sc, uint32_t unload_mode, uint8_t keep_link)
{ {
@ -7124,7 +7124,7 @@ void bnx2x_periodic_callout(struct bnx2x_softc *sc)
} }
/* start the controller */ /* start the controller */
static __attribute__ ((noinline)) static __rte_noinline
int bnx2x_nic_load(struct bnx2x_softc *sc) int bnx2x_nic_load(struct bnx2x_softc *sc)
{ {
uint32_t val; uint32_t val;

View File

@ -171,7 +171,7 @@ eth_fd_to_mbuf(const struct qbman_fd *fd)
return mbuf; return mbuf;
} }
static void __attribute__ ((noinline)) __attribute__((hot)) static void __rte_noinline __attribute__((hot))
eth_mbuf_to_fd(struct rte_mbuf *mbuf, eth_mbuf_to_fd(struct rte_mbuf *mbuf,
struct qbman_fd *fd, uint16_t bpid) struct qbman_fd *fd, uint16_t bpid)
{ {

View File

@ -1098,7 +1098,7 @@ static int mlx4_check_mempool(struct rte_mempool *mp, uintptr_t *start,
/* For best performance, this function should not be inlined. */ /* For best performance, this function should not be inlined. */
static struct ibv_mr *mlx4_mp2mr(struct ibv_pd *, struct rte_mempool *) static struct ibv_mr *mlx4_mp2mr(struct ibv_pd *, struct rte_mempool *)
__attribute__((noinline)); __rte_noinline;
/** /**
* Register mempool as a memory region. * Register mempool as a memory region.

View File

@ -107,6 +107,11 @@ typedef uint16_t unaligned_uint16_t;
*/ */
#define __rte_always_inline inline __attribute__((always_inline)) #define __rte_always_inline inline __attribute__((always_inline))
/**
* Force a function to be noinlined
*/
#define __rte_noinline __attribute__((noinline))
/*********** Macros for pointer arithmetic ********/ /*********** Macros for pointer arithmetic ********/
/** /**