29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
From f62692f99e2d10803a667202694b5e38fa335edb Mon Sep 17 00:00:00 2001
|
|
From: hankangkang <hankangkang5@huawei.com>
|
|
Date: Thu, 31 Oct 2024 10:37:06 +0800
|
|
Subject: [PATCH] add SO_NUMA_ID(optname) for adapting opneGauss
|
|
|
|
---
|
|
src/lstack/api/lstack_wrap.c | 4 ++++
|
|
1 file changed, 4 insertions(+)
|
|
|
|
diff --git a/src/lstack/api/lstack_wrap.c b/src/lstack/api/lstack_wrap.c
|
|
index 8f80f98..e0e8244 100644
|
|
--- a/src/lstack/api/lstack_wrap.c
|
|
+++ b/src/lstack/api/lstack_wrap.c
|
|
@@ -381,7 +381,11 @@ static bool unsupport_optname(int32_t level, int32_t optname)
|
|
|
|
static inline int32_t do_getsockopt(int32_t s, int32_t level, int32_t optname, void *optval, socklen_t *optlen)
|
|
{
|
|
+#define SO_NUMA_ID 0x100c
|
|
if (select_sock_posix_path(lwip_get_socket(s)) == POSIX_LWIP && !unsupport_optname(level, optname)) {
|
|
+ if (level == IPPROTO_IP && optname == SO_NUMA_ID) {
|
|
+ return lwip_get_socket(s)->stack->socket_id;
|
|
+ }
|
|
return g_wrap_api->getsockopt_fn(s, level, optname, optval, optlen);
|
|
}
|
|
|
|
--
|
|
2.33.0
|
|
|