qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
To: qemu-devel@nongnu.org
Cc: aurelien@aurel32.net, arikalo@wavecomp.com,
	amarkovic@wavecomp.com, smarkovic@wavecomp.com,
	pjovanovic@wavecomp.com, riku.voipio@iki.fi, laurent@vivier.eu,
	ysu@wavecomp.com
Subject: [Qemu-devel] [PATCH v2 3/3] linux-user: Add support for SO_REUSEPORT
Date: Tue, 23 Oct 2018 15:07:36 +0200	[thread overview]
Message-ID: <1540300056-7935-4-git-send-email-aleksandar.markovic@rt-rk.com> (raw)
In-Reply-To: <1540300056-7935-1-git-send-email-aleksandar.markovic@rt-rk.com>

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

  parent reply	other threads:[~2018-10-23 13:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-23 13:07 [Qemu-devel] [PATCH v2 0/3] linux-user: Support for misc features Aleksandar Markovic
2018-10-23 13:07 ` [Qemu-devel] [PATCH v2 1/3] linux-user: Add support for statx() syscall Aleksandar Markovic
2018-10-23 20:48   ` Laurent Vivier
2018-10-23 13:07 ` [Qemu-devel] [PATCH v2 2/3] linux-user: Add support for semtimedop() syscall Aleksandar Markovic
2018-10-23 18:04   ` Laurent Vivier
2018-10-23 13:07 ` Aleksandar Markovic [this message]
2018-10-23 17:49   ` [Qemu-devel] [PATCH v2 3/3] linux-user: Add support for SO_REUSEPORT Laurent Vivier
2018-11-12 15:29     ` Aleksandar Markovic
2018-11-12 15:39       ` Laurent Vivier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1540300056-7935-4-git-send-email-aleksandar.markovic@rt-rk.com \
    --to=aleksandar.markovic@rt-rk.com \
    --cc=amarkovic@wavecomp.com \
    --cc=arikalo@wavecomp.com \
    --cc=aurelien@aurel32.net \
    --cc=laurent@vivier.eu \
    --cc=pjovanovic@wavecomp.com \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    --cc=smarkovic@wavecomp.com \
    --cc=ysu@wavecomp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).