ofproto: Convert units correctly in ofport_open().
authorBen Pfaff <blp@nicira.com>
Wed, 4 Sep 2013 20:37:56 +0000 (13:37 -0700)
committerBen Pfaff <blp@nicira.com>
Wed, 4 Sep 2013 20:38:50 +0000 (13:38 -0700)
commit2ea2648141fba06cd6f81c00fc831de6afcc20e9
tree7d21c70646f6542e26ad3c6575bfbe458ab3053e
parentefa36473040f4f00062b282d97f67837f84381a3
ofproto: Convert units correctly in ofport_open().

netdev_features_to_bps() returns a speed in bps, but struct
ofputil_phy_port's curr_speed and max_speed are in kbps, so a conversion
is necessary.  This commit fixes the problem.

Reported-by: Benjamin Lunsky <benjamin.lunsky@netronome.com>
Tested-by: Benjamin Lunsky <benjamin.lunsky@netronome.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
ofproto/ofproto.c