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:44 +0000 (13:38 -0700)
commit5f192af0f1e5f3f6bd6e6c4cfd62e8792cc6d1aa
tree199ba01226f48c040d6d0a98cfb5129e4db1edec
parentcd2c51dd9071b2b2a4bae405f576d1ef99667a13
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