15129044dSC.J. Collier/*-
25129044dSC.J. Collier *   BSD LICENSE
35129044dSC.J. Collier *
45129044dSC.J. Collier *   Copyright 2015 6WIND S.A.
55129044dSC.J. Collier *   Copyright 2015 Mellanox.
65129044dSC.J. Collier *
75129044dSC.J. Collier *   Redistribution and use in source and binary forms, with or without
85129044dSC.J. Collier *   modification, are permitted provided that the following conditions
95129044dSC.J. Collier *   are met:
105129044dSC.J. Collier *
115129044dSC.J. Collier *     * Redistributions of source code must retain the above copyright
125129044dSC.J. Collier *       notice, this list of conditions and the following disclaimer.
135129044dSC.J. Collier *     * Redistributions in binary form must reproduce the above copyright
145129044dSC.J. Collier *       notice, this list of conditions and the following disclaimer in
155129044dSC.J. Collier *       the documentation and/or other materials provided with the
165129044dSC.J. Collier *       distribution.
175129044dSC.J. Collier *     * Neither the name of 6WIND S.A. nor the names of its
185129044dSC.J. Collier *       contributors may be used to endorse or promote products derived
195129044dSC.J. Collier *       from this software without specific prior written permission.
205129044dSC.J. Collier *
215129044dSC.J. Collier *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
225129044dSC.J. Collier *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
235129044dSC.J. Collier *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
245129044dSC.J. Collier *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
255129044dSC.J. Collier *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
265129044dSC.J. Collier *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
275129044dSC.J. Collier *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
285129044dSC.J. Collier *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
295129044dSC.J. Collier *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
305129044dSC.J. Collier *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
315129044dSC.J. Collier *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
325129044dSC.J. Collier */
335129044dSC.J. Collier
345129044dSC.J. Collier#ifndef RTE_PMD_MLX5_DEFS_H_
355129044dSC.J. Collier#define RTE_PMD_MLX5_DEFS_H_
365129044dSC.J. Collier
375129044dSC.J. Collier#include "mlx5_autoconf.h"
385129044dSC.J. Collier
395129044dSC.J. Collier/* Reported driver name. */
403d9b7210SChristian Ehrhardt#define MLX5_DRIVER_NAME "net_mlx5"
415129044dSC.J. Collier
425129044dSC.J. Collier/* Maximum number of simultaneous MAC addresses. */
435129044dSC.J. Collier#define MLX5_MAX_MAC_ADDRESSES 128
445129044dSC.J. Collier
455129044dSC.J. Collier/* Maximum number of simultaneous VLAN filters. */
465129044dSC.J. Collier#define MLX5_MAX_VLAN_IDS 128
475129044dSC.J. Collier
485129044dSC.J. Collier/* Maximum number of special flows. */
495129044dSC.J. Collier#define MLX5_MAX_SPECIAL_FLOWS 4
505129044dSC.J. Collier
51809f0800SChristian Ehrhardt/*
52809f0800SChristian Ehrhardt * Request TX completion every time descriptors reach this threshold since
53809f0800SChristian Ehrhardt * the previous request. Must be a power of two for performance reasons.
54809f0800SChristian Ehrhardt */
55809f0800SChristian Ehrhardt#define MLX5_TX_COMP_THRESH 32
565129044dSC.J. Collier
575129044dSC.J. Collier/* RSS Indirection table size. */
585129044dSC.J. Collier#define RSS_INDIRECTION_TABLE_SIZE 256
595129044dSC.J. Collier
605129044dSC.J. Collier/*
615129044dSC.J. Collier * Maximum number of cached Memory Pools (MPs) per TX queue. Each RTE MP
625129044dSC.J. Collier * from which buffers are to be transmitted will have to be mapped by this
635129044dSC.J. Collier * driver to their own Memory Region (MR). This is a slow operation.
645129044dSC.J. Collier *
655129044dSC.J. Collier * This value is always 1 for RX queues.
665129044dSC.J. Collier */
675129044dSC.J. Collier#ifndef MLX5_PMD_TX_MP_CACHE
685129044dSC.J. Collier#define MLX5_PMD_TX_MP_CACHE 8
695129044dSC.J. Collier#endif
705129044dSC.J. Collier
715129044dSC.J. Collier/*
725129044dSC.J. Collier * If defined, only use software counters. The PMD will never ask the hardware
735129044dSC.J. Collier * for these, and many of them won't be available.
745129044dSC.J. Collier */
755129044dSC.J. Collier#ifndef MLX5_PMD_SOFT_COUNTERS
765129044dSC.J. Collier#define MLX5_PMD_SOFT_COUNTERS 1
775129044dSC.J. Collier#endif
785129044dSC.J. Collier
795129044dSC.J. Collier/* Alarm timeout. */
805129044dSC.J. Collier#define MLX5_ALARM_TIMEOUT_US 100000
815129044dSC.J. Collier
825129044dSC.J. Collier#endif /* RTE_PMD_MLX5_DEFS_H_ */
83