meter: fix divide by zero for RFC4115
authorEelco Chaudron <echaudro@redhat.com>
Tue, 19 Mar 2019 12:10:44 +0000 (12:10 +0000)
committerCristian Dumitrescu <cristian.dumitrescu@intel.com>
Fri, 29 Mar 2019 19:51:25 +0000 (20:51 +0100)
commitebe3a769911071450acb808153ec2a2496726906
tree2f9f5b1beaab1c77e5a12c205d931403cca4ca75
parent82010ef55e7cb4948b4bf4ff229716a3a142e95c
meter: fix divide by zero for RFC4115

RFC 4115 allows a meter with either cir and/or eir configured.
When only one is configured a divide by zero would occur.

Fixes: 655796d2b5fb ("meter: support RFC4115 trTCM")

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
lib/librte_meter/rte_meter.c