]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
net/mlx5e: More generic netdev management API
authorSaeed Mahameed <saeedm@mellanox.com>
Thu, 13 Apr 2017 03:36:54 +0000 (06:36 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 17 Apr 2017 15:08:29 +0000 (11:08 -0400)
commit2c3b5beec46ab0d77c94828eb15170b333ae769a
treee06534e171ca36fea00d2f0a57b85669fe5b094b
parentffdb8827ec31f63f5db242937c3233bedfeb8702
net/mlx5e: More generic netdev management API

In preparation for mlx5e RDMA net_device support, here we generalize
mlx5e_attach/detach in a way that those functions will be agnostic
to link type.  For that we move ethernet specific NIC net device logic out
of those functions into {nic,rep}_{enable/disable} mlx5e NIC and
representor profiles callbacks.

Also some of the logic was moved only to NIC profile since it is not right
to have this logic for representor net device (e.g. set port MTU).

Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Erez Shitrit <erezsh@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c