Skip to content

Commit f2638f1

Browse files
committed
net/mlx5: remove unused macros
- IS_BATCH_CNT became unused when removing flow counter container. - MLX5_ETHER_TYPE_FROM_HEADER was used in the first integrity item check. - ERRNO_SAFE was used in the old logging macros. Fixes: 994829e ("net/mlx5: remove single counter container") Fixes: 23b0a8b ("net/mlx5: fix integrity item validation and translation") Fixes: a170a30 ("net/mlx5: use dynamic logging") Cc: [email protected] Signed-off-by: Thomas Monjalon <[email protected]>
1 parent 9d37885 commit f2638f1

File tree

3 files changed

+0
-12
lines changed

3 files changed

+0
-12
lines changed

drivers/net/mlx5/mlx5.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -509,8 +509,6 @@ struct __rte_cache_aligned mlx5_hw_q {
509509
#define MLX5_MAX_PENDING_QUERIES 4
510510
#define MLX5_CNT_MR_ALLOC_BULK 64
511511
#define MLX5_CNT_SHARED_OFFSET 0x80000000
512-
#define IS_BATCH_CNT(cnt) (((cnt) & (MLX5_CNT_SHARED_OFFSET - 1)) >= \
513-
MLX5_CNT_BATCH_OFFSET)
514512
#define MLX5_CNT_SIZE (sizeof(struct mlx5_flow_counter))
515513
#define MLX5_AGE_SIZE (sizeof(struct mlx5_age_param))
516514

drivers/net/mlx5/mlx5_flow.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,13 +1888,6 @@ flow_hw_get_reg_id_from_ctx(void *dr_ctx, enum rte_flow_item_type type,
18881888
(((func) == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ) || \
18891889
((func) == RTE_ETH_HASH_FUNCTION_SYMMETRIC_TOEPLITZ_SORT))
18901890

1891-
/* extract next protocol type from Ethernet & VLAN headers */
1892-
#define MLX5_ETHER_TYPE_FROM_HEADER(_s, _m, _itm, _prt) do { \
1893-
(_prt) = ((const struct _s *)(_itm)->mask)->_m; \
1894-
(_prt) &= ((const struct _s *)(_itm)->spec)->_m; \
1895-
(_prt) = rte_be_to_cpu_16((_prt)); \
1896-
} while (0)
1897-
18981891
/* array of valid combinations of RX Hash fields for RSS */
18991892
static const uint64_t mlx5_rss_hash_fields[] = {
19001893
MLX5_RSS_HASH_IPV4,

drivers/net/mlx5/mlx5_utils.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@
2222

2323
#include "mlx5_defs.h"
2424

25-
/* Save and restore errno around argument evaluation. */
26-
#define ERRNO_SAFE(x) ((errno = (int []){ errno, ((x), 0) }[0]))
27-
2825
extern int mlx5_logtype;
2926

3027
#define MLX5_NET_LOG_PREFIX "mlx5_net"

0 commit comments

Comments
 (0)