send_openflow_buffer(dp, buffer, NULL);
}
-static void fill_port_desc(struct datapath *dp, struct sw_port *p,
- struct ofp_phy_port *desc)
+static void
+fill_port_desc(struct sw_port *p, struct ofp_phy_port *desc)
{
desc->port_no = htons(p->port_no);
strncpy((char *) desc->name, netdev_get_name(p->netdev),
LIST_FOR_EACH (p, struct sw_port, node, &dp->port_list) {
struct ofp_phy_port *opp = ofpbuf_put_uninit(buffer, sizeof *opp);
memset(opp, 0, sizeof *opp);
- fill_port_desc(dp, p, opp);
+ fill_port_desc(p, opp);
}
send_openflow_buffer(dp, buffer, sender);
}
ops = make_openflow_xid(sizeof *ops, OFPT_PORT_STATUS, 0, &buffer);
ops->reason = status;
memset(ops->pad, 0, sizeof ops->pad);
- fill_port_desc(p->dp, p, &ops->desc);
+ fill_port_desc(p, &ops->desc);
send_openflow_buffer(p->dp, buffer, NULL);
}
#define MAX_FLOW_STATS_BYTES 4096
-static int flow_stats_init(struct datapath *dp, const void *body, int body_len,
- void **state)
+static int
+flow_stats_init(const void *body, int body_len UNUSED, void **state)
{
const struct ofp_flow_stats_request *fsr = body;
struct flow_stats_state *s = xmalloc(sizeof *s);
struct ofp_aggregate_stats_request rq;
};
-static int aggregate_stats_init(struct datapath *dp,
- const void *body, int body_len,
- void **state)
+static int
+aggregate_stats_init(const void *body, int body_len UNUSED, void **state)
{
const struct ofp_aggregate_stats_request *rq = body;
struct aggregate_stats_state *s = xmalloc(sizeof *s);
int port;
};
-static int port_stats_init(struct datapath *dp, const void *body, int body_len,
- void **state)
+static int
+port_stats_init(const void *body UNUSED, int body_len UNUSED, void **state)
{
struct port_stats_state *s = xmalloc(sizeof *s);
s->port = 0;
* struct ofp_stats_request. */
size_t min_body, max_body;
- /* Prepares to dump some kind of statistics on 'dp'. 'body' and
+ /* Prepares to dump some kind of datapath statistics. 'body' and
* 'body_len' are the 'body' member of the struct ofp_stats_request.
* Returns zero if successful, otherwise a negative error code.
* May initialize '*state' to state information. May be null if no
* initialization is required.*/
- int (*init)(struct datapath *dp, const void *body, int body_len,
- void **state);
+ int (*init)(const void *body, int body_len, void **state);
/* Appends statistics for 'dp' to 'buffer', which initially contains a
* struct ofp_stats_reply. On success, it should return 1 if it should be
}
if (cb->s->init) {
- err = cb->s->init(dp, rq->body, body_len, &cb->state);
+ err = cb->s->init(rq->body, body_len, &cb->state);
if (err) {
VLOG_WARN_RL(&rl,
"failed initialization of stats request type %d: %s",