From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Coquelin Subject: Re: [PATCH] net/virtio-user: fix dev_init in legacy-mem mode Date: Thu, 17 May 2018 10:03:23 +0200 Message-ID: <77d27fbb-710a-3b4b-43e7-30776529c83e@redhat.com> References: <20180517073525.103984-1-xiao.w.wang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, tiwei.bie@intel.com, lei.a.yao@intel.com To: Xiao Wang 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) In-Reply-To: <20180517073525.103984-1-xiao.w.wang@intel.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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