error = netdev_set_config(netdev, &args);
if (error) {
- ovs_error(error, "%s: failed to configure network device", name);
goto next;
}
error = netdev_set_config(netdev, &args);
smap_destroy(&args);
if (error) {
- ovs_error(error, "%s: failed to configure network device", name);
goto next;
}
printf("\tlookups: hit:%"PRIu64" missed:%"PRIu64" lost:%"PRIu64"\n"
"\tflows: %"PRIu64"\n",
stats.n_hit, stats.n_missed, stats.n_lost, stats.n_flows);
- if (stats.n_masks != UINT64_MAX) {
+ if (stats.n_masks != UINT32_MAX) {
uint64_t n_pkts = stats.n_hit + stats.n_missed;
double avg = n_pkts ? (double) stats.n_mask_hit / n_pkts : 0.0;
- printf("\tmasks: hit:%"PRIu64" total:%"PRIu64" hit/pkt:%.2f\n",
+ printf("\tmasks: hit:%"PRIu64" total:%"PRIu32" hit/pkt:%.2f\n",
stats.n_mask_hit, stats.n_masks, avg);
}
}
for (i = 3; i < argc; i++) {
char name[16];
int number;
- int n = -1;
- if (sscanf(argv[i], "%15[^=]=%d%n", name, &number, &n) > 0 && n > 0) {
+ if (ovs_scan(argv[i], "%15[^=]=%d", name, &number)) {
uintptr_t n = number;
simap_put(&port_names, name, n);
} else {