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

Timeout for Vendor Specific Command #704

Open
rkawase opened this issue Sep 24, 2024 · 0 comments · May be fixed by #705
Open

Timeout for Vendor Specific Command #704

rkawase opened this issue Sep 24, 2024 · 0 comments · May be fixed by #705

Comments

@rkawase
Copy link

rkawase commented Sep 24, 2024

Hello, this is my first post to this github.

I had a timeout issue when an initiator sent a vendor-specific command to our target devices.
(It occurred on device-scanning from the initiator. So, (timeout value x # of devices) took very long time.)

It turned out that:
- tcmu_cdb_get_length() returns -EINVAL for vendor specific cdb, group_code 6 and 7.
- So, tcmulib_get_next_command() returns NULL.
- So, TCMU-runner drops the cdb, does nothing, and just ppoll() resulting to timeout in tcmur_cmdproc_thread().

So, I propose a few lines of fix we tested and would like to open a pull-request.

  • To match TCMU, tcmu-runner should provide a length of 10 for the group 6 and 7 cdb.
    (tcmu_cdb_get_length() should return 10 for 6 and 7 cdb.) - api.c
  • Ideally, the loop where it detects an invalid length still creates a cmd/job in tcmu-runner so that it can return status NOT_HANDLED instead of just dropping the command in tcmur_cmdproc_thread() - main.c
rkawase added a commit to rkawase/tcmu-runner that referenced this issue Sep 25, 2024
tcmu_cdb_get_length() will return 10 for vendor specific cdb

tcmur_cmdproc_thread() will not drop vendor specific command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant