[ovs-discuss] Adding meter in OVS 2.10.90 Kernel-Space Switch

Ramzah Rehman ramzahrehman at gmail.com
Fri Jan 4 13:18:25 UTC 2019

I have OVS 2.10.90. I want to know is it possible to add meter in
kernel-space switch with 2.10.90 version of OVS?

I have Ubuntu 4.4.0-31-generic and I installed OVS 2.10.90 on it as follows.

apt-get install git
git clone https://github.com/openvswitch/ovs.git
cd ovs
apt install build-essential libssl1.0.0 libcap-ng-utils
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python2.7 libnuma-dev libtool autoconf automake wget
python-six libvirt-bin
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9 gcc-multilib
apt-get install libpcap-dev
apt-get install iperf
make install
#to use the kernel module that was shipped with ovs 2.10.90
for module in datapath/linux/*.ko; do
  modname="$(basename ${module})"
  echo "override ${modname%.ko} * extra" >> "$config_file"
  echo "override ${modname%.ko} * weak-updates" >> "$config_file"
depmod -a
#loading openvswitch
/sbin/modprobe openvswitch
export PATH=$PATH:/usr/local/share/openvswitch/scripts
ovs-ctl start

Then I ran following script to test meter function in kernel-space datapath:

ovs-vsctl add-br br0
ovs-vsctl set bridge br0
ovs-ofctl -O OpenFlow15 add-meter br0

However I got this error.

OFPT_METER_MOD (OF1.5) (xid=0x2): ADD meter=100 kbps bands=
type=drop rate=300000

I checked ovs-vswitchd.log as well. Got:

 2019-01-04T13:11:16.221Z|00037|connmgr|INFO|br0<->unix#3: sending

Useful info:

ovs-vsctl list bridge br0

_uuid               : bd776aad-3a88-4d38-a7a2-6be57723f04b
auto_attach         : []
controller          : []
datapath_id         : "0000ae6a77bd384d"
datapath_type       : ""
datapath_version    : "<unknown>"
external_ids        : {}
fail_mode           : []
flood_vlans         : []
flow_tables         : {}
ipfix               : []
mcast_snooping_enable: false
mirrors             : []
name                : "br0"
netflow             : []
other_config        : {}
ports               : [ae6edd93-c2a2-4f61-bb9a-c319c2fc0e2f]
protocols           : ["OpenFlow10", "OpenFlow11", "OpenFlow12",
"OpenFlow13", "OpenFlow14", "OpenFlow15"]
rstp_enable         : false
rstp_status         : {}
sflow               : []
status              : {}
stp_enable          : false

ovs-vsctl list open-vswitch
_uuid               : 752ea415-0b53-4180-9ee8-abb7262985b1
bridges             : [bd776aad-3a88-4d38-a7a2-6be57723f04b]
cur_cfg             : 2
datapath_types      : [netdev, system]
db_version          : "7.16.1"
dpdk_initialized    : false
dpdk_version        : none
external_ids        : {hostname=ubuntu,
rundir="/usr/local/var/run/openvswitch", system-id=""}
iface_types         : [erspan, geneve, gre, internal, "ip6erspan",
"ip6gre", lisp, patch, stt, system, tap, vxlan]
manager_options     : []
next_cfg            : 2
other_config        : {}
ovs_version         : "2.10.90"
ssl                 : []
statistics          : {}
system_type         : Ubuntu
system_version      : "14.04-trusty"

Even though it says here <http://docs.openvswitch.org/en/latest/faq/qos/> in
the last FAQ answer that Open vSwitch 2.10 implemented meters in the Linux
kernel datapath. I am not able to add meter. Please let me if someone tried
it and have meter actually been implemented in kernel datapath in Open
vSwitch 2.10.90?

Best Regards,
Ramzah Rehman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20190104/46be9a97/attachment.html>

More information about the discuss mailing list