datapath: Add dev_get_stats compatibility function.