OFPST_QUEUE reply: 0 queues
])
AT_CHECK([ovs-ofctl -vwarn queue-stats br0 ALL 5], [0],
- [OFPT_ERROR (xid=0x1): OFPQOFC_BAD_QUEUE
-OFPST_QUEUE request (xid=0x1):port=ALL queue=5
+ [OFPT_ERROR (xid=0x2): OFPQOFC_BAD_QUEUE
+OFPST_QUEUE request (xid=0x2):port=ALL queue=5
])
AT_CHECK([ovs-ofctl -vwarn queue-stats br0 10], [0],
- [OFPT_ERROR (xid=0x1): OFPQOFC_BAD_PORT
-OFPST_QUEUE request (xid=0x1):port=10 queue=ALL
+ [OFPT_ERROR (xid=0x2): OFPQOFC_BAD_PORT
+OFPST_QUEUE request (xid=0x2):port=10 queue=ALL
])
OVS_VSWITCHD_STOP
AT_CLEANUP
AT_SETUP([ofproto - flow table configuration])
OVS_VSWITCHD_START
# Check the default configuration.
-(echo "OFPST_TABLE reply (xid=0x1): 255 tables
+(echo "OFPST_TABLE reply (xid=0x2): 255 tables
0: classifier: wild=0x3fffff, max=1000000, active=0
lookup=0, matched=0"
x=1
])
# Check that the configuration was updated.
mv expout orig-expout
-(echo "OFPST_TABLE reply (xid=0x1): 255 tables
+(echo "OFPST_TABLE reply (xid=0x2): 255 tables
0: main : wild=0x3fffff, max=1000000, active=0
lookup=0, matched=0
1: table1 : wild=0x3fffff, max= 1024, active=0
}
static void
-dump_stats_transaction__(struct vconn *vconn, struct ofpbuf *request)
+dump_stats_transaction(struct vconn *vconn, struct ofpbuf *request)
{
const struct ofp_header *request_oh = request->data;
ovs_be32 send_xid = request_oh->xid;
}
static void
-dump_stats_transaction(const char *vconn_name, struct ofpbuf *request)
+dump_trivial_stats_transaction(const char *vconn_name, enum ofpraw raw)
{
+ struct ofpbuf *request;
struct vconn *vconn;
open_vconn(vconn_name, &vconn);
- dump_stats_transaction__(vconn, request);
+ request = ofpraw_alloc(raw, vconn_get_version(vconn), 0);
+ dump_stats_transaction(vconn, request);
vconn_close(vconn);
}
-static void
-dump_trivial_stats_transaction(const char *vconn_name, enum ofpraw raw)
-{
- struct ofpbuf *request;
-
- request = ofpraw_alloc(raw, OFP10_VERSION, 0);
- dump_stats_transaction(vconn_name, request);
-}
-
/* Sends 'request', which should be a request that only has a reply if an error
* occurs, and waits for it to succeed or fail. If an error does occur, prints
* it and exits with an error.
struct vconn *vconn;
vconn = prepare_dump_flows(argc, argv, aggregate, &request);
- dump_stats_transaction__(vconn, request);
+ dump_stats_transaction(vconn, request);
vconn_close(vconn);
}
{
struct ofp10_queue_stats_request *req;
struct ofpbuf *request;
+ struct vconn *vconn;
- request = ofpraw_alloc(OFPRAW_OFPST_QUEUE_REQUEST, OFP10_VERSION, 0);
+ 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")) {
memset(req->pad, 0, sizeof req->pad);
- dump_stats_transaction(argv[1], request);
+ dump_stats_transaction(vconn, request);
+ vconn_close(vconn);
}
static enum ofputil_protocol
msg = ofpbuf_new(0);
ofputil_append_flow_monitor_request(&fmr, msg);
- dump_stats_transaction__(vconn, msg);
+ dump_stats_transaction(vconn, msg);
} else {
ovs_fatal(0, "%s: unsupported \"monitor\" argument", arg);
}
{
struct ofp10_port_stats_request *req;
struct ofpbuf *request;
+ struct vconn *vconn;
uint16_t port;
- request = ofpraw_alloc(OFPRAW_OFPST_PORT_REQUEST, OFP10_VERSION, 0);
+ 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;
req->port_no = htons(port);
- dump_stats_transaction(argv[1], request);
+ dump_stats_transaction(vconn, request);
+ vconn_close(vconn);
}
static void