X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fmlx5%2Fmlx5_defs.h;h=af29d93901d4194e413f0740258282188c28bd28;hb=df96fd0d73955bdc7ca3909e772ff2ad903249c6;hp=83ca367dba53d0aa2b1805fa29b043cb966edb8d;hpb=c288d7b5ebc645e45c0477e6f0263020c033abc2;p=dpdk.git diff --git a/drivers/net/mlx5/mlx5_defs.h b/drivers/net/mlx5/mlx5_defs.h index 83ca367dba..af29d93901 100644 --- a/drivers/net/mlx5/mlx5_defs.h +++ b/drivers/net/mlx5/mlx5_defs.h @@ -6,14 +6,11 @@ #ifndef RTE_PMD_MLX5_DEFS_H_ #define RTE_PMD_MLX5_DEFS_H_ -#include +#include #include #include "mlx5_autoconf.h" -/* Reported driver name. */ -#define MLX5_DRIVER_NAME "net_mlx5" - /* Maximum number of simultaneous VLAN filters. */ #define MLX5_MAX_VLAN_IDS 128 @@ -53,7 +50,7 @@ /* Switch port ID parameters for bonding configurations. */ #define MLX5_PORT_ID_BONDING_PF_MASK 0xf -#define MLX5_PORT_ID_BONDING_PF_SHIFT 0xf +#define MLX5_PORT_ID_BONDING_PF_SHIFT 12 /* Alarm timeout. */ #define MLX5_ALARM_TIMEOUT_US 100000 @@ -143,6 +140,9 @@ /* Log 2 of the default number of strides per WQE for Multi-Packet RQ. */ #define MLX5_MPRQ_STRIDE_NUM_N 6U +/* Log 2 of the default size of a stride per WQE for Multi-Packet RQ. */ +#define MLX5_MPRQ_STRIDE_SIZE_N 11U + /* Two-byte shift is disabled for Multi-Packet RQ. */ #define MLX5_MPRQ_TWO_BYTE_SHIFT 0 @@ -162,23 +162,48 @@ #define MLX5_XMETA_MODE_LEGACY 0 #define MLX5_XMETA_MODE_META16 1 #define MLX5_XMETA_MODE_META32 2 +/* Provide info on patrial hw miss. Implies MLX5_XMETA_MODE_META16 */ +#define MLX5_XMETA_MODE_MISS_INFO 3 /* MLX5_TX_DB_NC supported values. */ #define MLX5_TXDB_CACHED 0 #define MLX5_TXDB_NCACHED 1 #define MLX5_TXDB_HEURISTIC 2 +/* Tx accurate scheduling on timestamps parameters. */ +#define MLX5_TXPP_WAIT_INIT_TS 1000ul /* How long to wait timestamp. */ +#define MLX5_TXPP_CLKQ_SIZE 1 +#define MLX5_TXPP_REARM ((1UL << MLX5_WQ_INDEX_WIDTH) / 4) +#define MLX5_TXPP_REARM_SQ_SIZE (((1UL << MLX5_CQ_INDEX_WIDTH) / \ + MLX5_TXPP_REARM) * 2) +#define MLX5_TXPP_REARM_CQ_SIZE (MLX5_TXPP_REARM_SQ_SIZE / 2) +/* The minimal size test packet to put into one WQE, padded by HW. */ +#define MLX5_TXPP_TEST_PKT_SIZE (sizeof(struct rte_ether_hdr) + \ + sizeof(struct rte_ipv4_hdr)) + /* Size of the simple hash table for metadata register table. */ #define MLX5_FLOW_MREG_HTABLE_SZ 4096 #define MLX5_FLOW_MREG_HNAME "MARK_COPY_TABLE" #define MLX5_DEFAULT_COPY_ID UINT32_MAX +/* Size of the simple hash table for header modify table. */ +#define MLX5_FLOW_HDR_MODIFY_HTABLE_SZ (1 << 16) + +/* Size of the simple hash table for encap decap table. */ +#define MLX5_FLOW_ENCAP_DECAP_HTABLE_SZ (1 << 16) + /* Hairpin TX/RX queue configuration parameters. */ #define MLX5_HAIRPIN_QUEUE_STRIDE 6 -#define MLX5_HAIRPIN_JUMBO_LOG_SIZE (15 + 2) +#define MLX5_HAIRPIN_JUMBO_LOG_SIZE (14 + 2) + +/* Maximum number of shared actions supported by rte_flow */ +#define MLX5_MAX_SHARED_ACTIONS 2 -/* Definition of static_assert found in /usr/include/assert.h */ -#ifndef HAVE_STATIC_ASSERT +/* + * Linux definition of static_assert is found in /usr/include/assert.h. + * Windows does not require a redefinition. + */ +#if !defined(HAVE_STATIC_ASSERT) && !defined(RTE_EXEC_ENV_WINDOWS) #define static_assert _Static_assert #endif