[ovs-dev] [PATCHv2] dpif-netlink: Add meter support.

Alin Serdean aserdean at cloudbasesolutions.com
Fri Jun 29 14:23:57 UTC 2018



On 29 Jun 2018, at 07:02, Justin Pettit <jpettit at ovn.org<mailto:jpettit at ovn.org>> wrote:

From: Andy Zhou <azhou at ovn.org<mailto:azhou at ovn.org>>

To work with kernel datapath that supports meter.

Signed-off-by: Andy Zhou <azhou at ovn.org<mailto:azhou at ovn.org>>
Signed-off-by: Justin Pettit <jpettit at ovn.org<mailto:jpettit at ovn.org>>
---
v1->v2: D'oh. Stupid typo.

This is Andy's patch.  I made a few fixes and cleanups, so I wouldn't
mind another set of eyes.

Also, this may have impact on the Windows port, since I don't believe it
has support for meters.  Unfortunately, I don't have a good way to test
Windows builds, so I would appreciate if someone from the Windows side
could look at this.
Unfortunately Windows does not have support for metering.
Note to self: I need to work on a way to make it easier for people to test this.
We still lack the ability to dynamically create families on Windows
(https://github.com/openvswitch/ovs/blob/master/datapath-windows/include/OvsDpInterfaceExt.h#L55-L60)
thus making the following change break datapath creation:

@@ -3040,6 +3297,9 @@ dpif_netlink_init(void)
            error = nl_lookup_genl_mcgroup(OVS_VPORT_FAMILY, OVS_VPORT_MCGROUP,
                                           &ovs_vport_mcgroup);
        }
+        if (!error) {
+            error = nl_lookup_genl_family(OVS_METER_FAMILY, &ovs_meter_family);
+        }


It could be ifdef out since the the rest of the communication (get/set) will fail and the
userspace can compensate.
Please also add a to do comment so I can look on how to implement it later on.

Thanks,
Alin.


More information about the dev mailing list