From 87740fd9e9c4b3747ccdd1326aff48c701345a52 Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Fri, 3 Aug 2018 10:39:44 -0500 Subject: [PATCH] mlx5: Fixed compilation on RHEL7.5 Signed-off-by: Vladimir Sokolovsky --- patches/0004-BACKPORT-mlx5.patch | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/patches/0004-BACKPORT-mlx5.patch b/patches/0004-BACKPORT-mlx5.patch index 6917e44..0d61d7a 100644 --- a/patches/0004-BACKPORT-mlx5.patch +++ b/patches/0004-BACKPORT-mlx5.patch @@ -11,7 +11,7 @@ Signed-off-by: Vladimir Sokolovsky .../net/ethernet/mellanox/mlx5/core/en_ethtool.c | 235 +++++++++- drivers/net/ethernet/mellanox/mlx5/core/en_fs.c | 2 + drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 519 ++++++++++++++++++++- - drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 125 ++++- + drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 128 ++++- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 92 ++++ .../net/ethernet/mellanox/mlx5/core/en_selftest.c | 8 +- drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 205 ++++++++ @@ -26,7 +26,7 @@ Signed-off-by: Vladimir Sokolovsky drivers/net/ethernet/mellanox/mlx5/core/main.c | 67 +++ .../net/ethernet/mellanox/mlx5/core/mlx5_core.h | 3 + include/linux/mlx5/driver.h | 3 + - 23 files changed, 1459 insertions(+), 13 deletions(-) + 23 files changed, 1462 insertions(+), 13 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/ib_virt.c b/drivers/infiniband/hw/mlx5/ib_virt.c index xxxxxxx..xxxxxxx xxxxxx @@ -2137,7 +2137,7 @@ index xxxxxxx..xxxxxxx xxxxxx static int mlx5e_rep_get_phys_port_name(struct net_device *dev, char *buf, size_t len) { -@@ -720,11 +721,32 @@ static int mlx5e_rep_get_phys_port_name(struct net_device *dev, +@@ -720,11 +721,35 @@ static int mlx5e_rep_get_phys_port_name(struct net_device *dev, return 0; } @@ -2164,13 +2164,16 @@ index xxxxxxx..xxxxxxx xxxxxx { +#if !defined(HAVE_NDO_SETUP_TC_TAKES_TC_SETUP_TYPE) && !defined(HAVE_NDO_SETUP_TC_RH_EXTENDED) + struct tc_cls_flower_offload *cls_flower = tc->cls_flower; ++#endif ++ ++#ifndef HAVE_TC_BLOCK_OFFLOAD + struct mlx5e_priv *priv = netdev_priv(dev); +#endif + switch (cls_flower->command) { case TC_CLSFLOWER_REPLACE: return mlx5e_configure_flower(priv, cls_flower); -@@ -736,7 +758,9 @@ mlx5e_rep_setup_tc_cls_flower(struct mlx5e_priv *priv, +@@ -736,7 +761,9 @@ mlx5e_rep_setup_tc_cls_flower(struct mlx5e_priv *priv, return -EOPNOTSUPP; } } @@ -2180,7 +2183,7 @@ index xxxxxxx..xxxxxxx xxxxxx static int mlx5e_rep_setup_tc_cb(enum tc_setup_type type, void *type_data, void *cb_priv) { -@@ -772,17 +796,47 @@ static int mlx5e_rep_setup_tc_block(struct net_device *dev, +@@ -772,17 +799,47 @@ static int mlx5e_rep_setup_tc_block(struct net_device *dev, return -EOPNOTSUPP; } } @@ -2228,7 +2231,7 @@ index xxxxxxx..xxxxxxx xxxxxx bool mlx5e_is_uplink_rep(struct mlx5e_priv *priv) { -@@ -801,6 +855,7 @@ bool mlx5e_is_uplink_rep(struct mlx5e_priv *priv) +@@ -801,6 +858,7 @@ bool mlx5e_is_uplink_rep(struct mlx5e_priv *priv) return false; } @@ -2236,7 +2239,7 @@ index xxxxxxx..xxxxxxx xxxxxx static bool mlx5e_is_vf_vport_rep(struct mlx5e_priv *priv) { struct mlx5e_rep_priv *rpriv = priv->ppriv; -@@ -824,6 +879,7 @@ bool mlx5e_has_offload_stats(const struct net_device *dev, int attr_id) +@@ -824,6 +882,7 @@ bool mlx5e_has_offload_stats(const struct net_device *dev, int attr_id) return false; } @@ -2244,7 +2247,7 @@ index xxxxxxx..xxxxxxx xxxxxx static int mlx5e_get_sw_stats64(const struct net_device *dev, -@@ -853,12 +909,25 @@ int mlx5e_get_offload_stats(int attr_id, const struct net_device *dev, +@@ -853,12 +912,25 @@ int mlx5e_get_offload_stats(int attr_id, const struct net_device *dev, return -EINVAL; } @@ -2272,7 +2275,7 @@ index xxxxxxx..xxxxxxx xxxxxx } static const struct switchdev_ops mlx5e_rep_switchdev_ops = { -@@ -869,11 +938,36 @@ static const struct net_device_ops mlx5e_netdev_ops_rep = { +@@ -869,11 +941,36 @@ static const struct net_device_ops mlx5e_netdev_ops_rep = { .ndo_open = mlx5e_rep_open, .ndo_stop = mlx5e_rep_close, .ndo_start_xmit = mlx5e_xmit, @@ -2309,7 +2312,7 @@ index xxxxxxx..xxxxxxx xxxxxx }; static void mlx5e_build_rep_params(struct mlx5_core_dev *mdev, -@@ -906,7 +1000,9 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev) +@@ -906,7 +1003,9 @@ static void mlx5e_build_rep_netdev(struct net_device *netdev) netdev->ethtool_ops = &mlx5e_rep_ethtool_ops; @@ -2319,7 +2322,7 @@ index xxxxxxx..xxxxxxx xxxxxx netdev->features |= NETIF_F_VLAN_CHALLENGED | NETIF_F_HW_TC | NETIF_F_NETNS_LOCAL; netdev->hw_features |= NETIF_F_HW_TC; -@@ -1071,7 +1167,9 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) +@@ -1071,7 +1170,9 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) struct mlx5e_rep_priv *uplink_rpriv; struct mlx5e_rep_priv *rpriv; struct net_device *netdev; @@ -2329,7 +2332,7 @@ index xxxxxxx..xxxxxxx xxxxxx int err; rpriv = kzalloc(sizeof(*rpriv), GFP_KERNEL); -@@ -1106,11 +1204,18 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) +@@ -1106,11 +1207,18 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) } uplink_rpriv = mlx5_eswitch_get_uplink_priv(dev->priv.eswitch, REP_ETH); @@ -2348,7 +2351,7 @@ index xxxxxxx..xxxxxxx xxxxxx err = register_netdev(netdev); if (err) { -@@ -1122,10 +1227,17 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) +@@ -1122,10 +1230,17 @@ mlx5e_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) return 0; err_egdev_cleanup: @@ -2366,7 +2369,7 @@ index xxxxxxx..xxxxxxx xxxxxx mlx5e_rep_neigh_cleanup(rpriv); err_detach_netdev: -@@ -1145,14 +1257,23 @@ mlx5e_vport_rep_unload(struct mlx5_eswitch_rep *rep) +@@ -1145,14 +1260,23 @@ mlx5e_vport_rep_unload(struct mlx5_eswitch_rep *rep) struct mlx5e_priv *priv = netdev_priv(netdev); struct mlx5e_rep_priv *uplink_rpriv; void *ppriv = priv->ppriv; -- 2.41.0