ovs-lib not support qos type egress-policer for ovs-dpdk

Bug #1724729 reported by Rong.Wang
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Slawek Kaplonski

Bug Description

IN the ovs-dpdk, the Qos cmd use the type "egress-policer", while now the tpye is only "linux-htb" in the ovs-lib.py.
May be the type should be setted by config file, on behalf of ovs or ovs-dpdk.

The ovs-dpdk qos configure file can be seen:
http://docs.openvswitch.org/en/latest/howto/dpdk/

And the normal ovs qos configure file is here:
http://docs.openvswitch.org/en/latest/faq/qos/

And the whole cmd line is different.

Tags: ovs-lib qos
Rong.Wang (stormflying)
description: updated
description: updated
tags: added: ovs-lib
Changed in neutron:
assignee: nobody → Slawek Kaplonski (slaweq)
tags: added: qos
Revision history for this message
Slawek Kaplonski (slaweq) wrote :

Maybe we can use somehow "datapath_type" info which is also used in Vif to define how QoS should be configured?

Revision history for this message
Rong.Wang (stormflying) wrote :

Yea, that's a good idea.
Besides the type, the whole cmdline changed.
The parameter "queue" is not used in ovs-dpdk, while the ovs-lib.py has it.
There may need a new method.

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

"br_int" is an instance of OVSIntegrationBridge class, which inherits from OVSAgentBridge, which inherits of OVSBridge.

"br_int" is stored in QosOVSAgentDriver.br_int during the initialization.

OVSBridge has a member called "datapath_type" [1]. This can take values in [2]. If datapath type is OVS_DPDK_VHOST_USER or OVS_DPDK_VHOST_USER_CLIENT, the DPDK config way must be used.

[1] https://github.com/openstack/neutron/blob/1b3f982914d82494c63ac4fee405bf4972d2db32/neutron/agent/common/ovs_lib.py#L215
[2] https://github.com/openstack/neutron/blob/1b3f982914d82494c63ac4fee405bf4972d2db32/neutron/plugins/ml2/drivers/openvswitch/agent/common/constants.py#L129

Changed in neutron:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Slawek, I made a mistake: OVS_DPDK_VHOST_USER or OVS_DPDK_VHOST_USER_CLIENT are port types.

"system" and "netdev" are the only datapath types in OVS.

DKDP uses always "netdev", but there is experimental support for non-DPDK OVS with "netdev".

So, to check if OVS is actually DPDK, you can check how is done in mech_openvswitch "get_vif_type":
- If datapath is "netdev"
- And ifaces are in [a_const.OVS_DPDK_VHOST_USER, a_const.OVS_DPDK_VHOST_USER_CLIENT]
  ==> DPDK.

You need to retrieve the port vif_type with this information.

Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/513398

Revision history for this message
Rong.Wang (stormflying) wrote :

@ Slawek Kaplonski
I also have another question about the name of "_set_egress_bw_limit_for_port",
while the method is for "ingress_policing", why its name is "egress"?
thanks a lot.

    def _set_egress_bw_limit_for_port(self, port_name, max_kbps,
                                      max_burst_kbps):
        with self.ovsdb.transaction(check_error=True) as txn:
            txn.add(self.ovsdb.db_set('Interface', port_name,
                                      ('ingress_policing_rate', max_kbps)))
            txn.add(self.ovsdb.db_set('Interface', port_name,
                                      ('ingress_policing_burst',
                                       max_burst_kbps)))

Revision history for this message
Slawek Kaplonski (slaweq) wrote :

@Rong.Wang:
It's is like that because ingress policing is used to limit traffic which is going out from VM. I know that it can be confusing but on bridge (OVS) You are limiting traffic from bridge perspective so traffic which is going out from VM is in fact coming into bridge and this traffic is limited here.

Revision history for this message
Rong.Wang (stormflying) wrote :

@Slawek Kaplonski
Okay, Thanks. I got it.

When the patch can be finished ?
I find the method "_update_ingress_bw_limit_for_dpdk_port" is now just pass.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Paul Belanger (<email address hidden>) on branch: master
Review: https://review.openstack.org/513398
Reason: We are dealing with an issue in zuulv3 today, as such we need to abandon / restore this patch to correct the issue. Apologies for the inconvenience.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/513398
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=1be857435288e4008a41fe67bbc8795dd3d8b134
Submitter: Zuul
Branch: master

commit 1be857435288e4008a41fe67bbc8795dd3d8b134
Author: Sławek Kapłoński <email address hidden>
Date: Thu Oct 19 14:13:41 2017 +0000

    Fix ingress bw limit for OVS DPDK ports

    For OVS based DPDK ports ingress bandwidth limit is now implemented
    using egress-policer qos type.
    Additionally limit values are set in other_config of QoS because there
    is no queue used in this case.

    This patch moves also helper methods used to conversion between
    bytes and bits and between bits and kilobits to neutron.common.utils
    to be able to use it also in ovs_lib module.

    Change-Id: I94d1e8dfb82df5c602476db8aaa884ae91fecd7f
    Closes-Bug: #1724729

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 12.0.0.0b3

This issue was fixed in the openstack/neutron 12.0.0.0b3 development milestone.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.