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:47 +0000 (13:38 -0700)
commitbb0c4b09b1a3192b31990cfac735eed214d33d04
treebd4713a5e08f88b3d1fb168c55b9658fde84c48d
parent37f9d3a82f6f7681b001ea20cf3e14ddc7fe0e3e
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