Skip to content

Conversation

@yapple
Copy link

@yapple yapple commented Jan 29, 2026

Pull Request Description

[Please provide a clear and concise description of your changes here]

feat: Initial support for zero-copy commands (all server commands are empty implementations for now)

alloc/seal/acquire/release

to support alloc command, we add a member alloc_length in priskv_request, and add a member addr_offset in priskv_response

to support acquire command, we also use the new member addr_offset in priskv_response

Related Issues

Resolves: #[Insert issue number(s)]

Important: Before submitting, please complete the description above and review the checklist below.


Contribution Guidelines (Expand for Details)

We appreciate your contribution to PrisKV! To ensure a smooth review process and maintain high code quality, please adhere to the following guidelines:

Pull Request Title Format

Your PR title should start with one of these prefixes to indicate the nature of the change:

  • [Bug]: Corrections to existing functionality
  • [CI]: Changes to build process or CI pipeline
  • [Docs]: Updates or additions to documentation
  • [API]: Modifications to PrisKV's API or interface
  • [CLI]: Changes or additions to the Command Line Interface
  • [Misc]: For changes not covered above (use sparingly)

Note: For changes spanning multiple categories, use multiple prefixes in order of importance.

Submission Checklist

  • PR title includes appropriate prefix(es)
  • Changes are clearly explained in the PR description
  • New and existing tests pass successfully
  • Code adheres to project style and best practices
  • Documentation updated to reflect changes (if applicable)
  • Thorough testing completed, no regressions introduced

By submitting this PR, you confirm that you've read these guidelines and your changes align with the project's contribution standards.

@yapple yapple force-pushed the feature/zero-copy branch from c1c9404 to c976b9d Compare January 29, 2026 14:21
resp->request_id = request_id; /* be64 */
resp->status = htobe16(status);
resp->length = htobe32(length);
resp->addr_offset = htobe32(addr_offset);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

htobe64

"addr_offset: 0x%lx, length %d\n",
request_id, priskv_resp_status_str(status), status, addr_offset, value_length);
req_sync->status = status;
req_sync->value_length = value_length;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addr_offset is missing

case UCS_INPROGRESS: \
break; \
default: \
default:; \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unnecessary, could be removed

cp server/priskv-server output/
cp client/priskv-benchmark output/
cp client/priskv-client output/
cp cluster/client/priskv-cluster-benchmark output/ No newline at end of file
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let keep the extra newline as the last line of the file

PRISKV_COMMAND_ALLOC = 0x08, /* alloc memory region if support zero copy */
PRISKV_COMMAND_SEAL = 0x09, /* seal memory region*/
PRISKV_COMMAND_ACQUIRE = 0x0a, /* acquire memory region if support zero copy */
PRISKV_COMMAND_RELEASE = 0x0b, /* release memory region */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's refine the comment as "release memory region acquired for read" to eliminate confusion, since typically "release" could be also paired with "alloc"

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same for priskv_release_async

Signed-off-by: Haiyang Shi <haiyang.shi@bytedance.com>
@yapple yapple changed the title support zero copy [Feature] support zero copy Jan 30, 2026
Haiyang Shi and others added 3 commits January 30, 2026 13:53
- add dl to cflags

Signed-off-by: Haiyang Shi <haiyang.shi@bytedance.com>
@yapple yapple force-pushed the feature/zero-copy branch from c976b9d to 7fc999b Compare February 1, 2026 11:20
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 this pull request may close these issues.

2 participants