On Tue, 2 Feb 2016 13:51:20 +0100 Nikolay Aleksandrov <razor@xxxxxxxxxxxxx> wrote: > +static bool virtnet_validate_speed(u32 speed) > +{ > + switch (speed) { > + case SPEED_10: > + case SPEED_100: > + case SPEED_1000: > + case SPEED_2500: > + case SPEED_5000: > + case SPEED_10000: > + case SPEED_20000: > + case SPEED_25000: > + case SPEED_40000: > + case SPEED_50000: > + case SPEED_56000: > + case SPEED_100000: > + case SPEED_UNKNOWN: > + return true; > + } > + > + return false; > +} Why limit to only known values. This switch() will get out of date when some vendor introduces 64G or some other weird value. _______________________________________________ Virtualization mailing list Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx https://lists.linuxfoundation.org/mailman/listinfo/virtualization