From patchwork Sun Jun 29 12:14:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Riku Voipio X-Patchwork-Id: 32667 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 37AFC23577 for ; Sun, 29 Jun 2014 12:18:01 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id n16sf44600783oag.10 for ; Sun, 29 Jun 2014 05:18:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:date :message-id:in-reply-to:references:cc:subject:precedence:list-id :list-unsubscribe:list-archive:list-post:list-help:list-subscribe :errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=I3N2kLVMFFyLc6L6W5svAF6DAqOqbUHiv11CGQq9YtU=; b=P2G+UxF0r1LfjBeVUpWUD5xh9wAEo9CJDBejJpx42zEZxzRzNW/dNBFem10OhgbJzJ rw7qWJi8b8pwnyh41qzeyfz4hjPZVWDJce4oQIpMQy4BXIyyL0ra62obaVj4n70E93oQ 2Mj97McK8AaBQ6bUFtY2gCVdgFTePKh5wCWRFKtGlgsNXSMhGARVc1Btb+Es9RJdhOFc AjaPcOfQNiQ17FT7Rlm8xS3MPMCPUGqDwFRu64UrCU4DNnCxvHUydtzav3EYWBnii+/v ahqFMj+JS7B6G8vb9KiUu+RoA9C9PnkkTabfbrImHbgTb8TQ8bSAbQxF7hl8s/JwBm13 JpsA== X-Gm-Message-State: ALoCoQkThH2a9bdvZg+LiBGMpR0u7nT7rm+a7bZk/j0giIHCvJQc26vZ5kAIBpsuXf67I1g11y0M X-Received: by 10.43.173.71 with SMTP id ob7mr16670544icc.19.1404044281591; Sun, 29 Jun 2014 05:18:01 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.70 with SMTP id q64ls1183582qgd.50.gmail; Sun, 29 Jun 2014 05:18:01 -0700 (PDT) X-Received: by 10.58.12.73 with SMTP id w9mr32773182veb.13.1404044281497; Sun, 29 Jun 2014 05:18:01 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id w15si8834498vcq.9.2014.06.29.05.18.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 29 Jun 2014 05:18:01 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) client-ip=209.85.220.173; Received: by mail-vc0-f173.google.com with SMTP id lf12so6471469vcb.4 for ; Sun, 29 Jun 2014 05:18:01 -0700 (PDT) X-Received: by 10.220.250.203 with SMTP id mp11mr31981227vcb.2.1404044281348; Sun, 29 Jun 2014 05:18:01 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp72436vcb; Sun, 29 Jun 2014 05:18:01 -0700 (PDT) X-Received: by 10.140.24.76 with SMTP id 70mr4424078qgq.30.1404044280739; Sun, 29 Jun 2014 05:18:00 -0700 (PDT) Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id u3si20978839qar.47.2014.06.29.05.18.00 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 29 Jun 2014 05:18:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Received: from localhost ([::1]:57511 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1E3U-0000LR-7u for patch@linaro.org; Sun, 29 Jun 2014 08:18:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47619) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1E0g-00048j-2O for qemu-devel@nongnu.org; Sun, 29 Jun 2014 08:15:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1E0X-0000bo-Ne for qemu-devel@nongnu.org; Sun, 29 Jun 2014 08:15:05 -0400 Received: from [2001:4b98:dc0:45:216:3eff:fe3d:166f] (port=41885 helo=afflict.kos.to) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1E0X-0000ay-Eq for qemu-devel@nongnu.org; Sun, 29 Jun 2014 08:14:57 -0400 Received: from afflict.kos.to (afflict [92.243.29.197]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by afflict.kos.to (Postfix) with ESMTPSA id B634B26552; Sun, 29 Jun 2014 14:14:55 +0200 (CEST) From: riku.voipio@linaro.org To: qemu-devel@nongnu.org Date: Sun, 29 Jun 2014 15:14:45 +0300 Message-Id: X-Mailer: git-send-email 1.7.10.4 In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 2001:4b98:dc0:45:216:3eff:fe3d:166f Cc: Peter Maydell , Anthony Liguori , Paul Burton Subject: [Qemu-devel] [PULL v2 05/13] linux-user: support SO_{SND, RCV}BUFFORCE setsockopt options X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: riku.voipio@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.173 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Paul Burton Translate the SO_SNDBUFFORCE & SO_RCVBUFFORCE options to setsockopt to the host values & perform the syscall as expected, allowing use of those options by target programs. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- linux-user/syscall.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index b1e57df..bdc60fe 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1502,9 +1502,15 @@ set_timeout: case TARGET_SO_SNDBUF: optname = SO_SNDBUF; break; + case TARGET_SO_SNDBUFFORCE: + optname = SO_SNDBUFFORCE; + break; case TARGET_SO_RCVBUF: optname = SO_RCVBUF; break; + case TARGET_SO_RCVBUFFORCE: + optname = SO_RCVBUFFORCE; + break; case TARGET_SO_KEEPALIVE: optname = SO_KEEPALIVE; break;