Re: [External] Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-08-28 Thread Klaus Jensen
On Aug 28 00:20, 卢长奇 wrote: > Hi, > > I want to know if I understand it correctly. > > ``` > static void nvme_aio_err(NvmeRequest *req, int ret) > { > uint16_t status = NVME_SUCCESS; > Error *local_err = NULL; > > switch (req->cmd.opcode) { > case NVME_CMD_READ: > case NVME_CMD_RESV_REPORT: > st

Re: [External] Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-08-28 Thread 卢长奇
Hi, I want to know if I understand it correctly. ``` static void nvme_aio_err(NvmeRequest *req, int ret) { uint16_t status = NVME_SUCCESS; Error *local_err = NULL; switch (req->cmd.opcode) { case NVME_CMD_READ: case NVME_CMD_RESV_REPORT: status = NVME_UNRECOVERED_READ; break; case NVME_CMD_FLUSH

Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-08-27 Thread Klaus Jensen
On Jul 12 10:36, Changqi Lu wrote: > Add reservation acquire, reservation register, > reservation release and reservation report commands > in the nvme device layer. > > By introducing these commands, this enables the nvme > device to perform reservation-related tasks, including > querying keys, q

Re: [External] Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-08-27 Thread 卢长奇
Hi, Thanks for your advice. Previously, g_malloc0 was used, but a segmentation fault occurred during testing. Later, debugging revealed that a field in struct NvmeReservationStatusExt, struct NvmeRegisteredCtrlExt regctl_eds[], was a variable-length array. Therefore, g_malloc was used to apply aft

Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-08-27 Thread Klaus Jensen
On Jul 12 10:36, Changqi Lu wrote: > Add reservation acquire, reservation register, > reservation release and reservation report commands > in the nvme device layer. > > By introducing these commands, this enables the nvme > device to perform reservation-related tasks, including > querying keys, q

Re: [External] Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-08-27 Thread Klaus Jensen
On Jul 26 05:54, 卢长奇 wrote: > Hi; > > You can test it in spdk. > First start spdk and execute the following command. > > ``` > dd if=/dev/zero of=test.img bs=1G count=10 > RPC=/root/source/spdk/spdk/scripts/rpc.py > FILE=/root/test.img > > $RPC bdev_aio_create $FILE aio0 512 > $RPC iscsi_create_

Re: Ping: Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-08-18 Thread Klaus Jensen
On Aug 6 04:56, 卢长奇 wrote: > Hi; > > Klaus, Does the test method in the above email work properly? > I assume it will; I was on conference and was catching up all of last week. I'll take action on this this week. > On 2024/7/26 17:53, 卢长奇 wrote: > > Hi; > > > > You can test it in spdk. > > Fi

Ping: Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-08-05 Thread 卢长奇
Hi; Klaus, Does the test method in the above email work properly? On 2024/7/26 17:53, 卢长奇 wrote: > Hi; > > You can test it in spdk. > First start spdk and execute the following command. > > ``` > dd if=/dev/zero of=test.img bs=1G count=10 > RPC=/root/source/spdk/spdk/scripts/rpc.py > FILE=/root/t

Re: [External] Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-07-26 Thread 卢长奇
Hi; You can test it in spdk. First start spdk and execute the following command. ``` dd if=/dev/zero of=test.img bs=1G count=10 RPC=/root/source/spdk/spdk/scripts/rpc.py FILE=/root/test.img $RPC bdev_aio_create $FILE aio0 512 $RPC iscsi_create_portal_group 1 127.0.0.1:3260 $RPC iscsi_create_init

Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-07-25 Thread Klaus Jensen
On Jul 25 19:42, 卢长奇 wrote: > Hi, > > ``` > 2685 nvme_status->regctl_ds[i].cntlid = nvme_ctrl(req)->cntlid; > 2686 nvme_status->regctl_ds[i].rkey = keys_info->keys[i]; > 2687 nvme_status->regctl_ds[i].rcsts = keys_info->keys[i] == > 2688 reservation->key ? 1 : 0; > 2689 /* hostid is not supported

Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-07-25 Thread 卢长奇
Hi, ``` 2685 nvme_status->regctl_ds[i].cntlid = nvme_ctrl(req)->cntlid; 2686 nvme_status->regctl_ds[i].rkey = keys_info->keys[i]; 2687 nvme_status->regctl_ds[i].rcsts = keys_info->keys[i] == 2688 reservation->key ? 1 : 0; 2689 /* hostid is not supported currently */ 2670 memset(&nvme_status->regct

Re: Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-07-17 Thread 卢长奇
Hi, Thank you for your support. 1. I will add a guide on how to get a simple test at next patch. 2. I think hostid is stored locally like cntlid, but I can't find a way to get the host ID. Is it correct to get it through qmp_query_uuid() method? Using spdk as target will not fail, but it will sh

Re: [PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-07-15 Thread Klaus Jensen
On Jul 12 10:36, Changqi Lu wrote: > Add reservation acquire, reservation register, > reservation release and reservation report commands > in the nvme device layer. > > By introducing these commands, this enables the nvme > device to perform reservation-related tasks, including > querying keys, q

[PATCH v9 09/10] hw/nvme: add reservation protocal command

2024-07-11 Thread Changqi Lu
Add reservation acquire, reservation register, reservation release and reservation report commands in the nvme device layer. By introducing these commands, this enables the nvme device to perform reservation-related tasks, including querying keys, querying reservation status, registering reservati