From patchwork Mon Jul 25 08:07:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arseniy Krasnov X-Patchwork-Id: 12927844 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A7EFC43334 for ; Mon, 25 Jul 2022 08:07:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233558AbiGYIHn (ORCPT ); Mon, 25 Jul 2022 04:07:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbiGYIHm (ORCPT ); Mon, 25 Jul 2022 04:07:42 -0400 Received: from mail.sberdevices.ru (mail.sberdevices.ru [45.89.227.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D21BC13CD2; Mon, 25 Jul 2022 01:07:40 -0700 (PDT) Received: from s-lin-edge02.sberdevices.ru (localhost [127.0.0.1]) by mail.sberdevices.ru (Postfix) with ESMTP id 3804D5FD0B; Mon, 25 Jul 2022 11:07:39 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sberdevices.ru; s=mail; t=1658736459; bh=sObFnqMOAqUFZ0if5Z6xdt9QYQocsNhmpGqLuSvEmg0=; h=From:To:Subject:Date:Message-ID:Content-Type:MIME-Version; b=ZSC+dgKzMe5KQOX2bHAFy9k1fbo6e4VPd+sP1+eVqADRou6+zZzNJ6VhcMGjrqS2O 5Lsv2cP1tdj3yS106hiwsdyYImOVdzfPQlmjW6ZSM8td35SZKUv+wcQIgedQndfDkY vl4bc3aR0gCvDJuY1aFzQ7zsfvZzgMsvVySHd9lJ/6SmbllceHWJJacRVciHcxhZpU k7ZT9Shga1rI+R9xGe2YS8xzye/k4uSxvMmX3DsePSp6NBQL6C3Z7wH4FxIKM5e2yS 5yYpSRDNj/GgrmiKD2jPp42rIHLNK9mHvxa3Yp16akDmFOyDuGuMzVdgRFgu9n/EtR W/l2T3ax8vweA== Received: from S-MS-EXCH02.sberdevices.ru (S-MS-EXCH02.sberdevices.ru [172.16.1.5]) by mail.sberdevices.ru (Postfix) with ESMTP; Mon, 25 Jul 2022 11:07:38 +0300 (MSK) From: Arseniy Krasnov To: Stefano Garzarella , "David S. Miller" , "edumazet@google.com" , "Jakub Kicinski" , Paolo Abeni , "kys@microsoft.com" , "haiyangz@microsoft.com" , "sthemmin@microsoft.com" , "wei.liu@kernel.org" , Dexuan Cui , Stefan Hajnoczi , Arseniy Krasnov , Krasnov Arseniy CC: "virtualization@lists.linux-foundation.org" , "linux-kernel@vger.kernel.org" , "linux-hyperv@vger.kernel.org" , "netdev@vger.kernel.org" , "kvm@vger.kernel.org" , kernel Subject: [RFC PATCH v2 6/9] hv_sock: disable SO_RCVLOWAT support Thread-Topic: [RFC PATCH v2 6/9] hv_sock: disable SO_RCVLOWAT support Thread-Index: AQHYn/2PdDRRTeWJ4EqSAxbUzqz6wg== Date: Mon, 25 Jul 2022 08:07:19 +0000 Message-ID: <6ee85279-df24-7de1-d62d-7a8249fc8fc3@sberdevices.ru> In-Reply-To: <19e25833-5f5c-f9b9-ac0f-1945ea17638d@sberdevices.ru> Accept-Language: en-US, ru-RU Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.1.12] Content-ID: <0E7C70C150A9C040BEFBAFD04BAAB181@sberdevices.ru> MIME-Version: 1.0 X-KSMG-Rule-ID: 4 X-KSMG-Message-Action: clean X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiPhishing: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 1.1.2.30, bases: 2022/07/25 03:52:00 #19956163 X-KSMG-AntiVirus-Status: Clean, skipped Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-State: RFC For Hyper-V it is quiet difficult to support this socket option,due to transport internals, so disable it. Signed-off-by: Arseniy Krasnov Reviewed-by: Dexuan Cui --- net/vmw_vsock/hyperv_transport.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/net/vmw_vsock/hyperv_transport.c b/net/vmw_vsock/hyperv_transport.c index e111e13b6660..5fab8f356a86 100644 --- a/net/vmw_vsock/hyperv_transport.c +++ b/net/vmw_vsock/hyperv_transport.c @@ -802,6 +802,12 @@ int hvs_notify_send_post_enqueue(struct vsock_sock *vsk, ssize_t written, return 0; } +static +int hvs_set_rcvlowat(struct vsock_sock *vsk, int val) +{ + return -EOPNOTSUPP; +} + static struct vsock_transport hvs_transport = { .module = THIS_MODULE, @@ -837,6 +843,7 @@ static struct vsock_transport hvs_transport = { .notify_send_pre_enqueue = hvs_notify_send_pre_enqueue, .notify_send_post_enqueue = hvs_notify_send_post_enqueue, + .set_rcvlowat = hvs_set_rcvlowat }; static bool hvs_check_transport(struct vsock_sock *vsk)