From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by dpdk.org (Postfix) with ESMTP id 439264C8C for ; Thu, 17 May 2018 10:03:27 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CBF4882DD0B2; Thu, 17 May 2018 08:03:26 +0000 (UTC) Received: from [10.36.112.66] (ovpn-112-66.ams2.redhat.com [10.36.112.66]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C010A2166BAD; Thu, 17 May 2018 08:03:25 +0000 (UTC) To: Xiao Wang Cc: dev@dpdk.org, tiwei.bie@intel.com, lei.a.yao@intel.com References: <20180517073525.103984-1-xiao.w.wang@intel.com> From: Maxime Coquelin Message-ID: <77d27fbb-710a-3b4b-43e7-30776529c83e@redhat.com> Date: Thu, 17 May 2018 10:03:23 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180517073525.103984-1-xiao.w.wang@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 17 May 2018 08:03:26 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Thu, 17 May 2018 08:03:26 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'maxime.coquelin@redhat.com' RCPT:'' Subject: Re: [dpdk-dev] [PATCH] net/virtio-user: fix dev_init in legacy-mem mode 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: Thu, 17 May 2018 08:03:27 -0000 Hi Xiao, Next time, could you please devtools/check-git-log.sh script before posting. I tihnk the commit title should be changed to: net/virtio-user: fix device init in legacy-mem mode On 05/17/2018 09:35 AM, Xiao Wang wrote: > In legacy-mem mode, memory event callback registering is not supported, > we should not return error in dev_init on this case. > > Fixes: 12ecb2f63b12 ("net/virtio-user: support memory hotplug") > > Signed-off-by: Xiao Wang > Suggested-by: Tiwei Bie I think the suggested-by line should go above the signed-off one, as it was suggested before being implemented. > --- > drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c > index 992a68757..bd16fbb60 100644 > --- a/drivers/net/virtio/virtio_user/virtio_user_dev.c > +++ b/drivers/net/virtio/virtio_user/virtio_user_dev.c > @@ -445,8 +445,11 @@ virtio_user_dev_init(struct virtio_user_dev *dev, char *path, int queues, > > if (rte_mem_event_callback_register(VIRTIO_USER_MEM_EVENT_CLB_NAME, > virtio_user_mem_event_cb, dev)) { > - PMD_INIT_LOG(ERR, "Failed to register mem event callback\n"); > - return -1; > + if (rte_errno != ENOTSUP) { > + PMD_INIT_LOG(ERR, "Failed to register mem event" > + " callback\n"); > + return -1; > + } > } > > return 0; > Apart above minor comments, the patch looks good to me: Reviewed-by: Maxime Coquelin I'll handle the changes when applying. Thanks, Maxime