Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp747312pxb; Wed, 25 Aug 2021 14:09:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQ90bRuBnllMrebxK6G0c4tlSn5QEfRHKtCyxEA4YjgJmonfHE0H28KH4w8ZVY7/V5zFHD X-Received: by 2002:a02:b88d:: with SMTP id p13mr386723jam.104.1629925754513; Wed, 25 Aug 2021 14:09:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629925754; cv=none; d=google.com; s=arc-20160816; b=UC6+oMZIIHLSnyF9Ddb3flAKsA2l/67+PmNsBWlbLW6Xt/vSfKSzfk5t126MqVUY8S UocI3AO2hnbdQTRzjyQuuMHPfI7Jkr/3iJzcOBKTYh/b5CXVZX6b/k1JmtNMvBcxb8Qv 9R6u7A4B6Y6dc5Z9hjMJ5rz+d/+JvfOTIYDElmbuI59y9+PJK0ElwFnncvuOPYPwE7yX 1M9hyb6qrWbDRozcjNw5JOe389zLDKBABnpW5UUQAmZw3JNyWX8kLMFZ6+RCFYSDt1sy lMFviN1N9HfJKdDJJezqJhaq/Mt0LzjZhL0wpvyb0gC/PiIolCgBKZdhOpoCldCCA2RT wV1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=7BdpJPLxYArrEdxYe++f+NxY9LUgjM31XxS12NOjYCU=; b=hQnR6SeP7u/eI7iAjjBZa4xL12PQmyQLCkzrRxr8QDd/ZIohOaT+bkcb3uhjKDlAkS fjIpHe1bBR9rusnC3UW8sT8Ya9IYiHdcmf78/n0t4M9JBMhxJuOcm2mQh+Df94018MIB 0jCdxiFRuVINk2EMtb9x2xE32qBjrBNie6HbqX/0VqxiVlkzkPjbzNuOlxn5lYgK6Z6P 7gGpb65YNNiWRhKubtde2hmJQSBjrj57mH3FTl5vQ3fyNigQ14snKCaqUj2Ge13yWbbT NK9sQ95OUe6hn409pIlgpZnD2GI3I+G49Wuv/VdeaPehEiVHNFjncogczTd7Hazi3hB+ aKmg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h6si700290jaj.19.2021.08.25.14.09.03; Wed, 25 Aug 2021 14:09:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241456AbhHYTDH (ORCPT + 99 others); Wed, 25 Aug 2021 15:03:07 -0400 Received: from mail-wr1-f47.google.com ([209.85.221.47]:35346 "EHLO mail-wr1-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235172AbhHYTDG (ORCPT ); Wed, 25 Aug 2021 15:03:06 -0400 Received: by mail-wr1-f47.google.com with SMTP id i6so831165wrv.2; Wed, 25 Aug 2021 12:02:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=7BdpJPLxYArrEdxYe++f+NxY9LUgjM31XxS12NOjYCU=; b=VFSFLWevtQ23xV7zUHTzTZE3nCKpLjIwelgivyjOkaV63myc9/Q+A1whyg/qYx8wjy RgiIy6EF6Wkm668xpiLs5gseAqYakygu+Qt1y8/zRBxTD8Q1fabxw1ZmPDZinsXU8ZWj tWfuwMgQt+BgUDop2m5R1YVCVHKaRZHjOLxFu4R1YvAtw0kSpxv1BPDwQJJ3oBl6ti14 MXcPZRJ8NHC3YGBMNXx6f0Oqnob5E5lb/IKfBwqn9HZiFxknKMC4wMouGCb4LxfhPFNx x3q+Q504nCLYjepZyLtYqgw8q4y5RwsfFnvyWgBEeJB76u5rYNUmROjixNsy7fIOukLw uZVA== X-Gm-Message-State: AOAM530LmN/KYaRsGFQsMvJjfpxzMGAZ5QC9zkj7KZrVgsIzc249Y9bV 0vpOkqRiHMKFwofCFdag46k= X-Received: by 2002:a5d:6349:: with SMTP id b9mr27089548wrw.341.1629918139985; Wed, 25 Aug 2021 12:02:19 -0700 (PDT) Received: from liuwe-devbox-debian-v2 ([51.145.34.42]) by smtp.gmail.com with ESMTPSA id b13sm643974wrf.86.2021.08.25.12.02.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Aug 2021 12:02:19 -0700 (PDT) Date: Wed, 25 Aug 2021 19:02:17 +0000 From: Wei Liu To: Michael Kelley Cc: vkuznets , "linux-hyperv@vger.kernel.org" , Andres Beltran , "Andrea Parri (Microsoft)" , Dexuan Cui , Wei Liu , Stephen Hemminger , Haiyang Zhang , KY Srinivasan , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] hv_utils: Set the maximum packet size for VSS driver to the length of the receive buffer Message-ID: <20210825190217.qh2c6yq5qr3ntum5@liuwe-devbox-debian-v2> References: <20210825133857.847866-1-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 25, 2021 at 06:33:10PM +0000, Michael Kelley wrote: > From: Vitaly Kuznetsov Sent: Wednesday, August 25, 2021 6:39 AM > > > > Commit adae1e931acd ("Drivers: hv: vmbus: Copy packets sent by Hyper-V out > > of the ring buffer") introduced a notion of maximum packet size and for > > KVM and FCOPY drivers set it to the length of the receive buffer. VSS > > driver wasn't updated, this means that the maximum packet size is now > > VMBUS_DEFAULT_MAX_PKT_SIZE (4k). Apparently, this is not enough. I'm > > observing a packet of 6304 bytes which is being truncated to 4096. When > > VSS driver tries to read next packet from ring buffer it starts from the > > wrong offset and receives garbage. > > > > Set the maximum packet size to 'HV_HYP_PAGE_SIZE * 2' in VSS driver. This > > matches the length of the receive buffer and is in line with other utils > > drivers. > > > > Fixes: adae1e931acd ("Drivers: hv: vmbus: Copy packets sent by Hyper-V out of the ring buffer") > > Signed-off-by: Vitaly Kuznetsov [...] > > Reviewed-by: Michael Kelley Given we're really close to the merge window I'm going to apply this to hyperv-next. Wei.