i40e: Fix for VF MAC address 0
Subsystems (2)
PATCH 1/1 i40e: Fix for VF MAC address 0
From: Sylwester Dziedziuch <[email protected]>
After spawning max VFs on a PF, some VFs were not
getting resources and their MAC addresses were 0.
This was caused by PF sleeping before flushing hw
registers which caused VIRTCHNL_VFR_VFACTIVE
to not be set in time for VF.
Fix by adding a sleep after hw flush.
--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +2 -0
@@ -1578,6 +1578,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)i40e_cleanup_reset_vf (vf);i40e_flush (hw); +usleep_range (20000 ,40000 );clear_bit (I40E_VF_STATE_RESETTING , &vf->vf_states);return true;
@@ -1701,6 +1702,7 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr) }i40e_flush (hw); +usleep_range (20000 ,40000 );clear_bit (__I40E_VF_DISABLE, pf->state);return true;
Signature · 6 lines
2.31.1 _______________________________________________ Intel-wired-lan mailing list [email protected] https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
Quoted 31 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jan Sokolowski
Sent: Monday, October 31, 2022 1:00 PM
To: [email protected]
Cc: Dziedziuch, SylwesterX <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1] i40e: Fix for VF MAC address 0From: Sylwester Dziedziuch <[email protected]>
After spawning max VFs on a PF, some VFs were not getting resources and their MAC addresses were 0.
This was caused by PF sleeping before flushing hw registers which causedVIRTCHNL_VFR_VFACTIVEto not be set in time for VF.Fix by adding a sleep after hw flush.
Fixes e4b433f4a741 ("i40e: reset all VFs in parallel when rebuilding PF")Signed-off-by Sylwester Dziedziuch <[email protected]>Signed-off-by Jan Sokolowski <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +0
-0
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Dear Jan,
Am 31.10.22 um 13:00 schrieb Jan Sokolowski:
Quoted 7 lines
From: Sylwester Dziedziuch <[email protected]>
After spawning max VFs on a PF, some VFs were not
getting resources and their MAC addresses were 0.
This was caused by PF sleeping before flushing hw
registers which causedVIRTCHNL_VFR_VFACTIVE
to not be set in time for VF.
Please reflow for 75 characters per line to make use of all the available textwidth.
Quoted 22 lines
Fix by adding a sleep after hw flush.
Fixes e4b433f4a741 ("i40e: reset all VFs in parallel when rebuilding PF")Signed-off-by Sylwester Dziedziuch <[email protected]>Signed-off-by Jan Sokolowski <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +1
-0@@ -1578,6 +1578,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)i40e_cleanup_reset_vf (vf);i40e_flush (hw); +usleep_range (20000 ,40000 );clear_bit (I40E_VF_STATE_RESETTING , &vf->vf_states);return true;
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr) · line 1708
Quoted 7 lines
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +1
-0@@ -1701,6 +1702,7 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr) }i40e_flush (hw); +usleep_range (20000 ,40000 );clear_bit (__I40E_VF_DISABLE, pf->state);return true;
Did you test, what kind of performance impact this has, when resetting the VF? Is the reset happening often, so 20 ms to 40 ms are going to be noticed?
Kind regards,
Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
Hello!
With regards to the perf question: No, such thing should not be noticed at all.
However, I've noticed this patch has been pulled to dev-queue branch of net-queue and next-queue. Should I reflow the commit msg and send a next version, or just leave it be?
-----Original Message-----
From: Paul Menzel <[email protected]>
Sent: Thursday, November 3, 2022 1:37 PM
To: Sokolowski, Jan <[email protected]>
Cc: [email protected]; Dziedziuch, SylwesterX <[email protected]>
Subject: Re: [Intel-wired-lan] [PATCH net v1] i40e: Fix for VF MAC address 0
Dear Jan
Am 31.10.22 um 13:00 schrieb Jan Sokolowski:
Quoted 7 lines
From: Sylwester Dziedziuch <[email protected]>
After spawning max VFs on a PF, some VFs were not
getting resources and their MAC addresses were 0.
This was caused by PF sleeping before flushing hw
registers which causedVIRTCHNL_VFR_VFACTIVE
to not be set in time for VF.
Please reflow for 75 characters per line to make use of all the available textwidth.
Quoted 22 lines
Fix by adding a sleep after hw flush.
Fixes e4b433f4a741 ("i40e: reset all VFs in parallel when rebuilding PF")Signed-off-by Sylwester Dziedziuch <[email protected]>Signed-off-by Jan Sokolowski <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +1
-0@@ -1578,6 +1578,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)i40e_cleanup_reset_vf (vf);i40e_flush (hw); +usleep_range (20000 ,40000 );clear_bit (I40E_VF_STATE_RESETTING , &vf->vf_states);return true;
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr) · line 1708
Quoted 7 lines
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +1
-0@@ -1701,6 +1702,7 @@ bool i40e_reset_all_vfs(struct i40e_pf *pf, bool flr) }i40e_flush (hw); +usleep_range (20000 ,40000 );clear_bit (__I40E_VF_DISABLE, pf->state);return true;
Did you test, what kind of performance impact this has, when resetting the VF? Is the reset happening often, so 20 ms to 40 ms are going to be noticed?
Kind regards,
Paul
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
Quoted 32 lines
-----Original Message-----
From: Intel-wired-lan <[email protected]> On Behalf Of Jan Sokolowski
Sent: Monday, October 31, 2022 1:00 PM
To: [email protected]
Cc: Dziedziuch, SylwesterX <[email protected]>
Subject: [Intel-wired-lan] [PATCH net v1] i40e: Fix for VF MAC address 0From: Sylwester Dziedziuch <[email protected]>
After spawning max VFs on a PF, some VFs were not getting resources and their MAC addresses were 0.
This was caused by PF sleeping before flushing hw registers which causedVIRTCHNL_VFR_VFACTIVEto not be set in time for VF.Fix by adding a sleep after hw flush.
Fixes e4b433f4a741 ("i40e: reset all VFs in parallel when rebuilding PF")Signed-off-by Sylwester Dziedziuch <[email protected]>Signed-off-by Jan Sokolowski <[email protected]>--- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 ++ 1 file changed, 2 insertions(+)drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +0
-0@@ -1578,6 +1578,7 @@ bool i40e_reset_vf(struct i40e_vf *vf, bool flr)
_______________________________________________
Intel-wired-lan mailing list
[email protected]
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan