From: Yunqiang Su <ysu@wavecomp.com>
Add support for SO_REUSEPORT, including strace support. SO_REUSEPORT
was introduced relatively recently, since Linux 3.9, so use
'#if defined SO_REUSEPORT'.
Signed-off-by: Yunqiang Su <ysu@wavecomp.com>
Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com>
---
linux-user/strace.c | 3 +++
linux-user/syscall.c | 10 ++++++++++
2 files changed, 13 insertions(+)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 33f4a50..d1d1494 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -1742,6 +1742,9 @@ print_optint:
case TARGET_SO_REUSEADDR:
gemu_log("SO_REUSEADDR,");
goto print_optint;
+ case TARGET_SO_REUSEPORT:
+ gemu_log("SO_REUSEPORT,");
+ goto print_optint;
case TARGET_SO_TYPE:
gemu_log("SO_TYPE,");
goto print_optint;
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e722ba8..fac4a06 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -2057,6 +2057,11 @@ set_timeout:
case TARGET_SO_REUSEADDR:
optname = SO_REUSEADDR;
break;
+#ifdef SO_REUSEPORT
+ case TARGET_SO_REUSEPORT:
+ optname = SO_REUSEPORT;
+ break;
+#endif
case TARGET_SO_TYPE:
optname = SO_TYPE;
break;
@@ -2218,6 +2223,11 @@ static abi_long do_getsockopt(int sockfd, int level, int optname,
case TARGET_SO_REUSEADDR:
optname = SO_REUSEADDR;
goto int_case;
+#ifdef SO_REUSEPORT
+ case TARGET_SO_REUSEPORT:
+ optname = SO_REUSEPORT;
+ goto int_case;
+#endif
case TARGET_SO_TYPE:
optname = SO_TYPE;
goto int_case;
--
2.7.4
On 23/10/2018 14:07, Aleksandar Markovic wrote: > From: Yunqiang Su <ysu@wavecomp.com> > > Add support for SO_REUSEPORT, including strace support. SO_REUSEPORT > was introduced relatively recently, since Linux 3.9, so use > '#if defined SO_REUSEPORT'. > > Signed-off-by: Yunqiang Su <ysu@wavecomp.com> > Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> > --- > linux-user/strace.c | 3 +++ > linux-user/syscall.c | 10 ++++++++++ > 2 files changed, 13 insertions(+) Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Hi, Laurent. Is there any chance that from this series this patch only makes into 3.1? One can argue that this is a bug fix, but it is your call. Thanks, Aleksandar ________________________________________ From: Laurent Vivier <laurent@vivier.eu> Sent: Tuesday, October 23, 2018 7:49:38 PM To: Aleksandar Markovic; qemu-devel@nongnu.org Cc: aurelien@aurel32.net; Aleksandar Rikalo; Aleksandar Markovic; Stefan Markovic; Petar Jovanovic; riku.voipio@iki.fi; Yunqiang Su Subject: Re: [PATCH v2 3/3] linux-user: Add support for SO_REUSEPORT On 23/10/2018 14:07, Aleksandar Markovic wrote: > From: Yunqiang Su <ysu@wavecomp.com> > > Add support for SO_REUSEPORT, including strace support. SO_REUSEPORT > was introduced relatively recently, since Linux 3.9, so use > '#if defined SO_REUSEPORT'. > > Signed-off-by: Yunqiang Su <ysu@wavecomp.com> > Signed-off-by: Aleksandar Markovic <amarkovic@wavecomp.com> > --- > linux-user/strace.c | 3 +++ > linux-user/syscall.c | 10 ++++++++++ > 2 files changed, 13 insertions(+) Reviewed-by: Laurent Vivier <laurent@vivier.eu>
On 12/11/2018 16:29, Aleksandar Markovic wrote: > Hi, Laurent. Is there any chance that from this series this patch only makes into 3.1? One can argue that this is a bug fix, but it is your call. Hi Aleksandar, yes, I'm adding this patch to my next pull-request (for today or tomorrow). Thanks, Laurent
© 2016 - 2025 Red Hat, Inc.