net/mlx4: simplify trigger code for flow rules
authorAdrien Mazarguil <adrien.mazarguil@6wind.com>
Thu, 12 Oct 2017 12:19:29 +0000 (14:19 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Oct 2017 00:18:48 +0000 (01:18 +0100)
commitfee75e14f31cbd6c479e4fdbe367bdc640adbe01
treea8e301efaeba3d7a5e346ddd98bb2492c9603c23
parentfc49cbb7683fe60de44501a9f7c4916757762caf
net/mlx4: simplify trigger code for flow rules

Since flow rules synchronization function mlx4_flow_sync() takes into
account the state of the device (whether it is started), trigger functions
mlx4_flow_start() and mlx4_flow_stop() are redundant. Standardize on
mlx4_flow_sync().

Use this opportunity to enhance this function with better error reporting
as the inability to start the device due to a problem with a flow rule
otherwise results in a nondescript error code.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
drivers/net/mlx4/mlx4.c
drivers/net/mlx4/mlx4_flow.c
drivers/net/mlx4/mlx4_flow.h
drivers/net/mlx4/mlx4_rxq.c