net/mlx: control netdevices through ioctl only
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Thu, 8 Feb 2018 16:37:06 +0000 (17:37 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 30 Mar 2018 12:08:42 +0000 (14:08 +0200)
commitfc40db997323bb0e9b725a6e8d65eae95372446c
treec04eb96d1955a0ea4590e6bfe3c3b65f981d32b4
parent984af543c254be1fc3f0ae46f381d75dcd0af361
net/mlx: control netdevices through ioctl only

Several control operations implemented by these PMDs affect netdevices
through sysfs, itself subject to file system permission checks enforced by
the kernel, which limits their use for most purposes to applications
running with root privileges.

Since performing the same operations through ioctl() requires fewer
capabilities (only CAP_NET_ADMIN) and given the remaining operations are
already implemented this way, this patch standardizes on ioctl() and gets
rid of redundant code.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
drivers/net/mlx4/mlx4_ethdev.c
drivers/net/mlx5/mlx5.h
drivers/net/mlx5/mlx5_ethdev.c
drivers/net/mlx5/mlx5_stats.c