[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-08 Thread Yuanhan Liu
On Tue, Dec 08, 2015 at 05:57:54AM +, Xie, Huawei wrote: > On 12/2/2015 11:40 AM, Yuanhan Liu wrote: > [...] > > + > > + addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off); > > + if (addr == MAP_FAILED) { > > + RTE_LOG(ERR, VHOST_CONFIG, "mmap log base failed!\n");

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-08 Thread Xie, Huawei
On 12/2/2015 11:40 AM, Yuanhan Liu wrote: [...] > + > + addr = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, off); > + if (addr == MAP_FAILED) { > + RTE_LOG(ERR, VHOST_CONFIG, "mmap log base failed!\n"); > + return -1; > + } Yuanhan: mmap could fail with

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Panu Matilainen
On 12/07/2015 03:55 PM, Thomas Monjalon wrote: > 2015-12-07 13:41, Panu Matilainen: >> On 12/07/2015 01:28 PM, Thomas Monjalon wrote: >>> 2015-12-07 08:29, Panu Matilainen: On 12/07/2015 01:07 AM, Thomas Monjalon wrote: > 2015-12-02 15:53, Panu Matilainen: The vhost ABI break was

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Thomas Monjalon
2015-12-07 18:48, Panu Matilainen: > On 12/07/2015 03:55 PM, Thomas Monjalon wrote: > > 2015-12-07 13:41, Panu Matilainen: > >> On 12/07/2015 01:28 PM, Thomas Monjalon wrote: > >>> 2015-12-07 08:29, Panu Matilainen: > On 12/07/2015 01:07 AM, Thomas Monjalon wrote: > > 2015-12-02 15:53,

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Thomas Monjalon
2015-12-07 13:41, Panu Matilainen: > On 12/07/2015 01:28 PM, Thomas Monjalon wrote: > > 2015-12-07 08:29, Panu Matilainen: > >> On 12/07/2015 01:07 AM, Thomas Monjalon wrote: > >>> 2015-12-02 15:53, Panu Matilainen: > >> The vhost ABI break was announced for DPDK 2.2 in commit > >>

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Panu Matilainen
On 12/07/2015 01:28 PM, Thomas Monjalon wrote: > 2015-12-07 08:29, Panu Matilainen: >> On 12/07/2015 01:07 AM, Thomas Monjalon wrote: >>> 2015-12-02 15:53, Panu Matilainen: This (and other changes in patch 2 breaks the librte_vhost ABI again, so you'd need to at least add a deprecation

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Thomas Monjalon
2015-12-07 08:29, Panu Matilainen: > On 12/07/2015 01:07 AM, Thomas Monjalon wrote: > > 2015-12-02 15:53, Panu Matilainen: > >> This (and other changes in patch 2 breaks the librte_vhost ABI again, so > >> you'd need to at least add a deprecation note to 2.2 to be able to do it > >> in 2.3 at all

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Yuanhan Liu
On Mon, Dec 07, 2015 at 03:03:24AM +0100, Thomas Monjalon wrote: > 2015-12-07 10:00, Yuanhan Liu: > > On Mon, Dec 07, 2015 at 12:07:28AM +0100, Thomas Monjalon wrote: > > > 2015-12-02 15:53, Panu Matilainen: > > > > This (and other changes in patch 2 breaks the librte_vhost ABI again, > > > > so

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Yuanhan Liu
On Mon, Dec 07, 2015 at 12:07:28AM +0100, Thomas Monjalon wrote: > 2015-12-02 15:53, Panu Matilainen: > > This (and other changes in patch 2 breaks the librte_vhost ABI again, so > > you'd need to at least add a deprecation note to 2.2 to be able to do it > > in 2.3 at all according to the ABI

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Panu Matilainen
On 12/07/2015 01:07 AM, Thomas Monjalon wrote: > 2015-12-02 15:53, Panu Matilainen: >> This (and other changes in patch 2 breaks the librte_vhost ABI again, so >> you'd need to at least add a deprecation note to 2.2 to be able to do it >> in 2.3 at all according to the ABI policy. >> >> Perhaps a

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Thomas Monjalon
2015-12-07 10:18, Yuanhan Liu: > On Mon, Dec 07, 2015 at 03:03:24AM +0100, Thomas Monjalon wrote: > > 2015-12-07 10:00, Yuanhan Liu: > > > On Mon, Dec 07, 2015 at 12:07:28AM +0100, Thomas Monjalon wrote: > > > > 2015-12-02 15:53, Panu Matilainen: > > > > > This (and other changes in patch 2 breaks

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Thomas Monjalon
2015-12-07 10:00, Yuanhan Liu: > On Mon, Dec 07, 2015 at 12:07:28AM +0100, Thomas Monjalon wrote: > > 2015-12-02 15:53, Panu Matilainen: > > > This (and other changes in patch 2 breaks the librte_vhost ABI again, so > > > you'd need to at least add a deprecation note to 2.2 to be able to do it >

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-07 Thread Thomas Monjalon
2015-12-02 15:53, Panu Matilainen: > This (and other changes in patch 2 breaks the librte_vhost ABI again, so > you'd need to at least add a deprecation note to 2.2 to be able to do it > in 2.3 at all according to the ABI policy. > > Perhaps a better option would be adding some padding to the

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-03 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 05:38:10PM +0100, Thomas Monjalon wrote: > 2015-12-02 22:31, Yuanhan Liu: > > Thomas, should I write an ABI deprecation note? Can I make it for > > v2.2 release If I make one tomorrow? (Sorry that I'm not awared > > of that it would be an ABI break). > > As Panu suggested,

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-02 Thread Yuanhan Liu
On Wed, Dec 02, 2015 at 03:53:45PM +0200, Panu Matilainen wrote: > On 12/02/2015 05:43 AM, Yuanhan Liu wrote: > >VHOST_USER_SET_LOG_BASE request is used to tell the backend (dpdk > >vhost-user) where we should log dirty pages, and how big the log > >buffer is. > > > >This request introduces a new

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-02 Thread Michael S. Tsirkin
On Wed, Dec 02, 2015 at 06:58:03PM +0200, Panu Matilainen wrote: > On 12/02/2015 05:09 PM, Yuanhan Liu wrote: > >On Wed, Dec 02, 2015 at 04:48:14PM +0200, Panu Matilainen wrote: > >... > >diff --git a/lib/librte_vhost/rte_virtio_net.h > >b/lib/librte_vhost/rte_virtio_net.h > >index

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-02 Thread Panu Matilainen
On 12/02/2015 05:09 PM, Yuanhan Liu wrote: > On Wed, Dec 02, 2015 at 04:48:14PM +0200, Panu Matilainen wrote: > ... > diff --git a/lib/librte_vhost/rte_virtio_net.h > b/lib/librte_vhost/rte_virtio_net.h > index 5687452..416dac2 100644 > --- a/lib/librte_vhost/rte_virtio_net.h

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-02 Thread Thomas Monjalon
2015-12-02 22:31, Yuanhan Liu: > Thomas, should I write an ABI deprecation note? Can I make it for > v2.2 release If I make one tomorrow? (Sorry that I'm not awared > of that it would be an ABI break). As Panu suggested, it would be better to reserve some room now in 2.2 which already breaks

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-02 Thread Panu Matilainen
On 12/02/2015 04:31 PM, Yuanhan Liu wrote: > On Wed, Dec 02, 2015 at 03:53:45PM +0200, Panu Matilainen wrote: >> On 12/02/2015 05:43 AM, Yuanhan Liu wrote: >>> VHOST_USER_SET_LOG_BASE request is used to tell the backend (dpdk >>> vhost-user) where we should log dirty pages, and how big the log >>>

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-02 Thread Panu Matilainen
On 12/02/2015 05:43 AM, Yuanhan Liu wrote: > VHOST_USER_SET_LOG_BASE request is used to tell the backend (dpdk > vhost-user) where we should log dirty pages, and how big the log > buffer is. > > This request introduces a new payload: > > typedef struct VhostUserLog { > uint64_t

[dpdk-dev] [PATCH 1/4] vhost: handle VHOST_USER_SET_LOG_BASE request

2015-12-02 Thread Yuanhan Liu
VHOST_USER_SET_LOG_BASE request is used to tell the backend (dpdk vhost-user) where we should log dirty pages, and how big the log buffer is. This request introduces a new payload: typedef struct VhostUserLog { uint64_t mmap_size; uint64_t mmap_offset;