* [dpdk-dev] [PATCH] net/virtio-user: fix dev_init in legacy-mem mode @ 2018-05-17 7:35 Xiao Wang 2018-05-17 8:03 ` Maxime Coquelin 2018-05-17 8:28 ` Maxime Coquelin 0 siblings, 2 replies; 4+ messages in thread From: Xiao Wang @ 2018-05-17 7:35 UTC (permalink / raw) To: maxime.coquelin; +Cc: dev, tiwei.bie, lei.a.yao, Xiao Wang 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 <xiao.w.wang@intel.com> Suggested-by: Tiwei Bie <tiwei.bie@intel.com> --- 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; -- 2.15.1 ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio-user: fix dev_init in legacy-mem mode 2018-05-17 7:35 [dpdk-dev] [PATCH] net/virtio-user: fix dev_init in legacy-mem mode Xiao Wang @ 2018-05-17 8:03 ` Maxime Coquelin 2018-05-17 8:07 ` Wang, Xiao W 2018-05-17 8:28 ` Maxime Coquelin 1 sibling, 1 reply; 4+ messages in thread From: Maxime Coquelin @ 2018-05-17 8:03 UTC (permalink / raw) To: Xiao Wang; +Cc: dev, tiwei.bie, lei.a.yao 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 <xiao.w.wang@intel.com> > Suggested-by: Tiwei Bie <tiwei.bie@intel.com> 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 <maxime.coquelin@redhat.com> I'll handle the changes when applying. Thanks, Maxime ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio-user: fix dev_init in legacy-mem mode 2018-05-17 8:03 ` Maxime Coquelin @ 2018-05-17 8:07 ` Wang, Xiao W 0 siblings, 0 replies; 4+ messages in thread From: Wang, Xiao W @ 2018-05-17 8:07 UTC (permalink / raw) To: Maxime Coquelin; +Cc: dev, Bie, Tiwei, Yao, Lei A Hi, > -----Original Message----- > From: Maxime Coquelin [mailto:maxime.coquelin@redhat.com] > Sent: Thursday, May 17, 2018 4:03 PM > To: Wang, Xiao W <xiao.w.wang@intel.com> > Cc: dev@dpdk.org; Bie, Tiwei <tiwei.bie@intel.com>; Yao, Lei A > <lei.a.yao@intel.com> > Subject: Re: [PATCH] net/virtio-user: fix dev_init in legacy-mem mode > > Hi Xiao, > > Next time, could you please devtools/check-git-log.sh script before > posting. OK, thanks! BRs, Xiao > > 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 <xiao.w.wang@intel.com> > > Suggested-by: Tiwei Bie <tiwei.bie@intel.com> > > 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 <maxime.coquelin@redhat.com> > > I'll handle the changes when applying. > > Thanks, > Maxime ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [dpdk-dev] [PATCH] net/virtio-user: fix dev_init in legacy-mem mode 2018-05-17 7:35 [dpdk-dev] [PATCH] net/virtio-user: fix dev_init in legacy-mem mode Xiao Wang 2018-05-17 8:03 ` Maxime Coquelin @ 2018-05-17 8:28 ` Maxime Coquelin 1 sibling, 0 replies; 4+ messages in thread From: Maxime Coquelin @ 2018-05-17 8:28 UTC (permalink / raw) To: Xiao Wang; +Cc: dev, tiwei.bie, lei.a.yao 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<xiao.w.wang@intel.com> > Suggested-by: Tiwei Bie<tiwei.bie@intel.com> > --- > drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) Applied to dpdk-next-virtio/master with suggested changes. Thanks, Maxime ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-05-17 8:28 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-05-17 7:35 [dpdk-dev] [PATCH] net/virtio-user: fix dev_init in legacy-mem mode Xiao Wang 2018-05-17 8:03 ` Maxime Coquelin 2018-05-17 8:07 ` Wang, Xiao W 2018-05-17 8:28 ` Maxime Coquelin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).