On Mon, Aug 22, 2016 at 7:16 AM, Yuanhan Liu
wrote:
> On Thu, Aug 18, 2016 at 11:27:06AM -0700, Rich Lane wrote:
> > On Mon, Aug 15, 2016 at 7:37 PM, Yuanhan Liu <
> yuanhan.liu at linux.intel.com>
> > wrote:
> >
> > On Mon, Aug 15, 2016
On Mon, Aug 15, 2016 at 7:37 PM, Yuanhan Liu
wrote:
> On Mon, Aug 15, 2016 at 01:00:24PM -0700, Rich Lane wrote:
> > Concurrent enqueue is an important performance optimization when the
> number
> > of cores used for switching is different than the number of vhost queues.
>
es a fix from "vhost: avoid reordering of used->idx and last_used_idx
updating".
Signed-off-by: Rich Lane
---
lib/librte_vhost/rte_vhost_version.map | 6 +++
lib/librte_vhost/rte_virtio_net.h | 19 +
lib/librte_vhost/vhost-net.h | 2 +
lib/librte
4537128394 ("i40e: free queue memory when closing")
Fixes: 8e109464c022 ("i40e: allow vector Rx and Tx usage")
Signed-off-by: Rich Lane
---
drivers/net/i40e/i40e_rxtx.c | 15 ---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/net/i40e/
> The remove would also result to a much cleaner code base, allowing us
> > > to do all kinds of extending easier.
> > >
> > > So here to mark vhost-cuse as deprecated in this release and will be
> > > removed in the next release (v16.11).
> > >
> > > Signed-off-by: Yuanhan Liu
> >
> > Acked-by: Ciara Loftus
>
> Acked-by: Thomas Monjalon
>
Acked-by: Rich Lane
On Wednesday, July 13, 2016, Yuanhan Liu
wrote:
> On Wed, Jul 13, 2016 at 10:34:07AM +0300, Ilya Maximets wrote:
> > This scenario fixed somehow, I agree. But this patch still needed to
> protect
> > vhost from untrusted VM, from malicious or buggy virtio application.
> > Maybe we could change th
Fixes a bug where rte_eth_vhost_get_queue_event would not return enabled queues
after a guest application restart.
Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
Signed-off-by: Rich Lane
---
drivers/net/vhost/rte_eth_vhost.c | 10 ++
1 file changed, 10
On Mon, Jun 6, 2016 at 8:51 PM, Yuanhan Liu
wrote:
>
> @@ -248,14 +248,9 @@ new_device(struct virtio_net *dev)
> internal = eth_dev->data->dev_private;
>
> #ifdef RTE_LIBRTE_VHOST_NUMA
> - ret = get_mempolicy(&newnode, NULL, 0, dev,
> - MPOL_F_NODE | MPOL_F_AD
On Thu, Jun 2, 2016 at 3:46 AM, Ilya Maximets
wrote:
> Hi, Rich.
> Thank you for testing and analysing.
>
> On 01.06.2016 01:06, Rich Lane wrote:
> > On Fri, May 20, 2016 at 5:50 AM, Ilya Maximets <mailto:i.maximets at samsung.com>> wrote:
> >
> > In c
On Fri, May 20, 2016 at 5:50 AM, Ilya Maximets
wrote:
> In current implementation guest application can reinitialize vrings
> by executing start after stop. In the same time host application
> can still poll virtqueue while device stopped in guest and it will
> crash with segmentation fault while
pdated version.map
>
Tested-by: Rich Lane
Acked-by: Rich Lane
On Thu, May 26, 2016 at 7:47 AM, Ferruh Yigit
wrote:
> On 5/25/2016 10:03 PM, Rich Lane wrote:
> > Signed-off-by: Rich Lane
>
> Reviewed-by: Ferruh Yigit
>
>
> While testing this, independent from patch applied or not , I am getting
> following assertion after rand
Signed-off-by: Rich Lane
---
drivers/net/af_packet/rte_eth_af_packet.c | 20 +++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/drivers/net/af_packet/rte_eth_af_packet.c
b/drivers/net/af_packet/rte_eth_af_packet.c
index f17bd7e..2d7f344 100644
--- a/drivers/net
>
> @@ -817,6 +821,9 @@ rte_pmd_vhost_devinit(const char *name, const char
> *params)
> int ret = 0;
> char *iface_name;
> uint16_t queues;
> + uint64_t flags = 0;
> + int client_mode;
> + int reconnect;
>
client_mode and reconnect are not initialized if t
I see a significant performance improvement with these patches, around 5%
at 64 bytes.
The one patch that didn't give any performance boost for me was "vhost:
arrange virtio_net fields for better cache sharing".
Tested-by: Rich Lane
On Mon, May 2, 2016 at 5:46 PM, Yuanhan Liu
On Tue, May 10, 2016 at 9:39 AM, Yuanhan Liu
wrote:
>
> Rich, would you help try by adding following line there and
> do a test? It would be great if this patch has your Tested-by :)
>
> internal->vid = vid;
>
The problem is new_device has already returned before that point because
find_inter
On Mon, May 2, 2016 at 3:25 PM, Yuanhan Liu
wrote:
> With all the previous prepare works, we are just one step away from
> the final ABI refactoring. That is, to change current API to let them
> stick to vid instead of the old virtio_net dev.
>
This patch removes the only assignment to internal-
If the vhost PMD were configured with more queues than the guest, the old
code would segfault in rte_vhost_enable_guest_notification due to a NULL
virtqueue pointer.
Fixes: ee584e9710b9 ("vhost: add driver on top of the library")
Signed-off-by: Rich Lane
---
drivers/net/vhost/rte_e
ch.
Fixes: 6dc5de3a (virtio: use indirect ring elements)
Signed-off-by: Rich Lane
---
v1-v2:
- Use offsetof to get address of tx_hdr
drivers/net/virtio/virtio_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rx
On Mon, Apr 4, 2016 at 1:05 PM, Yuanhan Liu
wrote:
> On Mon, Apr 04, 2016 at 03:13:37PM +0200, Thomas Monjalon wrote:
> > Huawei, Yuanhan, any comment?
> >
> > 2016-03-31 13:01, Rich Lane:
> > > vq->v
Signed-off-by: Rich Lane
---
drivers/net/virtio/virtio_rxtx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
index 2b88efd..1df2df6 100644
--- a/drivers/net/virtio/virtio_rxtx.c
+++ b/drivers/net/virtio/vir
This is useful when sections have duplicate names.
Signed-off-by: Rich Lane
---
v5->v6:
- Reordered sectionname argument in comment.
v4->v5:
- Reordered sectionname argument.
v3->v4:
- Added section name return value.
- Updated API docs for other functions.
v2->v3
- Added check for i
This is useful when sections have duplicate names.
Signed-off-by: Rich Lane
---
v4->v5:
- Reordered sectionname argument.
v3->v4:
- Added section name return value.
- Updated API docs for other functions.
v2->v3
- Added check for index < 0.
v1->v2:
- Added new symbol to versio
The indirection is unnecessary because there is only one implementation
of the vhost common code. Removing it makes the code more readable.
Signed-off-by: Rich Lane
Acked-by: Yuanhan Liu
---
v2->v3:
- Rebased.
v1->v2:
- Fix long lines.
examples/vhost_xen/virtio-net.h | 2
This is useful when sections have duplicate names.
Signed-off-by: Rich Lane
---
v3->v4:
- Added section name return value.
- Updated API docs for other functions.
v2->v3
- Added check for index < 0.
v1->v2:
- Added new symbol to version script.
lib/librte_cfgfile/rte_cfgfile.c
The indirection is unnecessary because there is only one implementation
of the vhost common code. Removing it makes the code more readable.
Signed-off-by: Rich Lane
---
v1->v2:
- Fix long lines.
examples/vhost_xen/virtio-net.h | 2 -
lib/librte_vhost/vhost-ne
The indirection is unnecessary because there is only one implementation of the
vhost common code. Removing it makes the code more readable.
Signed-off-by: Rich Lane
---
examples/vhost_xen/virtio-net.h | 2 -
lib/librte_vhost/vhost-net.h | 40 +---
lib
On Tue, Feb 2, 2016 at 7:10 AM, Dumitrescu, Cristian <
cristian.dumitrescu at intel.com> wrote:
>
>
> > -Original Message-----
> > From: Rich Lane [mailto:rich.lane at bigswitch.com]
> > Sent: Tuesday, January 19, 2016 4:42 AM
> > To: dev at dpdk.org
This is useful when sections have duplicate names.
Signed-off-by: Rich Lane
---
v2->v3
- Added check for index < 0.
v1->v2:
- Added new symbol to version script.
lib/librte_cfgfile/rte_cfgfile.c | 16
lib/librte_cfgfile/rte_cfgfile.h
e only compile tested.
Signed-off-by: Rich Lane
Acked-by: Yuanhan Liu
---
v2->v3:
- Rename "impl" to "backend".
v1->v2:
- Call into vhost-user/vhost-cuse to free mmaps.
lib/librte_vhost/vhost-net.h | 6 ++
lib/librte_vhost/vhost_cuse/virtio-n
Looks good. I tested the queue state change code in particular and didn't
find any problems.
Reviewed-by: Rich Lane
Tested-by: Rich Lane
On Sun, Jan 17, 2016 at 11:58 PM, Yuanhan Liu
wrote:
> On Sun, Jan 17, 2016 at 11:57:18AM -0800, Rich Lane wrote:
> > The common vhost code only supported a single mmap per device. vhost-user
> > worked around this by saving the address/length/fd of each mmap after
>
This is useful when sections have duplicate names.
Signed-off-by: Rich Lane
---
v1->v2:
- Added new symbol to version script.
lib/librte_cfgfile/rte_cfgfile.c | 16
lib/librte_cfgfile/rte_cfgfile.h | 23 +++
lib/librte_cfgf
e only compile tested.
Signed-off-by: Rich Lane
---
v1->v2:
- Call into vhost-user/vhost-cuse to free mmaps.
lib/librte_vhost/vhost-net.h | 6 ++
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 12
lib/librte_vhost/vhost_user/vhost-net-user.c | 1 -
lib/lib
This is useful when sections have duplicate names.
Signed-off-by: Rich Lane
---
lib/librte_cfgfile/rte_cfgfile.c | 16
lib/librte_cfgfile/rte_cfgfile.h | 23 +++
2 files changed, 39 insertions(+)
diff --git a/lib/librte_cfgfile/rte_cfgfile.c b/lib
See my reply to "mem: add API to obstain memory-backed file info" for a
workaround. With fixes for that and the TUNSETVNETHDRSZ issue I was able to
get traffic running over vhost-user.
On Sun, Jan 10, 2016 at 3:43 AM, Jianfeng Tan
wrote:
> @@ -1157,6 +1180,20 @@ rte_eal_hugepage_init(void)
> mcfg->memseg[0].len = internal_config.memory;
> mcfg->memseg[0].socket_id = socket_id;
>
> + hugepage = create_shared_memory(eal_hugepage_info_
ich is read by the
common code.
The vhost-cuse changes are only compile tested.
Signed-off-by: Rich Lane
---
lib/librte_vhost/rte_virtio_net.h | 14 +++--
lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 24 ---
lib/librte_vhost/vhost_user/virtio-net-
On Wed, Dec 23, 2015 at 11:58 PM, Tetsuya Mukawa wrote:
>
> Hi Rich and Yuanhan,
>
> I guess we have 2 implementations here.
>
> 1. rte_eth_vhost_get_queue_event() returns each event.
> 2. rte_eth_vhost_get_queue_status() returns current status of the queues.
>
> I guess option "2" is more generic
On Wed, Dec 23, 2015 at 7:09 PM, Tetsuya Mukawa wrote:
> On 2015/12/22 13:47, Rich Lane wrote:
> > On Mon, Dec 21, 2015 at 7:41 PM, Yuanhan Liu <
> yuanhan.liu at linux.intel.com>
> > wrote:
> >
> >> On Fri, Dec 18, 2015 at 10:01:25AM -0800, Rich Lane wro
The no-refcount path was being taken without the application opting in to it.
Reported-by: Mike Stolarchuk
Signed-off-by: Rich Lane
---
drivers/net/i40e/i40e_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c
On Mon, Dec 21, 2015 at 9:47 PM, Yuanhan Liu
wrote:
> On Mon, Dec 21, 2015 at 08:47:28PM -0800, Rich Lane wrote:
> > The queue state change callback is the one new API that needs to be
> > added because
> > normal NICs don't have this behavior.
>
> Again I'
On Mon, Dec 21, 2015 at 7:41 PM, Yuanhan Liu
wrote:
> On Fri, Dec 18, 2015 at 10:01:25AM -0800, Rich Lane wrote:
> > I'm using the vhost callbacks and struct virtio_net with the vhost PMD
> in a few
> > ways:
>
> Rich, thanks for the info!
>
> >
> &
I'm using the vhost callbacks and struct virtio_net with the vhost PMD in a
few ways:
1. new_device/destroy_device: Link state change (will be covered by the
link status interrupt).
2. new_device: Add first queue to datapath.
3. vring_state_changed: Add/remove queue to datapath.
4. destroy_device:
On Wed, Dec 2, 2015 at 10:06 PM, Yuanhan Liu
wrote:
>
> +static inline struct rte_mbuf *
> +copy_desc_to_mbuf(struct virtio_net *dev, struct vhost_virtqueue *vq,
> + uint16_t desc_idx, struct rte_mempool *mbuf_pool)
> +{
>
...
> +
> + desc = &vq->desc[desc_idx];
> + de
On Wed, Dec 2, 2015 at 10:06 PM, Yuanhan Liu
wrote:
> +static inline int __attribute__((always_inline))
> +copy_mbuf_to_desc(struct virtio_net *dev, struct vhost_virtqueue *vq,
> + struct rte_mbuf *m, uint16_t desc_idx, uint32_t *copied)
> +{
> ...
> + while (1) {
> +
On Thu, Nov 12, 2015 at 9:20 PM, Tetsuya Mukawa wrote:
> +static uint16_t
> +eth_vhost_tx(void *q, struct rte_mbuf **bufs, uint16_t nb_bufs)
> +{
>
...
> +
> + /* Enqueue packets to guest RX queue */
> + nb_tx = rte_vhost_enqueue_burst(r->device,
> + r->virtqueu
What's the reason for using qemu as a middleman? Couldn't the new PMD
itself open /dev/vhost-net or the vhost-user socket and send the commands
to set up virtqueues? That was the approach taken by Jianfeng's earlier RFC.
On Thu, Nov 19, 2015 at 2:57 AM, Tetsuya Mukawa wrote:
> THIS IS A PoC IMPL
On Tue, Nov 17, 2015 at 6:56 PM, Yuanhan Liu
wrote:
> @@ -519,6 +526,8 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t
> queue_id,
> goto merge_rx_exit;
> } else {
> update_secu
On Tue, Nov 17, 2015 at 5:23 AM, Yuanhan Liu
wrote:
> On Thu, Nov 12, 2015 at 01:46:03PM -0800, Rich Lane wrote:
> > You can reproduce this with l2fwd and the vhost PMD.
> >
> > You'll need this patch on top of the vhost PMD patches:
> > --- a/lib/librte_
>
> + if (rte_kvargs_count(kvlist, ETH_VHOST_IFACE_ARG) == 1) {
> + ret = rte_kvargs_process(kvlist, ETH_VHOST_IFACE_ARG,
> +&open_iface, &iface_name);
> + if (ret < 0)
> + goto out_free;
> + }
>
n
gdb: watch -l rte_eth_devices[1].data->rx_queues
On Thu, Nov 12, 2015 at 1:23 AM, Yuanhan Liu
wrote:
> On Thu, Nov 12, 2015 at 12:02:33AM -0800, Rich Lane wrote:
> > The guest could trigger this buffer overflow by creating a cycle of
> descriptors
> > (which would also cause an
iu
>
I had a patch that just saved the ifname but this is much better.
Acked-by: Rich Lane
e a VM connected to a
vhost-user vswitch because the virtqueue memory allocated by the previous run
is zeroed.
Signed-off-by: Rich Lane
---
lib/librte_vhost/vhost_rxtx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_vhost/vhost_rxtx.c b/lib/librte_vhost/vhost_rxtx.c
QEMU sends this message first when shutting down. There was previously no way
for the dataplane to know that the virtio_net instance had become unusable and
it would segfault when trying to do RX/TX.
Signed-off-by: Rich Lane
---
lib/librte_vhost/virtio-net.c | 3 +++
1 file changed, 3
This is a useful default for simple applications where the assignment of lcores
to CPUs doesn't matter. It's also useful for more complex applications that
automatically assign tasks to cores based on the NUMA topology.
Signed-off-by: Rich Lane
---
app/test/test_e
56 matches
Mail list logo