summaryrefslogtreecommitdiff
path: root/drivers/net/mlx5/mlx5_ethdev.c
diff options
context:
space:
mode:
authorMoti Haimovsky <motih@mellanox.com>2018-07-15 20:31:39 +0300
committerThomas Monjalon <thomas@monjalon.net>2018-07-26 14:05:52 +0200
commit79d0989213cd39decfe802cc42e334db4f0978f0 (patch)
tree2d919fe3800a4eb5edc18585b1acec0ca414f115 /drivers/net/mlx5/mlx5_ethdev.c
parent21174f2a5cf93fe92fac74ea5a93b51b67e5dd38 (diff)
downloaddpdk-79d0989213cd39decfe802cc42e334db4f0978f0.zip
dpdk-79d0989213cd39decfe802cc42e334db4f0978f0.tar.gz
dpdk-79d0989213cd39decfe802cc42e334db4f0978f0.tar.xz
net/mlx5: fix build with old kernels
This commit fixes compilation errors due to missing definitions found when compiling mlx5 PMD from DPDK 17.11-LTS on Ubuntu 12.4 with kernel 3.15. Fixes: 75ef62a94301 ("net/mlx5: fix link speed capability information") Fixes: 5bfc9fc112dd ("net/mlx5: use static assert for compile-time sanity checks") Cc: stable@dpdk.org Signed-off-by: Moti Haimovsky <motih@mellanox.com> Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Diffstat (limited to 'drivers/net/mlx5/mlx5_ethdev.c')
-rw-r--r--drivers/net/mlx5/mlx5_ethdev.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index b8f9136..9cf2dc5 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -41,6 +41,32 @@
#include "mlx5_rxtx.h"
#include "mlx5_utils.h"
+/* Supported speed values found in /usr/include/linux/ethtool.h */
+#ifndef HAVE_SUPPORTED_40000baseKR4_Full
+#define SUPPORTED_40000baseKR4_Full (1 << 23)
+#endif
+#ifndef HAVE_SUPPORTED_40000baseCR4_Full
+#define SUPPORTED_40000baseCR4_Full (1 << 24)
+#endif
+#ifndef HAVE_SUPPORTED_40000baseSR4_Full
+#define SUPPORTED_40000baseSR4_Full (1 << 25)
+#endif
+#ifndef HAVE_SUPPORTED_40000baseLR4_Full
+#define SUPPORTED_40000baseLR4_Full (1 << 26)
+#endif
+#ifndef HAVE_SUPPORTED_56000baseKR4_Full
+#define SUPPORTED_56000baseKR4_Full (1 << 27)
+#endif
+#ifndef HAVE_SUPPORTED_56000baseCR4_Full
+#define SUPPORTED_56000baseCR4_Full (1 << 28)
+#endif
+#ifndef HAVE_SUPPORTED_56000baseSR4_Full
+#define SUPPORTED_56000baseSR4_Full (1 << 29)
+#endif
+#ifndef HAVE_SUPPORTED_56000baseLR4_Full
+#define SUPPORTED_56000baseLR4_Full (1 << 30)
+#endif
+
/* Add defines in case the running kernel is not the same as user headers. */
#ifndef ETHTOOL_GLINKSETTINGS
struct ethtool_link_settings {