From patchwork Mon Sep 25 23:19:23 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: 9970707 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 D95E0602CB for ; Mon, 25 Sep 2017 23:23:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC39928BCA for ; Mon, 25 Sep 2017 23:23:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C0BD828BF1; Mon, 25 Sep 2017 23:23:45 +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 5282B28BCA for ; Mon, 25 Sep 2017 23:23:45 +0000 (UTC) Received: from localhost ([::1]:44726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwciy-0001V3-QZ for patchwork-qemu-devel@patchwork.kernel.org; Mon, 25 Sep 2017 19:23:40 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44102) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dwcfA-0007jY-Rq for qemu-devel@nongnu.org; Mon, 25 Sep 2017 19:19:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dwcfA-00022S-0N for qemu-devel@nongnu.org; Mon, 25 Sep 2017 19:19:44 -0400 Received: from mail-pg0-x242.google.com ([2607:f8b0:400e:c05::242]:37624) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dwcf9-00021X-RA for qemu-devel@nongnu.org; Mon, 25 Sep 2017 19:19:43 -0400 Received: by mail-pg0-x242.google.com with SMTP id v5so5671674pgn.4 for ; Mon, 25 Sep 2017 16:19:43 -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=u4G6YORL0RDKZLYWdEaFuYXgTqUYTfd3EcCjq9WhnR4=; b=sPeUCrYTfAOYMGo6xQlVtyHcP/UetW1Br0xcpqhOtZDmCFoMdIjaciDbg0EpuAVQ4c ElvC7UKriuylFEELWOXBEmFc1+096+9vm1HnCWkZbsY7DZ1nlfGXOW38LnllBUL8MWgd dREcss6qCP64OixTJrhU4/q/NFwKQkOT5ENMIGNOUQGY4TuVIdNOEiPb9IoQSQKBOfpS DTQnmra4hUcKmve3rGG0AfpO8Yt4+NCvOnmhTsJdcj78ZKY9V2Ssj2FEe4PY0wOhEJNy 10v/mG5xx93YbKkPM0Ev7BwFvFZFDKGaie+ruw2CrSREWz47k7m0wcjh2yx8P4cWgI9e cH7Q== 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=u4G6YORL0RDKZLYWdEaFuYXgTqUYTfd3EcCjq9WhnR4=; b=ZkuzGXpgSuSlouFyk1LI2JISUDlUgQYFb/TYnb1gzjC88utq7hXCKk25F+dtZfDNHv +dpHP6shL+xf0vR7p4uNrhVHoDo2uyLbaVAy6Kf9OfwTa8TSzg7hZayPo43xRLQJro76 g1mZeMYoTIx2nyudiBxaQ1lwsKSad83H//lgLHsos0PIjD7/qGiXY8evf/qfLK3i+7W0 84H7Xu4oLVw1Ot4my3LwoQJGG0Gd45AQxrLDX2kzUydhZU6NDL/DMii/+ugI3SsAOCIq ef14Csv3oUAPqoYURgNYQgzKk4mtR11eakKwg3ubtav8UkCvyoU5q8CwAsKamfn2OZvB d3Hw== X-Gm-Message-State: AHPjjUh77+YccfRf6AbIvAh7k9b9x+N1eDnIwDAOoII7kY2xpXVX4YfM rOmlbW25I/jgrPaXkHLtlaL4FA== X-Google-Smtp-Source: AOwi7QArMiYKcBZH3cFM/ioAxUuIjZXa6MOD0Z2po1uQZX25tAsLVmQTDZR7DCGsIKTZEiV1UmNfGg== X-Received: by 10.84.196.164 with SMTP id l33mr8992701pld.331.1506381582776; Mon, 25 Sep 2017 16:19:42 -0700 (PDT) Received: from 172-11-32-171.lightspeed.mmphtn.sbcglobal.net (50-207-95-178-static.hfc.comcastbusiness.net. [50.207.95.178]) by smtp.gmail.com with ESMTPSA id i87sm13604453pfi.184.2017.09.25.16.19.41 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 25 Sep 2017 16:19:41 -0700 (PDT) From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= To: qemu-devel@nongnu.org Date: Mon, 25 Sep 2017 16:19:23 -0700 Message-Id: <20170925231924.31303-6-carenas@gmail.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170925231924.31303-5-carenas@gmail.com> References: <20170925231924.31303-1-carenas@gmail.com> <20170925231924.31303-2-carenas@gmail.com> <20170925231924.31303-3-carenas@gmail.com> <20170925231924.31303-4-carenas@gmail.com> <20170925231924.31303-5-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::242 Subject: [Qemu-devel] [PATCH v2 5/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 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 Signed-off-by: Carlo Marcelo Arenas Belón --- linux-user/socket.h | 59 +++++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 48 insertions(+), 11 deletions(-) diff --git a/linux-user/socket.h b/linux-user/socket.h index dfa692286b..6f49255b5f 100644 --- a/linux-user/socket.h +++ b/linux-user/socket.h @@ -27,7 +27,7 @@ #define TARGET_SO_PRIORITY 12 #define TARGET_SO_LINGER 13 #define TARGET_SO_BSDCOMPAT 14 - /* To add :#define TARGET_SO_REUSEPORT 15 */ + #define TARGET_SO_REUSEPORT 15 #if defined(TARGET_PPC) #define TARGET_SO_RCVLOWAT 16 #define TARGET_SO_SNDLOWAT 17 @@ -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