net/mlx5: E-Switch, return error if encap isn't supported
On regular ConnectX HCAs getting encap mode isn't supported when the E-Switch is in NONE mode. Current code would return no error code when trying to get encap mode in such case which is wrong. Fix by returning error value to indicate failure to caller in such case. Fixes: 8e0aa4bc ("net/mlx5: E-switch, Protect eswitch mode changes") Signed-off-by: NRaed Salem <raeds@nvidia.com> Reviewed-by: NMark Bloch <mbloch@nvidia.com> Reviewed-by: NMaor Dickman <maord@nvidia.com> Signed-off-by: NSaeed Mahameed <saeedm@nvidia.com>
Showing
想要评论请 注册 或 登录