I though about fixing this by adding 'may_steal' to qos_run(), but this
seems more consistent, and it behaves more in line with the vhost pmd.

Applied to master, thanks

2016-08-10 7:21 GMT-07:00 Stokes, Ian <ian.sto...@intel.com>:

> > On 08/10/2016 11:43 AM, Ilya Maximets wrote:
> > > While using QoS with vHost interfaces 'netdev_dpdk_qos_run__()' will
> > > free mbufs while executing 'netdev_dpdk_policer_run()'. After that
> > > same mbufs will be freed at the end of '__netdev_dpdk_vhost_send()'
> > > if 'may_steal == true'. This behaviour will break mempool.
> > >
> > > Also 'netdev_dpdk_qos_run__()' will free packets even if we shouldn't
> > > do this ('may_steal == false'). This will lead to using of already
> > > freed packets by the upper layers.
> > >
> > > Fix that by copying all packets that we can't steal like it done for
> > > DPDK_DEV_ETH devices and freeing only packets not freed by QoS.
> > >
> > > Fixes: 0bf765f753fd ("netdev_dpdk.c: Add QoS functionality.")
> > > Signed-off-by: Ilya Maximets <i.maxim...@samsung.com>
> > > ---
> > >  lib/netdev-dpdk.c | 24 +++++++++---------------
> > >  1 file changed, 9 insertions(+), 15 deletions(-)
> >
> > It looks good to me.
> > Also, it would simplify my RFC patch:
> > netdev-dpdk: Add SW queue before Vhost-user Rx virtqueue I will rework
> > it as soon as your patch is accepted.
> >
> > FWIW,
> > Reviewed-by: Maxime Coquelin <maxime.coque...@redhat.com>
> >
> > Thanks!
> > Maxime
>
> Thanks for the Patch Ilya, good catch!
>
> Looks good to me and I've tested it, no issues found.
>
> Tested-by: Ian Stokes <ian.sto...@intel.com>
>
> Thanks
> Ian
> _______________________________________________
> dev mailing list
> dev@openvswitch.org
> http://openvswitch.org/mailman/listinfo/dev
>
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to