From patchwork Fri Sep 22 14:02:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Carlo_Marcelo_Arenas_Bel=C3=B3n?= X-Patchwork-Id: 9966247 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C108960381 for ; Fri, 22 Sep 2017 14:13:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1F86298DF for ; Fri, 22 Sep 2017 14:13:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B61D7298E9; Fri, 22 Sep 2017 14:13:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, UPPERCASE_50_75 autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 48F28298DF for ; Fri, 22 Sep 2017 14:13:26 +0000 (UTC) Received: from localhost ([::1]:59129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvOhp-0006GK-FR for patchwork-qemu-devel@patchwork.kernel.org; Fri, 22 Sep 2017 10:13:25 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dvOY1-0006xr-G5 for qemu-devel@nongnu.org; Fri, 22 Sep 2017 10:03:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dvOXv-0001Q4-SF for qemu-devel@nongnu.org; Fri, 22 Sep 2017 10:03:17 -0400 Received: from mail-pg0-x241.google.com ([2607:f8b0:400e:c05::241]:33963) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dvOXv-0001Ps-Lz for qemu-devel@nongnu.org; Fri, 22 Sep 2017 10:03:11 -0400 Received: by mail-pg0-x241.google.com with SMTP id u18so702425pgo.1 for ; Fri, 22 Sep 2017 07:03:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=dVdyMx2v5ej7QMB1IGgqrkyFX+AEaJpD34TrfGs89U4=; b=nqLHOCAkltthqbz8/WEPi3KCegFhISOJuDAmMfluc0IMviVXQcQi3oaDIVYCWX0ugg J5cSXAsSCBS5/5N8Kpa6mcIFLEqHdaXG3Y2zVzL83getx0dsuOMZwBrxNGOiT9TmZOdL h0YefHttPpc9lFi1RMg2dJf6bfhMT9EUgQ5uRaSXaLRqZqta89e5sSugLkkiIGfFgQg9 Vuok0RJ/xwgFpgDZ1rri3E34AX0lL1x8ekdLW3lUpV8YDQBB0Iz3th1rrGY+quddFOpj dIMLoRRMTaE0/vLphR/Rq2pQHUjJ8UyoSg43Z9O0E2ZltCKMPKMz89bnxCh7iymKecID o+pA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dVdyMx2v5ej7QMB1IGgqrkyFX+AEaJpD34TrfGs89U4=; b=VIhcOSk6aq5Skl46V18Id/+284DLZNlyz5h5htnFgs3Q+MeAs3vRB9TK+u22areReZ FG5u24Y7hzoMgsNqfkKQNjKr3KESZXV8U82Q4ERC1IDpkiGDT9N264TLUCPLVG8XOTFS 5G/is5v6gwxoQ669iYrCuEppxjLj2zloW/uywm/HbXDeky93v01+zaXglGeAGipiVnq8 dvG4KD98j6EbjIrmMuLbryAIzEMqhPg4hstDv6CbQInEB4/QBJWMejqBOQK0NTtEsHrF TwD3igR1CDZtiHAG6zVhA6/UFilV+JBPR7k0WcznTkI9iz2Fjvo7n3vfrnuxqfuanzXK QAnQ== X-Gm-Message-State: AHPjjUjgeCBypwK7GxD8lvmEc+UvrEPc2o42dsikWHQ+jxaK2kbxs5I8 hrSI58iJR/MkZtHbYodUkffKWt5l X-Google-Smtp-Source: AOwi7QC5F5LhoYBRjGASeql9US+osOEHLBxeLJaFifV+d175TeYlzhGwNaeZL1vm1cvsJg36XS06sg== X-Received: by 10.98.33.80 with SMTP id h77mr9571792pfh.18.1506088990196; Fri, 22 Sep 2017 07:03:10 -0700 (PDT) Received: from localhost.localdomain (c-73-189-82-67.hsd1.ca.comcast.net. [73.189.82.67]) by smtp.gmail.com with ESMTPSA id d124sm6428901pfc.42.2017.09.22.07.03.08 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 22 Sep 2017 07:03:09 -0700 (PDT) From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= To: qemu-devel@nongnu.org Date: Fri, 22 Sep 2017 07:02:37 -0700 Message-Id: <20170922140237.10869-7-carenas@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170922140237.10869-1-carenas@gmail.com> References: <20170922140237.10869-1-carenas@gmail.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::241 Subject: [Qemu-devel] [RFC 6/6] linux-user: update default socket.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= , riku.voipio@iki.fi, laurent@vivier.eu, rth@twiddle.net Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP * enable SO_REUSEPORT as a sideeffect and add SO_GET_FILTER alias * make sure 64bit version for ppc is also supported Signed-off-by: Carlo Marcelo Arenas Belón --- linux-user/socket.h | 61 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 12 deletions(-) diff --git a/linux-user/socket.h b/linux-user/socket.h index 6fd486c6b1..c37c10822a 100644 --- a/linux-user/socket.h +++ b/linux-user/socket.h @@ -27,8 +27,8 @@ #define TARGET_SO_PRIORITY 12 #define TARGET_SO_LINGER 13 #define TARGET_SO_BSDCOMPAT 14 - /* To add :#define TARGET_SO_REUSEPORT 15 */ -#if defined(TARGET_PPC) + #define TARGET_SO_REUSEPORT 15 +#if defined(TARGET_PPC) || defined(TARGET_PPC64) #define TARGET_SO_RCVLOWAT 16 #define TARGET_SO_SNDLOWAT 17 #define TARGET_SO_RCVTIMEO 18 @@ -49,21 +49,58 @@ #define TARGET_SO_SECURITY_ENCRYPTION_TRANSPORT 23 #define TARGET_SO_SECURITY_ENCRYPTION_NETWORK 24 - #define TARGET_SO_BINDTODEVICE 25 + #define TARGET_SO_BINDTODEVICE 25 /* Socket filtering */ - #define TARGET_SO_ATTACH_FILTER 26 - #define TARGET_SO_DETACH_FILTER 27 + #define TARGET_SO_ATTACH_FILTER 26 + #define TARGET_SO_DETACH_FILTER 27 + #define TARGET_SO_GET_FILTER TARGET_SO_ATTACH_FILTER - #define TARGET_SO_PEERNAME 28 - #define TARGET_SO_TIMESTAMP 29 - #define TARGET_SCM_TIMESTAMP TARGET_SO_TIMESTAMP + #define TARGET_SO_PEERNAME 28 + #define TARGET_SO_TIMESTAMP 29 + #define TARGET_SCM_TIMESTAMP TARGET_SO_TIMESTAMP - #define TARGET_SO_ACCEPTCONN 30 + #define TARGET_SO_ACCEPTCONN 30 - #define TARGET_SO_PEERSEC 31 + #define TARGET_SO_PEERSEC 31 + #define TARGET_SO_PASSSEC 34 + #define TARGET_SO_TIMESTAMPNS 35 + #define TARGET_SCM_TIMESTAMPNS TARGET_SO_TIMESTAMPNS + + #define TARGET_SO_MARK 36 + + #define TARGET_SO_TIMESTAMPING 37 + #define TARGET_SCM_TIMESTAMPING TARGET_SO_TIMESTAMPING + + #define TARGET_SO_PROTOCOL 38 + #define TARGET_SO_DOMAIN 39 + + #define TARGET_SO_RXQ_OVFL 40 + + #define TARGET_SO_WIFI_STATUS 41 + #define TARGET_SCM_WIFI_STATUS TARGET_SO_WIFI_STATUS + #define TARGET_SO_PEEK_OFF 42 + + #define TARGET_SO_NOFCS 43 + #define TARGET_SO_LOCK_FILTER 44 + #define TARGET_SO_SELECT_ERR_QUEUE 45 + #define TARGET_SO_BUSY_POLL 46 + #define TARGET_SO_MAX_PACING_RATE 47 + #define TARGET_SO_BPF_EXTENSIONS 48 + #define TARGET_SO_INCOMING_CPU 49 + #define TARGET_SO_ATTACH_BPF 50 + #define TARGET_SO_DETACH_BPF TARGET_SO_DETACH_FILTER + #define TARGET_SO_ATTACH_REUSEPORT_CBPF 51 + #define TARGET_SO_ATTACH_REUSEPORT_EBPF 52 + #define TARGET_SO_CNX_ADVICE 53 + #define TARGET_SCM_TIMESTAMPING_OPT_STATS 54 + #define TARGET_SO_MEMINFO 55 + #define TARGET_SO_INCOMING_NAPI_ID 56 + #define TARGET_SO_COOKIE 57 + #define TARGET_SCM_TIMESTAMPING_PKTINFO 58 + #define TARGET_SO_PEERGROUPS 59 + #define TARGET_SO_ZEROCOPY 60 - #define TARGET_SO_PASSSEC 34 #endif #ifndef ARCH_HAS_SOCKET_TYPES @@ -94,6 +131,6 @@ }; #define TARGET_SOCK_MAX (TARGET_SOCK_PACKET + 1) - #define TARGET_SOCK_TYPE_MASK 0xf /* Covers up to TARGET_SOCK_MAX-1. */ + #define TARGET_SOCK_TYPE_MASK 0xf /* Covers up to TARGET_SOCK_MAX - 1. */ #endif