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

mlx5: Handle the EREMOTEIO upon DEVX usage #1163

Merged
merged 4 commits into from
Apr 4, 2022

Conversation

yishaih
Copy link
Member

@yishaih yishaih commented Mar 31, 2022

This series handles the EREMOTEIO return code upon DEVX usage.

When a DEVX command is executed by FW and failed, EREMOTEIO is returned to indicate the caller that the command status and syndrome are available in the outbox.

  • Add this info to the DEVX man pages.
  • Translate the EREMOTEIO to the real error when DEVX is used internally.
  • Align VFIO DEVX APIs return codes to the regular DEVX APIs.

Some variables cause compilation warnings, as the compiler doesn't
recognize their initialization. Explicitly initialize them to avoid the
warnings.

Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Reviewed-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
When a DEVX command is executed by FW and failed, EREMOTEIO is returned
to indicate the caller that the command status and syndrome are
available in the outbox.

Add this info to the DEVX man pages.

Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Reviewed-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
…ally

Some functions make use of DEVX commands internally and don't expose the
outbox to the caller, so the caller will get an obscure EREMOTEIO in
such cases.

In those cases, translate the outbox error status internally and return
it to the caller.

Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Reviewed-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
The following [1] kernel series changed the command interface return
codes for DEVX commands.

In regular (non-VFIO) DEVX APIs, if the command was executed by FW but
outbox.status != MLX5_CMD_STAT_OK, EREMOTEIO is returned to indicate to
the caller that the command status and syndrome are available in the
outbox.
Change VFIO DEVX APIs return codes to be aligned with that according to
the updated man pages.

[1] https://lore.kernel.org/netdev/20220223050932.244668-1-saeed@kernel.org/.

Signed-off-by: Aharon Landau <aharonl@nvidia.com>
Reviewed-by: Avihai Horon <avihaih@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
@yishaih yishaih merged commit a3e6926 into linux-rdma:master Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants