All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas.monjalon@6wind.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dev@dpdk.org
Subject: Re: [PATCH] vhost: reset device properly
Date: Thu, 12 Nov 2015 12:31:16 +0100	[thread overview]
Message-ID: <1619932.CiF7gkQMAT@xps13> (raw)
In-Reply-To: <CAGSMBPNtVD4HrKV_pYk9kQX+DBWmUbo4erXA44yuiPyTb+7Beg@mail.gmail.com>

> > Currently, we reset all fields of a device to zero when reset
> > happens, which is wrong, since for some fields like device_fh,
> > ifname, and virt_qp_nb, they should be same and be kept after
> > reset until the device is removed. And this is what's the new
> > helper function reset_device() for.
> >
> > And use rte_zmalloc() instead of rte_malloc, so that we could
> > avoid init_device(), which basically dose zero reset only so far.
> > Hence, init_device() is dropped in this patch.
> >
> > This patch also removes a hack of using the offset a specific
> > field (which is virtqueue now) inside of `virtio_net' structure
> > to do reset, which could be broken easily if someone changed the
> > field order without caution.
> >
> > Cc: Tetsuya Mukawa <mukawa@igel.co.jp>
> > Cc: Xie Huawei <huawei.xie@intel.com>
> > Signed-off-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> >
> 
> I had a patch that just saved the ifname but this is much better.
> 
> Acked-by: Rich Lane <rlane@bigswitch.com>

Applied, thanks

  reply	other threads:[~2015-11-12 11:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-12  4:10 [PATCH] maintainers: claim to be reviewer of virtio/vhost component Yuanhan Liu
2015-11-12  4:10 ` [PATCH] vhost: reset device properly Yuanhan Liu
2015-11-12  8:31   ` Rich Lane
2015-11-12 11:31     ` Thomas Monjalon [this message]
2015-11-12 11:34 ` [PATCH] maintainers: claim to be reviewer of virtio/vhost component Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1619932.CiF7gkQMAT@xps13 \
    --to=thomas.monjalon@6wind.com \
    --cc=dev@dpdk.org \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.