[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-09 Thread Yuanhan Liu
On Wed, Dec 09, 2015 at 05:44:11AM +, Xie, Huawei wrote: > On 12/9/2015 11:41 AM, Yuanhan Liu wrote: > > On Wed, Dec 09, 2015 at 03:33:16AM +, Xie, Huawei wrote: > > ... > +static inline void __attribute__((always_inline)) > +vhost_log_write(struct virtio_net *dev, struct

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-09 Thread Yuanhan Liu
On Wed, Dec 09, 2015 at 03:33:16AM +, Xie, Huawei wrote: ... > >> +static inline void __attribute__((always_inline)) > >> +vhost_log_write(struct virtio_net *dev, struct vhost_virtqueue *vq, > >> + uint64_t offset, uint64_t len) > >> +{ > >> + uint64_t addr = vq->log_guest_addr; > >>

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-09 Thread Xie, Huawei
On 12/2/2015 9:53 PM, Victor Kaplansky wrote: > On Wed, Dec 02, 2015 at 11:43:11AM +0800, Yuanhan Liu wrote: >> Introduce vhost_log_write() helper function to log the dirty pages we >> touched. Page size is harded code to 4096 (VHOST_LOG_PAGE), and each >> log is presented by 1 bit. >> >>

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-02 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 03:53:01PM +0200, Victor Kaplansky wrote: > On Wed, Dec 02, 2015 at 11:43:11AM +0800, Yuanhan Liu wrote: > > Introduce vhost_log_write() helper function to log the dirty pages we > > touched. Page size is harded code to 4096 (VHOST_LOG_PAGE), and each > > log is presented

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-02 Thread Victor Kaplansky
On Wed, Dec 02, 2015 at 11:43:11AM +0800, Yuanhan Liu wrote: > Introduce vhost_log_write() helper function to log the dirty pages we > touched. Page size is harded code to 4096 (VHOST_LOG_PAGE), and each > log is presented by 1 bit. > > Therefore, vhost_log_write() simply finds the right bit for

[dpdk-dev] [PATCH 2/4] vhost: introduce vhost_log_write

2015-12-02 Thread Yuanhan Liu
Introduce vhost_log_write() helper function to log the dirty pages we touched. Page size is harded code to 4096 (VHOST_LOG_PAGE), and each log is presented by 1 bit. Therefore, vhost_log_write() simply finds the right bit for related page we are gonna change, and set it to 1. dev->log_base