13 Star 2 Fork 18

src-openEuler/dpu-utilities

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0005-resolve-migration-issues.patch 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
From e0ab70d68bcda40cd5cfd504f4da4d1d093d1996 Mon Sep 17 00:00:00 2001
From: l30022887 <[email protected]>
Date: Mon, 21 Oct 2024 19:51:38 +0800
Subject: [PATCH] resolve-migration-issues
---
qtfs/config/rexec/whitelist | 2 +-
qtfs/ipc/uds_main.c | 7 ++++++-
qtfs/rexec/rexec_sock.c | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/qtfs/config/rexec/whitelist b/qtfs/config/rexec/whitelist
index b7f34b5..6a959d6 100644
--- a/qtfs/config/rexec/whitelist
+++ b/qtfs/config/rexec/whitelist
@@ -1 +1 @@
-/usr/bin/qemu-kvm
+/usr/bin/qemu-kvm
diff --git a/qtfs/ipc/uds_main.c b/qtfs/ipc/uds_main.c
index 65468b8..4bc01a9 100644
--- a/qtfs/ipc/uds_main.c
+++ b/qtfs/ipc/uds_main.c
@@ -255,6 +255,8 @@ int uds_set_nonblock(int fd)
int uds_build_tcp_connection(struct uds_conn_arg *arg)
{
int family = AF_VSOCK;
+ int retry = 3;
+ int ret = 0;
if (arg->cs > UDS_SOCKET_SERVER) {
uds_err("cs type %d is error.", arg->cs);
return -1;
@@ -305,7 +307,10 @@ int uds_build_tcp_connection(struct uds_conn_arg *arg)
sock_addr.svm_port = p_uds_var->vsock.peerport;
sock_addr.svm_cid = p_uds_var->vsock.peercid;
#endif
- if (connect(arg->sockfd, (struct sockaddr *)&sock_addr, sizeof(sock_addr)) < 0) {
+ do {
+ ret = connect(arg->sockfd, (struct sockaddr *)&sock_addr, sizeof(sock_addr));
+ } while ((ret != 0) && (retry--));
+ if (ret < 0) {
goto close_and_return;
}
arg->connfd = sock_fd;
diff --git a/qtfs/rexec/rexec_sock.c b/qtfs/rexec/rexec_sock.c
index e8750c5..f7495e5 100644
--- a/qtfs/rexec/rexec_sock.c
+++ b/qtfs/rexec/rexec_sock.c
@@ -37,7 +37,7 @@
int rexec_build_unix_connection(struct rexec_conn_arg *arg)
{
- const int sock_max_conn = 5;
+ const int sock_max_conn = 32;
if (arg->cs > REXEC_SOCK_SERVER) {
rexec_err("cs type %d is error.", arg->cs);
return -1;
--
2.20.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/dpu-utilities.git
[email protected]:src-openeuler/dpu-utilities.git
src-openeuler
dpu-utilities
dpu-utilities
master

搜索帮助