From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8ED98A0561; Wed, 17 Mar 2021 21:04:49 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 432CA140F31; Wed, 17 Mar 2021 21:04:49 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id 0209F140F2B for ; Wed, 17 Mar 2021 21:04:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1616011487; 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=UK6PWHQE1KDbeCJM3v+AwxFX6Dd6utSL4N3GbRKEE58=; b=fylz3nQji0879OaPItChfvmNvsluxxqjgm7V0JQ9bbnpUiCD8T3cghdDZSmev8kj6WIwnF h4le2mEYkQafh4E2YiFmYoGCQHNU6DMZ79tjAEtV35ywqKh7JqjPla9H2ojqUDd7zrTgwf 4X+4L/+KrnvrugaOaj5UhVy33ZkN3ss= 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-575-nHXB3xJsMzuPP821o7708A-1; Wed, 17 Mar 2021 16:04:45 -0400 X-MC-Unique: nHXB3xJsMzuPP821o7708A-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E5360613B8; Wed, 17 Mar 2021 20:04:43 +0000 (UTC) Received: from [10.36.110.14] (unknown [10.36.110.14]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7CD425B69B; Wed, 17 Mar 2021 20:04:36 +0000 (UTC) To: David Marchand , dev@dpdk.org Cc: Chenbo Xia References: <20210201174602.30923-1-david.marchand@redhat.com> From: Maxime Coquelin Message-ID: <76079e53-2638-8cc2-aaaf-6c2c10f9592e@redhat.com> Date: Wed, 17 Mar 2021 21:04:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210201174602.30923-1-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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 21.05] net/virtio: remove duplicate port id from virtio_user X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On 2/1/21 6:46 PM, David Marchand wrote: > The private virtio_user_dev structure embeds a virtio_hw which itself > contains the ethdev port_id. > Make use of it and remove the duplicate port_id field. > > Signed-off-by: David Marchand > --- > Posting this cleanup that I caught when reviewing/discussing the port_id > fix from Maxime. > It can wait 21.05. > > --- > drivers/net/virtio/virtio_user/vhost_user.c | 3 ++- > drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 +++--- > drivers/net/virtio/virtio_user/virtio_user_dev.h | 1 - > drivers/net/virtio/virtio_user_ethdev.c | 1 - > 4 files changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/net/virtio/virtio_user/vhost_user.c > index ec2c53c8fb..18ae29eed2 100644 > --- a/drivers/net/virtio/virtio_user/vhost_user.c > +++ b/drivers/net/virtio/virtio_user/vhost_user.c > @@ -950,7 +950,8 @@ vhost_user_update_link_state(struct virtio_user_dev *dev) > r = recv(data->vhostfd, buf, 128, MSG_PEEK); > if (r == 0 || (r < 0 && errno != EAGAIN)) { > dev->net_status &= (~VIRTIO_NET_S_LINK_UP); > - PMD_DRV_LOG(ERR, "virtio-user port %u is down", dev->port_id); > + PMD_DRV_LOG(ERR, "virtio-user port %u is down", > + dev->hw.port_id); Trivial, but it can fit in a single line, as IIRC, we can go up to 100 chars now. If you agree, we can fix it while applying, no need to resubmit. Reviewed-by: Maxime Coquelin Thanks, Maxime