Enhance force down link feature.#37
Conversation
|
To use the force down link feature, we should add following patch on ntb_transport.c .
Thanks |
|
it is better to rework the commit message |
| schedule_work(&sndev->link_reinit_work); | ||
|
|
||
| if (sndev->link_is_up) { | ||
| schedule_work(&sndev->link_reinit_work); |
There was a problem hiding this comment.
I don't think I like this change. If a peer dies and comes back when the link is down, then we won't reinitialize the shared memory window as we should....
Otherwise this looks good.
There was a problem hiding this comment.
Hi Logan,
Thanks for the comment. I have canceled this change.
In our test, we used a shell script to load the NTB and Switchtec drivers. After using the force down link, we need to add a delay between loading ntb_hw_switchtec and ntb_transport module, otherwise the NT I/O test would be fail. is it ok?
Function switchtec_ntb_reinit_peer() is used to reinitialize the shared NTB memory window. it doesn't need to free and reallocate the memory. We can implement it by reconfiguring the reseved LUT window. Signed-off-by: Joey Zhang <joey.zhang@microchip.com>
d151c8e to
e6537c7
Compare
|
@wesleywesley I have updated the commit message. Please help to review it. |
|
@JoeyZhang-Microsemi
test@server1:~/switchtec-kernel$ ~/kernel/linux-4.17.6/scripts/checkpatch.pl 0001-ntb_hw_switchtec-Optimize-function-switchtec_ntb_rei.patch WARNING: Missing a blank line after declarations
ERROR: Missing Signed-off-by: line(s) total: 1 errors, 2 warnings, 32 lines checked NOTE: For some of the reported defects, checkpatch may be able to 0001-ntb_hw_switchtec-Optimize-function-switchtec_ntb_rei.patch has style problems, please review. NOTE: If any of the errors are false positives, please report |
e6537c7 to
68cee85
Compare
|
@wesleywesley Thanks for the review. I have fixed issues. |
When a host is not a surviving host, but it receives the link force down massage, it should skip the link force down massage. To reinitialize the shared memory window, the driver just need to reinitialize the reserved LUT window.