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:37:56 +0000 (13:37 -0700)
commitcd65125d97da87d2d3f9b7e8e2d35b6dd25ac6d3
treea4a20727a2fd90195a4991e4f55a9b2a7cb2141d
parente253f7323f6ef7d4bab13e303c68db92ba7ce767
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