From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 4917BA0A02;
	Fri, 15 Jan 2021 12:10:54 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 2AC66140F27;
	Fri, 15 Jan 2021 12:10:54 +0100 (CET)
Received: from us-smtp-delivery-124.mimecast.com
 (us-smtp-delivery-124.mimecast.com [63.128.21.124])
 by mails.dpdk.org (Postfix) with ESMTP id 88182140F26
 for <dev@dpdk.org>; Fri, 15 Jan 2021 12:10:52 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com;
 s=mimecast20190719; t=1610709052;
 h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
 to:to:cc:cc:mime-version:mime-version:content-type:content-type:
 content-transfer-encoding:content-transfer-encoding:
 in-reply-to:in-reply-to:references:references;
 bh=n0AXDQNT/Zaf0MPuOpJGTHSl4DR6/GxDGq8vRT1imW4=;
 b=Rw8vOryHXkyWlazagKJkZL+rFeMxy1XhZAJullcyHEb4UUi2Sk+RYX3aSH7QqWBvE7AEcm
 P1kpaym+/oqp4YsTQAX4qNJpfPCrAI49BPXZgoxY6AS84Z7AswwnQJcM2s4IFmppPsMCNO
 RnlnD6jq7JBWFJGnhLWrOXwhVAg8UGc=
Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com
 [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id
 us-mta-266-rsOMZ_tiNd-GNcIwZH82FQ-1; Fri, 15 Jan 2021 06:10:50 -0500
X-MC-Unique: rsOMZ_tiNd-GNcIwZH82FQ-1
Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com
 [10.5.11.16])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0B9188015DB;
 Fri, 15 Jan 2021 11:10:49 +0000 (UTC)
Received: from [10.36.110.24] (unknown [10.36.110.24])
 by smtp.corp.redhat.com (Postfix) with ESMTPS id E43235C276;
 Fri, 15 Jan 2021 11:10:43 +0000 (UTC)
To: David Marchand <david.marchand@redhat.com>
Cc: dev <dev@dpdk.org>, "Xia, Chenbo" <chenbo.xia@intel.com>,
 Olivier Matz <olivier.matz@6wind.com>,
 Adrian Moreno Zapata <amorenoz@redhat.com>
References: <20201220211405.313012-1-maxime.coquelin@redhat.com>
 <20201220211405.313012-23-maxime.coquelin@redhat.com>
 <CAJFAV8yZko1Sx3t344=+GitDOTrd5ioiW5OWxu5p_dBq7+aNiQ@mail.gmail.com>
From: Maxime Coquelin <maxime.coquelin@redhat.com>
Message-ID: <46d20d61-d0fb-7faf-8924-582e42022ecc@redhat.com>
Date: Fri, 15 Jan 2021 12:10:42 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.6.0
MIME-Version: 1.0
In-Reply-To: <CAJFAV8yZko1Sx3t344=+GitDOTrd5ioiW5OWxu5p_dBq7+aNiQ@mail.gmail.com>
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16
Authentication-Results: relay.mimecast.com;
 auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com
X-Mimecast-Spam-Score: 0
X-Mimecast-Originator: redhat.com
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH 22/40] net/virtio: remove last PCI refs in
 non-PCI code
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
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 1/6/21 5:18 PM, David Marchand wrote:
> On Sun, Dec 20, 2020 at 10:15 PM Maxime Coquelin
> <maxime.coquelin@redhat.com> wrote:
>>
>> This patch finalizes the bus isolation part of this
>> refactoring.
>>
>> Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>
>> ---
> 
> [snip]
> 
>> diff --git a/drivers/net/virtio/virtqueue.h b/drivers/net/virtio/virtqueue.h
>> index 6c1df6f8e5..9274c48080 100644
>> --- a/drivers/net/virtio/virtqueue.h
>> +++ b/drivers/net/virtio/virtqueue.h
>> @@ -449,11 +449,11 @@ virtqueue_full(const struct virtqueue *vq)
>>  }
>>
>>  static inline int
>> -virtio_get_queue_type(struct virtio_hw *hw, uint16_t vtpci_queue_idx)
>> +virtio_get_queue_type(struct virtio_hw *hw, uint16_t vq_idx)
>>  {
>> -       if (vtpci_queue_idx == hw->max_queue_pairs * 2)
>> +       if (vq_idx == hw->max_queue_pairs * 2)
>>                 return VTNET_CQ;
>> -       else if (vtpci_queue_idx % 2 == 0)
>> +       else if (vq_idx % 2 == 0)
>>                 return VTNET_RQ;
>>         else
>>                 return VTNET_TQ;
>> --
>> 2.29.2
>>
> 
> I noticed:
> drivers/net/virtio/virtqueue.h: uint16_t  vq_queue_index;   /**< PCI
> queue index */
> 
> Worth cleaning while at it?

I removed the comment, it is self-explanatory.

Thanks,
Maxime

> Reviewed-by: David Marchand <david.marchand@redhat.com>
> 
> 
> 
> Same comment as Chenbo, this is a great cleanup so far.
> I'll look at the rest of the series probably tomorrow.
>