]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net/mlx5e: IPoIB, Add PKEY child interface ethtool ops
authorAlex Vesker <valex@mellanox.com>
Thu, 14 Sep 2017 15:02:31 +0000 (18:02 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Sat, 14 Oct 2017 18:22:12 +0000 (11:22 -0700)
Similar to VLAN interfaces child interfaces have limited ethtool
support. In current code the main limitation that does not
allow child interface ethtool configuration is due to shared
resources which are managed by the parent.

Signed-off-by: Alex Vesker <valex@mellanox.com>
Reviewed-by: Erez Shitrit <erezsh@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib.h
drivers/net/ethernet/mellanox/mlx5/core/ipoib/ipoib_vlan.c

index 43c126c63955d543d224f6e9fbd67db0d1329991..6f338a9219c8527c80550013b720e3cc728bf027 100644 (file)
@@ -250,3 +250,8 @@ const struct ethtool_ops mlx5i_ethtool_ops = {
        .get_link_ksettings = mlx5i_get_link_ksettings,
        .get_link           = ethtool_op_get_link,
 };
+
+const struct ethtool_ops mlx5i_pkey_ethtool_ops = {
+       .get_drvinfo        = mlx5i_get_drvinfo,
+       .get_link           = ethtool_op_get_link,
+};
index 80c0cfee7164704fb9dbbc2babf7be740c2253a1..a50c1a19550e19225f4677d89d6eef226aa93078 100644 (file)
@@ -39,6 +39,7 @@
 #define MLX5I_MAX_NUM_TC 1
 
 extern const struct ethtool_ops mlx5i_ethtool_ops;
+extern const struct ethtool_ops mlx5i_pkey_ethtool_ops;
 
 #define MLX5_IB_GRH_BYTES       40
 #define MLX5_IPOIB_ENCAP_LEN    4
index d99bec6855de4d4c086e5b8d4a263be5597f3438..531b02cc979b656c6a57cde16f2a0a5e7d36e809 100644 (file)
@@ -279,8 +279,8 @@ static void mlx5i_pkey_init(struct mlx5_core_dev *mdev,
        /* Override parent ndo */
        netdev->netdev_ops = &mlx5i_pkey_netdev_ops;
 
-       /* Currently no ethtool support */
-       netdev->ethtool_ops = NULL;
+       /* Set child limited ethtool support */
+       netdev->ethtool_ops = &mlx5i_pkey_ethtool_ops;
 
        /* Use dummy rqs */
        priv->channels.params.log_rq_size = MLX5E_PARAMS_MINIMUM_LOG_RQ_SIZE;