X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fnetdev-linux.c;h=0460c069cc3b8ef25b452dc7784d014abc44e1c5;hb=ec956fc74371f36a25d96a10f283a62b4eff306a;hp=efce9a7e29e75e3f87cf4f94a3d2b7d831e863ef;hpb=ab985a77bb51dcb8d8764e2d4d8d695d2eee364d;p=openvswitch diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index efce9a7e..0460c069 100644 --- 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; - iov.iov_base = (void *) data; + iov.iov_base = CONST_CAST(void *, data); 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); - 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; @@ -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); - max_rate = netdev_features_to_bps(current) / 8; + max_rate = netdev_features_to_bps(current, 100 * 1000 * 1000) / 8; } class->min_rate = max_rate; @@ -4106,7 +4106,7 @@ tc_query_qdisc(const struct netdev *netdev) } /* 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);