From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) by dpdk.org (Postfix) with ESMTP id DBDC6C35E for ; Fri, 10 Jul 2015 16:13:00 +0200 (CEST) Received: by wicmz13 with SMTP id mz13so14867408wic.0 for ; Fri, 10 Jul 2015 07:13:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=khqdgWkQjhkjPG0O2ppL3HD8XenX53UTgLhsUVxQ1fk=; b=Cl+wPb0rqyFx0EN1lZiqbt9uXLk4qEfmTrh75s5+voZfC7qBU3Gb+9SxsAVQvxVKZC /B82Wjg8FfefhisuATaz6oA/ZwaHeawJ04pQObZVsOU1bcadtZXn820NR0WlV5Spq+qH pXBQAQYQtFiozpnnE8k6clY9n/i9wIZRith9qjVw1IeeqNExi4z40rCM6vVhO+7j5UrH s4h6iOodwRVfs+wYLDrl1goUowzP6FTJBWvmqQ8alE2nwJFOo3b+ahpbmJMusEofNW7b iM9J2+qLzDH2Tr8XLw+HI2oP1hxavaO6FujTCCCjAfRCgYRBaMDQjgvDDuWa231m4nCw 22Jw== X-Gm-Message-State: ALoCoQki/pnRP8UlVnHH9P7aSNBuF7z9nwuMR0yOT6aqrk0htb1eDW21cElgFb48H3PXmupfVC61 X-Received: by 10.180.78.73 with SMTP id z9mr6570428wiw.64.1436537580728; Fri, 10 Jul 2015 07:13:00 -0700 (PDT) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id k2sm3155447wif.4.2015.07.10.07.12.59 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Jul 2015 07:12:59 -0700 (PDT) From: Thomas Monjalon To: "Xie, Huawei" Date: Fri, 10 Jul 2015 16:11:52 +0200 Message-ID: <2044421.GMCq5WsXf6@xps13> Organization: 6WIND User-Agent: KMail/4.14.8 (Linux/4.0.4-2-ARCH; KDE/4.14.8; x86_64; ; ) In-Reply-To: References: <1435736930-26737-1-git-send-email-changchun.ouyang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] virtio: fix the vq size issue X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Jul 2015 14:13:01 -0000 2015-07-10 14:05, Xie, Huawei: > Thomas: > Could we roll back that commit or apply Changchun's patch? It is waiting an agreement with Changchun, symbolized by an Acked-by: > On 7/1/2015 11:53 PM, Xie, Huawei wrote: > > On 7/1/2015 3:49 PM, Ouyang Changchun wrote: > >> This commit breaks virtio basic packets rx functionality: > >> d78deadae4dca240e85054bf2d604a801676becc > >> > >> The QEMU use 256 as default vring size, also use this default value to calculate the virtio > >> avail ring base address and used ring base address, and vhost in the backend use the ring base > >> address to do packet IO. > >> > >> Virtio spec also says the queue size in PCI configuration is read-only, so virtio front end > >> can't change it. just need use the read-only value to allocate space for vring and calculate the > >> avail and used ring base address. Otherwise, the avail and used ring base address will be different > >> between host and guest, accordingly, packet IO can't work normally. > > virtio driver could still use the vq_size to initialize avail ring and > > use ring so that they still have the same base address. > > The other issue is vhost use index & (vq->size -1) to index the ring. > > > > > > Thomas: > > This fix works but introduces slight change with original code. Could we > > just rollback that commit? > > > > d78deadae4dca240e85054bf2d604a801676becc > > > > > >> Signed-off-by: Changchun Ouyang > >> --- > >> drivers/net/virtio/virtio_ethdev.c | 14 +++----------- > >> 1 file changed, 3 insertions(+), 11 deletions(-)