From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 36528A3160
	for <public@inbox.dpdk.org>; Wed,  9 Oct 2019 11:00:41 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id BB6F41D421;
	Wed,  9 Oct 2019 11:00:40 +0200 (CEST)
Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com
 [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 4D5581D16F;
 Wed,  9 Oct 2019 11:00:39 +0200 (CEST)
X-Virus-Scanned: Proofpoint Essentials engine
Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits))
 (No client certificate requested)
 by mx1-us1.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 1558614006F;
 Wed,  9 Oct 2019 09:00:38 +0000 (UTC)
Received: from [192.168.38.17] (91.220.146.112) by ukex01.SolarFlarecom.com
 (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 9 Oct 2019
 10:00:32 +0100
To: Tiwei Bie <tiwei.bie@intel.com>
CC: Maxime Coquelin <maxime.coquelin@redhat.com>, Zhihong Wang
 <zhihong.wang@intel.com>, <dev@dpdk.org>, Dilshod Urazov
 <Dilshod.Urazov@oktetlabs.ru>, <stable@dpdk.org>
References: <1569944672-24754-1-git-send-email-arybchenko@solarflare.com>
 <1569944672-24754-3-git-send-email-arybchenko@solarflare.com>
 <20191008054650.GA22478@___>
 <c9e81a56-337e-7116-fc8c-de00635b6181@solarflare.com>
 <20191009084341.GA32515@___>
From: Andrew Rybchenko <arybchenko@solarflare.com>
Message-ID: <43e11493-65d6-fdf2-8086-106ed7b4eb25@solarflare.com>
Date: Wed, 9 Oct 2019 12:00:28 +0300
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101
 Thunderbird/60.9.0
MIME-Version: 1.0
In-Reply-To: <20191009084341.GA32515@___>
Content-Type: text/plain; charset="utf-8"; format=flowed
Content-Transfer-Encoding: 7bit
Content-Language: en-GB
X-Originating-IP: [91.220.146.112]
X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To
 ukex01.SolarFlarecom.com (10.17.10.4)
X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1010-24964.003
X-TM-AS-Result: No-11.898000-8.000000-10
X-TMASE-MatchedRID: UuaOI1zLN1j4ECMHJTM/ufZvT2zYoYOwC/ExpXrHizwdQW9W2F3v/bBZ
 szSz1qei7UXWmJKyEwfENlHLFvCEt6ZY4PxfRMWEExdS7WFvZWtDDkW9i7BcEhnAauHjLiLM7+h
 Y9l7Y+Oza2aiqIZS9olO9V994jC9DIeFIFB+CV+wD2WXLXdz+AadT43GpXcMNGDt/hPCfr1ZPH2
 OEh/+ebJ/7pv2u04as91FGhk3lKQBvAVPVxkfEIQuLP4ROdWHV+IfriO3cV8Swe5+81QHzJg/DZ
 +ACFMnINjxzMZPhEOjpmt/6Dfr+d6bdTo8qVIfT9VjtTc1fwmD5bNUY+JJjyNiJ0KAnk6dz+4k0
 LpTxyp95+oMo1BsjKCXcOa9M8BCbTX7PJ/OU3vKDGx/OQ1GV8rHlqZYrZqdI+gtHj7OwNO3Ix3I
 cp6zuW2pfC9HSo7ZpurhG2IO4pBiEYth5ZvsAFY9cI9LEJEmM
X-TM-AS-User-Approved-Sender: Yes
X-TM-AS-User-Blocked-Sender: No
X-TMASE-Result: 10--11.898000-8.000000
X-TMASE-Version: SMEX-12.5.0.1300-8.5.1010-24964.003
X-MDID: 1570611638-cXqoiTXRNK1P
Subject: Re: [dpdk-dev] [PATCH 3/3] net/virtio: reject unsupported Rx multi
	queue modes
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>

On 10/9/19 11:43 AM, Tiwei Bie wrote:
> On Wed, Oct 09, 2019 at 11:04:38AM +0300, Andrew Rybchenko wrote:
>> On 10/8/19 8:46 AM, Tiwei Bie wrote:
>>> On Tue, Oct 01, 2019 at 04:44:31PM +0100, Andrew Rybchenko wrote:
>>>> From: Dilshod Urazov <Dilshod.Urazov@oktetlabs.ru>
>>>>
>>>> This driver supports none of DCB, RSS or VMDQ modes,
>>>> therefore must check and return error if configured incorrectly.
>>>>
>>>> Fixes: c1f86306a026 ("virtio: add new driver")
>>>> Cc: stable@dpdk.org
>>>>
>>>> Signed-off-by: Dilshod Urazov <Dilshod.Urazov@oktetlabs.ru>
>>>> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
>>>> ---
>>>>    drivers/net/virtio/virtio_ethdev.c | 7 +++++++
>>>>    1 file changed, 7 insertions(+)
>>>>
>>>> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
>>>> index 7261109dd..0af4fc392 100644
>>>> --- a/drivers/net/virtio/virtio_ethdev.c
>>>> +++ b/drivers/net/virtio/virtio_ethdev.c
>>>> @@ -2071,6 +2071,13 @@ virtio_dev_configure(struct rte_eth_dev *dev)
>>>>    	PMD_INIT_LOG(DEBUG, "configure");
>>>>    	req_features = VIRTIO_PMD_DEFAULT_GUEST_FEATURES;
>>>> +	if (rxmode->mq_mode != ETH_MQ_RX_NONE) {
>>>> +		PMD_DRV_LOG(ERR,
>>>> +			"Unsupported Rx multi queue mode %d",
>>>> +			rxmode->mq_mode);
>>>> +		return -EINVAL;
>>>> +	}
>>> We need similar checks for Tx as well.
>> OK, I'll add.
>>
>> However, I'm not 100% sure about RSS. Yes, I know that virtio has
>> no RSS configuration support, but it looks possible to have multi queue
>> in vhost-net case.
> Yeah, it's possible to have MQ in virtio.
> The RSS support in virtio is still WIP.
> https://github.com/oasis-tcs/virtio-spec/issues/48

Thanks for the link. So, may be ETH_MQ_RX_RSS should be accepted
as well, but attempts to configure RSS rejected?
Yes, it is a bit strange to accept RSS with empty rss_hf etc, but
at least it is exactly what net/virtio can do.

And one more thought...
It looks like if more than one Rx queue is configured, mq_mode must
be ETH_MQ_RX_RSS and must not be ETH_MQ_RX_NONE.