factor out a function to extract stats from if_data to netdev_stats.