From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id E094A1D90 for ; Wed, 13 Dec 2017 10:15:24 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id f206so3545692wmf.5 for ; Wed, 13 Dec 2017 01:15:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=UVaABuECKserW/Tji0EZB1+BWuKP+90l0Yzt94c3UGM=; b=lVcGbLUYzWlwH+HCdtdz35XH166zFfqkI268XLVfJc4G9T3UKfX4coI3ztG9dvUXLg y4aS+l0zJpDd0JpvXIrRMIFgBWSktnb13EfQRScFWHwXjNVTSMSpwGYTaFFQsnTmRHwL p5YtvlJkuLAaI4dfwlND7o+SIjxyPunYxzFanz3AZHWU/UKaGhEMfHAiwsZ2+yLqDn+Z H8UprTAPbbCJJN5kdbktNRYWozmIes+iIjw5/S5WvqH8OudM/3xjIj3/uQ4ETLoNrpkd TRvP9s8ra3KxhKSNhPeObpPl23aq9G1WBUTzR93EMAVPwrIWCuwtNVBIjQqYvDjPV2OL RIRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=UVaABuECKserW/Tji0EZB1+BWuKP+90l0Yzt94c3UGM=; b=c0zTH7KFqN+xH0Bt1urgU+Yi1lI+a4sbX42RJ2klCU+i1XWPJ7qtJAwTNyWC2SHuVv Cxul9cs+Rg+Vi3Jy2S5NhFUbELBEvOJdC2EEbt/F7lojWxwDZdbj9Mu+XBbtzdA0ZERG RjOgdILuyXvzjVLLNhrZhXZXlEnOkgelpCmuwYlZGQi317KCZKpQlwrAXVPlQAJ2LRjN on2FOGKMPh8spwyWcE/2iEuSVtLeE3XPiSGr20ehZY0uBDHHcF8zCPwMQlD1YPMQ4CYI 2qgOO3xIMf+bR1DwycJdZLGkTCkvzCKt6WCBp1Jaq4AeMBR+T+zJB2dfOq4jRD2oadLe KbWQ== X-Gm-Message-State: AKGB3mKBZFNopeoqFlY6algYt8vbNjqSxkr6rY368OMiDRSIWJ88SA98 z9jNTFnCU2x+QbgHsCD1Hhgulw7Y X-Google-Smtp-Source: ACJfBoumjnI/kPfd7c24z2lqXTXaQGbY1vS8GZhRsLpZ+92TyF7WfW5dWSJDr/KiIu4eY4ieoS8SKA== X-Received: by 10.80.224.198 with SMTP id j6mr6797390edl.0.1513156524536; Wed, 13 Dec 2017 01:15:24 -0800 (PST) Received: from [192.168.10.165] (dynamic-adsl-78-12-251-125.clienti.tiscali.it. [78.12.251.125]) by smtp.googlemail.com with ESMTPSA id a16sm966337edd.19.2017.12.13.01.15.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Dec 2017 01:15:23 -0800 (PST) Sender: Paolo Bonzini To: Maxime Coquelin , dev@dpdk.org, yliu@fridaylinux.org, tiwei.bie@intel.com, jianfeng.tan@intel.com, lprosek@redhat.com, lersek@redhat.com References: <20171213085109.9891-1-maxime.coquelin@redhat.com> From: Paolo Bonzini Message-ID: Date: Wed, 13 Dec 2017 10:15:22 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20171213085109.9891-1-maxime.coquelin@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v5 0/4] Vhost: fix mq=on but VIRTIO_NET_F_MQ not negotiated X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 13 Dec 2017 09:15:25 -0000 On 13/12/2017 09:51, Maxime Coquelin wrote: > This series fixes this by destroying all but first queue pair in > the backend if VIRTIO_NET_F_MQ isn't negotiated. First patches > makes sure that VHOST_USER_SET_FEATURES request doesn't change > Virtio features while the device is running, which should never > happen as per the Virtio spec. This helps to make sure vitqueues > aren't destroyed while being processed, but also protect from > other illegal features changes (e.g. VIRTIO_NET_F_MRG_RXBUF). Hi Maxime, I think this series is wrong from the virtio spec's point of view. If the driver requests VIRTIO_NET_F_MQ, that does not mean "the driver knows about multiqueue", it only means that "the driver wants to read max_virtqueue_pairs" from configuration space. Just like it's perfectly fine for a device to propose VIRTIO_NET_F_MQ and set max_virtqueue_pairs=1, a driver can negotiate VIRTIO_NET_F_MQ and then skip initialization of some virtqueues. In fact, for virtio-net there is an explicit way to say how many virtqueue pairs are available; the virtio spec's section 5.1.5 (Network device, Device Initialization) mentions that Even with VIRTIO_NET_F_MQ, only receiveq1, transmitq1 and controlq are used by default. The driver would send the VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command specifying the number of the transmit and receive queues to use. Thanks, Paolo