Skip to content

Conversation

@727Hsj
Copy link

@727Hsj 727Hsj commented Jan 13, 2026

背景
经测试,host与starry建立vsock连接,host告诉starry最大alloc_buf是256KB。若starry持续发送数据给host,看virtio-driver源码,send前先进行check_peer_buffer_is_sufficient条件判断,如果条件判断不满足则发起CreditRequest事件请求并返回Err(SocketError::InsufficientBufferSpaceInPeer.into())。

问题:

  1. 持续发送数据超过256KB,由于返回特殊Err(SocketError::InsufficientBufferSpaceInPeer ----> DevError::Again)但没有错误处理,导致发送中途panic

解决:

  1. 当send失败且有DevError::Again错误,send进入waitqueue等待notify
  2. 添加axnet中添加对creditupdate事件的处理,唤醒waitqueue中的任务

相关pr:
axdriver_crates

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