git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovs-pki: Increase the validity days for self-signed certificates.
[sliver-openvswitch.git]
/
utilities
/
ovs-ofctl.c
diff --git
a/utilities/ovs-ofctl.c
b/utilities/ovs-ofctl.c
index
39aed86
..
a0b7079
100644
(file)
--- a/
utilities/ovs-ofctl.c
+++ b/
utilities/ovs-ofctl.c
@@
-948,28
+948,24
@@
ofctl_dump_aggregate(int argc, char *argv[])
static void
ofctl_queue_stats(int argc, char *argv[])
{
static void
ofctl_queue_stats(int argc, char *argv[])
{
- struct ofp10_queue_stats_request *req;
struct ofpbuf *request;
struct vconn *vconn;
struct ofpbuf *request;
struct vconn *vconn;
+ struct ofputil_queue_stats_request oqs;
open_vconn(argv[1], &vconn);
open_vconn(argv[1], &vconn);
- request = ofpraw_alloc(OFPRAW_OFPST_QUEUE_REQUEST,
- vconn_get_version(vconn), 0);
- req = ofpbuf_put_zeros(request, sizeof *req);
if (argc > 2 && argv[2][0] && strcasecmp(argv[2], "all")) {
if (argc > 2 && argv[2][0] && strcasecmp(argv[2], "all")) {
-
req->port_no = htons(str_to_port_no(argv[1], argv[2])
);
+
oqs.port_no = str_to_port_no(argv[1], argv[2]
);
} else {
} else {
-
req->port_no = htons(OFPP_ALL)
;
+
oqs.port_no = OFPP_ALL
;
}
if (argc > 3 && argv[3][0] && strcasecmp(argv[3], "all")) {
}
if (argc > 3 && argv[3][0] && strcasecmp(argv[3], "all")) {
-
req->queue_id = htonl(atoi(argv[3])
);
+
oqs.queue_id = atoi(argv[3]
);
} else {
} else {
-
req->queue_id = htonl(OFPQ_ALL)
;
+
oqs.queue_id = OFPQ_ALL
;
}
}
- memset(req->pad, 0, sizeof req->pad);
-
+ request = ofputil_encode_queue_stats_request(vconn_get_version(vconn), &oqs);
dump_stats_transaction(vconn, request);
vconn_close(vconn);
}
dump_stats_transaction(vconn, request);
vconn_close(vconn);
}
@@
-1418,17
+1414,13
@@
ofctl_snoop(int argc OVS_UNUSED, char *argv[])
static void
ofctl_dump_ports(int argc, char *argv[])
{
static void
ofctl_dump_ports(int argc, char *argv[])
{
- struct ofp10_port_stats_request *req;
struct ofpbuf *request;
struct vconn *vconn;
uint16_t port;
open_vconn(argv[1], &vconn);
struct ofpbuf *request;
struct vconn *vconn;
uint16_t port;
open_vconn(argv[1], &vconn);
- request = ofpraw_alloc(OFPRAW_OFPST_PORT_REQUEST,
- vconn_get_version(vconn), 0);
- req = ofpbuf_put_zeros(request, sizeof *req);
port = argc > 2 ? str_to_port_no(argv[1], argv[2]) : OFPP_NONE;
port = argc > 2 ? str_to_port_no(argv[1], argv[2]) : OFPP_NONE;
- req
->port_no = htons(
port);
+ req
uest = ofputil_encode_dump_ports_request(vconn_get_version(vconn),
port);
dump_stats_transaction(vconn, request);
vconn_close(vconn);
}
dump_stats_transaction(vconn, request);
vconn_close(vconn);
}