net/mlx5: match Rx completion entry size to cacheline
[dpdk.git] / drivers / net / mlx5 / mlx5.c
index b2087c0..e1aa9b9 100644 (file)
@@ -1012,6 +1012,9 @@ rte_mlx5_pmd_init(void)
        setenv("RDMAV_HUGEPAGES_SAFE", "1", 1);
        /* Don't map UAR to WC if BlueFlame is not used.*/
        setenv("MLX5_SHUT_UP_BF", "1", 1);
+       /* Match the size of Rx completion entry to the size of a cacheline. */
+       if (RTE_CACHE_LINE_SIZE == 128)
+               setenv("MLX5_CQE_SIZE", "128", 0);
        ibv_fork_init();
        rte_pci_register(&mlx5_driver);
 }