mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-25 16:13:17 +00:00
Fix for compilation warning in mlx5en(4).
Function 'mlx5e_alloc_rx_wqe' can never be inlined because it uses alloca (override using the always_inline attribute) MFC after: 3 days Sponsored by: Mellanox Technologies
This commit is contained in:
parent
bd802cea53
commit
8b825a1857
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=347316
@ -87,6 +87,8 @@
|
|||||||
#define MLX5E_PARAMS_DEFAULT_LOG_RQ_SIZE 0xa
|
#define MLX5E_PARAMS_DEFAULT_LOG_RQ_SIZE 0xa
|
||||||
#define MLX5E_PARAMS_MAXIMUM_LOG_RQ_SIZE 0xe
|
#define MLX5E_PARAMS_MAXIMUM_LOG_RQ_SIZE 0xe
|
||||||
|
|
||||||
|
#define MLX5E_MAX_BUSDMA_RX_SEGS 15
|
||||||
|
|
||||||
#define MLX5E_MAX_RX_SEGS 7
|
#define MLX5E_MAX_RX_SEGS 7
|
||||||
|
|
||||||
#ifndef MLX5E_MAX_RX_BYTES
|
#ifndef MLX5E_MAX_RX_BYTES
|
||||||
|
@ -2243,6 +2243,9 @@ mlx5e_get_wqe_sz(struct mlx5e_priv *priv, u32 *wqe_sz, u32 *nsegs)
|
|||||||
for (n = howmany(r, MLX5E_MAX_RX_BYTES); !powerof2(n + 1); n++)
|
for (n = howmany(r, MLX5E_MAX_RX_BYTES); !powerof2(n + 1); n++)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
if (n > MLX5E_MAX_BUSDMA_RX_SEGS)
|
||||||
|
return (-ENOMEM);
|
||||||
|
|
||||||
*wqe_sz = r;
|
*wqe_sz = r;
|
||||||
*nsegs = n;
|
*nsegs = n;
|
||||||
return (0);
|
return (0);
|
||||||
|
@ -32,7 +32,7 @@ static inline int
|
|||||||
mlx5e_alloc_rx_wqe(struct mlx5e_rq *rq,
|
mlx5e_alloc_rx_wqe(struct mlx5e_rq *rq,
|
||||||
struct mlx5e_rx_wqe *wqe, u16 ix)
|
struct mlx5e_rx_wqe *wqe, u16 ix)
|
||||||
{
|
{
|
||||||
bus_dma_segment_t segs[rq->nsegs];
|
bus_dma_segment_t segs[MLX5E_MAX_BUSDMA_RX_SEGS];
|
||||||
struct mbuf *mb;
|
struct mbuf *mb;
|
||||||
int nsegs;
|
int nsegs;
|
||||||
int err;
|
int err;
|
||||||
|
Loading…
Reference in New Issue
Block a user