projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
odp-utils: Refactor slow_path_reason parse and format functions.
[openvswitch]
/
lib
/
netdev-linux.c
diff --git
a/lib/netdev-linux.c
b/lib/netdev-linux.c
index efce9a7e29e75e3f87cf4f94a3d2b7d831e863ef..0460c069cc3b8ef25b452dc7784d014abc44e1c5 100644
(file)
--- a/
lib/netdev-linux.c
+++ b/
lib/netdev-linux.c
@@
-955,7
+955,7
@@
netdev_linux_send(struct netdev *netdev_, const void *data, size_t size)
sll.sll_family = AF_PACKET;
sll.sll_ifindex = ifindex;
sll.sll_family = AF_PACKET;
sll.sll_ifindex = ifindex;
- iov.iov_base =
(void *) data
;
+ iov.iov_base =
CONST_CAST(void *, data)
;
iov.iov_len = size;
msg.msg_name = &sll;
iov.iov_len = size;
msg.msg_name = &sll;
@@
-2668,7
+2668,7
@@
htb_parse_qdisc_details__(struct netdev *netdev,
enum netdev_features current;
netdev_get_features(netdev, ¤t, NULL, NULL, NULL);
enum netdev_features current;
netdev_get_features(netdev, ¤t, NULL, NULL, NULL);
- hc->max_rate = netdev_features_to_bps(current) / 8;
+ hc->max_rate = netdev_features_to_bps(current
, 100 * 1000 * 1000
) / 8;
}
hc->min_rate = hc->max_rate;
hc->burst = 0;
}
hc->min_rate = hc->max_rate;
hc->burst = 0;
@@
-3147,7
+3147,7
@@
hfsc_parse_qdisc_details__(struct netdev *netdev, const struct smap *details,
enum netdev_features current;
netdev_get_features(netdev, ¤t, NULL, NULL, NULL);
enum netdev_features current;
netdev_get_features(netdev, ¤t, NULL, NULL, NULL);
- max_rate = netdev_features_to_bps(current) / 8;
+ max_rate = netdev_features_to_bps(current
, 100 * 1000 * 1000
) / 8;
}
class->min_rate = max_rate;
}
class->min_rate = max_rate;
@@
-4106,7
+4106,7
@@
tc_query_qdisc(const struct netdev *netdev)
}
/* Instantiate it. */
}
/* Instantiate it. */
- load_error = ops->tc_load(
(struct netdev *) netdev
, qdisc);
+ load_error = ops->tc_load(
CONST_CAST(struct netdev *, netdev)
, qdisc);
assert((load_error == 0) == (netdev_dev->tc != NULL));
ofpbuf_delete(qdisc);
assert((load_error == 0) == (netdev_dev->tc != NULL));
ofpbuf_delete(qdisc);