net/mlx5: Properly check applicability of devlink eswitch commands
Currently we don't check that the link type is Eth and hence crash on IB ports when attempting to deref esw->xxx, fix that. To avoid repeating this check over and over, put the existing checks and the one on link type in a single helper. Fixes: 7768d197 ('net/mlx5: E-Switch, Add control for encapsulation') Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com> Reported-by: NMohamad Badarnah <mohamadb@mellanox.com> Reviewed-by: NRoi Dayan <roid@mellanox.com> Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
Showing
想要评论请 注册 或 登录