ice: Forbid trusted VFs in switchdev mode
Subsystems (2)
PATCH 1/1 ice: Forbid trusted VFs in switchdev mode
During auto-merge, check for switchdev mode has been inserted in wrong place. It should be in ice_set_vf_trust not in ice_set_vf_mac.
Trusted VFs are forbidden in switchdev mode because they should be configured only from the host side.
--- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +5 -5
@@ -4815,11 +4815,6 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)struct ice_vf *vf;int ret; -if (ice_is_eswitch_mode_switchdev (pf)) { -dev_info (ice_pf_to_dev (pf),"Trusted VF is forbidden in switchdev mode\n" ); -return -EOPNOTSUPP ; - } -if (ice_validate_vf_id (pf, vf_id))return -EINVAL ;
@@ -4882,6 +4877,11 @@ int ice_set_vf_trust(struct net_device *netdev, int vf_id, bool trusted)struct ice_vf *vf;int ret; +if (ice_is_eswitch_mode_switchdev (pf)) { +dev_info (ice_pf_to_dev (pf),"Trusted VF is forbidden in switchdev mode\n" ); +return -EOPNOTSUPP ; + } +if (ice_validate_vf_id (pf, vf_id))return -EINVAL ;
Signature · 1 line
2.31.1
PATCH 1/1 ice: Forbid trusted VFs in switchdev mode
Quoted 6 lines · Wojciech Drewek
During auto-merge, check for switchdev mode has been inserted in wrong place. It should be in
ice_set_vf_trustnot inice_set_vf_mac.Trusted VFs are forbidden in switchdev mode because they should be configured only from the host side.
should have had
Quoted 34 lines
Signed-off-by Wojciech Drewek <[email protected]>--- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +5
-5@@ -4815,11 +4815,6 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)struct ice_vf *vf;int ret; -if (ice_is_eswitch_mode_switchdev (pf)) { -dev_info (ice_pf_to_dev (pf),"Trusted VF is forbidden in switchdev mode\n" ); -return -EOPNOTSUPP ; - } -if (ice_validate_vf_id (pf, vf_id))return -EINVAL ;@@ -4882,6 +4877,11 @@ int ice_set_vf_trust(struct net_device *netdev, int vf_id, bool trusted)struct ice_vf *vf;int ret; +if (ice_is_eswitch_mode_switchdev (pf)) { +dev_info (ice_pf_to_dev (pf),"Trusted VF is forbidden in switchdev mode\n" ); +return -EOPNOTSUPP ; + } +if (ice_validate_vf_id (pf, vf_id))return -EINVAL ;
Drewek
PATCH 1/1 ice: Forbid trusted VFs in switchdev mode
Quoted 12 lines
-----Original Message-----
From: Brandeburg, Jesse <[email protected]>
Sent: czwartek, 14 pa?dziernika 2021 20:16
To: Drewek, Wojciech <[email protected]>; intel-wired-lan at lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH net-next] ice: Forbid trusted VFs in switchdev modeQuoted 3 lines · Wojciech Drewek
During auto-merge, check for switchdev mode has been inserted in wrong place. It should be in
ice_set_vf_trustnot inice_set_vf_mac.
Quoted 6 lines
Quoted 3 lines
Trusted VFs are forbidden in switchdev mode because they should be configured only from the host side.
should have had
Fixes 1c54c839935b ("ice: enable/disable switchdev when managing VFs")
I've added tag in the second version
Quoted 36 lines
Quoted 36 lines
Signed-off-by Wojciech Drewek <[email protected]>--- drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/net/ethernet/intel/ice/ice_virtchnl_pf.c +5
-5@@ -4815,11 +4815,6 @@ int ice_set_vf_mac(struct net_device *netdev, int vf_id, u8 *mac)struct ice_vf *vf;int ret; -if (ice_is_eswitch_mode_switchdev (pf)) { -dev_info (ice_pf_to_dev (pf),"Trusted VF is forbidden in switchdev mode\n" ); -return -EOPNOTSUPP ; - } -if (ice_validate_vf_id (pf, vf_id))return -EINVAL ;@@ -4882,6 +4877,11 @@ int ice_set_vf_trust(struct net_device *netdev, int vf_id, bool trusted)struct ice_vf *vf;int ret; +if (ice_is_eswitch_mode_switchdev (pf)) { +dev_info (ice_pf_to_dev (pf),"Trusted VF is forbidden in switchdev mode\n" ); +return -EOPNOTSUPP ; + } +if (ice_validate_vf_id (pf, vf_id))return -EINVAL ;