Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENA FreeBSD driver version 2.6.2 #637

Closed
wants to merge 4 commits into from
Closed

Conversation

akiyano
Copy link
Contributor

@akiyano akiyano commented Jan 12, 2023

Bug Fixes:

  • Remove timer service re-arm on ena_restore_device failure.
  • Re-Enable per-packet missing tx completion print

Minor Changes:

  • Switch driver owners from Semihalf to Amazon in man file.

akiyano and others added 4 commits January 12, 2023 14:51
Commit [1] first added the ena_tx_buffer.print_once member,
so that a message about a missing tx completion is printed only
once per packet (and not every second when the watchdog runs).
In this commit print_once is initialized to true, and is set back
to false after detecting a missing tx completion and printing
a warning about it to dmesg.

Commit [2] incorrectly reverses the values assigned to print_once.
The variable is initialized to be true but is checked to be false
when a missing tx completion is detected. This is never true, and
therefore the warning print for each missing tx completion is never
printed since this commit.

Commit [3] added time passed since last TX cleanup to the missing
tx completions per-packet print. However, due to the issue in commit
[2], this time is never printed.

This commit reverses back the values assigned to ena_tx_buffer.print_once
erroneously by commit [2], bringing back to life the missing tx
completion per-packet print.

Also add a space after "." in the missing tx completion print.

[1] - 9b8d05b ("Add support for Amazon Elastic Network Adapter (ENA) NIC")
[2] - 74dba3a ("Split function checking for missing TX completion in ENA driver")
[3] - d8aba82 ("ena: Store ticks of last Tx cleanup")

Fixes: 74dba3a ("Split function checking for missing TX completion in ENA driver")
Fixes: d8aba82 ("ena: Store ticks of last Tx cleanup")
MFC after: 2 weeks
Sponsored by: Amazon, Inc.
In case the reset sequence fails (ena_destroy_device() followed by
ena_restore_device() calls) during ena_restore_device(), the driver
resources are being freed. After the clean-up, the timer service is
re-armed in order to try and re-initialize the driver state.
But, such an attempt would fail given that the resources are freed.
Moreover, this would actually cause either the system to fail or a
panic.
When the driver fails in ena_restore_device() procedure, the only
recovery is either unloading and loading the driver or instance
reboot.

This change removes the timer service re-arm in case of failure
in ena_restore_device().

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Fixes: 78554d0 ("ena: start timer service on attach")
1. Update ena.4 manual file to include amazon owner emails.
2. State that the driver is developed by amazon but leave
that it was originally written by Semihalf, similarly to other
drivers in the /share/man/ directory of the FreeBSD source code.
3. Advance year in copyright notice to 2022.

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Bug Fixes:
* Remove timer service re-arm on ena_restore_device failure.
* Re-Enable per-packet missing tx completion print

Minor Changes:
* Switch driver owners from Semihalf to Amazon in man file.

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
freebsd-git pushed a commit that referenced this pull request Jan 13, 2023
Bug Fixes:
* Remove timer service re-arm on ena_restore_device failure.
* Re-Enable per-packet missing tx completion print

Minor Changes:
* Switch driver owners from Semihalf to Amazon in man file.

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Pull Request: #637
@wojtas-marcin
Copy link

Hi @bsdimp

I merged these patches, but the pull request remains open. Is there any trick I'm missing?

Best regards,
Marcin

@lwhsu
Copy link
Member

lwhsu commented Jan 13, 2023

I merged these patches, but the pull request remains open. Is there any trick I'm missing?

Currently for github PR we need to close them manually. You can do that if you're in the github's freebsd org. I'm closing this one for you. :-)

@lwhsu lwhsu closed this Jan 13, 2023
freebsd-git pushed a commit that referenced this pull request Jan 27, 2023
Bug Fixes:
* Remove timer service re-arm on ena_restore_device failure.
* Re-Enable per-packet missing tx completion print

Minor Changes:
* Switch driver owners from Semihalf to Amazon in man file.

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Pull Request: #637

(cherry picked from commit e5de1d8)
freebsd-git pushed a commit that referenced this pull request Jan 31, 2023
Bug Fixes:
* Remove timer service re-arm on ena_restore_device failure.
* Re-Enable per-packet missing tx completion print

Minor Changes:
* Switch driver owners from Semihalf to Amazon in man file.

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Pull Request: #637

(cherry picked from commit e5de1d8)
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request Mar 16, 2023
Bug Fixes:
* Remove timer service re-arm on ena_restore_device failure.
* Re-Enable per-packet missing tx completion print

Minor Changes:
* Switch driver owners from Semihalf to Amazon in man file.

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Pull Request: freebsd/freebsd-src#637
@emaste emaste added the merged label Jun 12, 2023
laffer1 pushed a commit to MidnightBSD/src that referenced this pull request Jun 27, 2023
Bug Fixes:
* Remove timer service re-arm on ena_restore_device failure.
* Re-Enable per-packet missing tx completion print

Minor Changes:
* Switch driver owners from Semihalf to Amazon in man file.

MFC after: 2 weeks
Sponsored by: Amazon, Inc.
Pull Request: freebsd/freebsd-src#637

(cherry picked from commit e5de1d8dad25308f3a332f9386e05b851a36c507)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants