ofs->length = htons(length);
ofs->table_id = s->table_idx;
ofs->pad = 0;
- ofs->match.wildcards = htons(flow->key.wildcards);
+ ofs->match.wildcards = htonl(flow->key.wildcards);
ofs->match.in_port = flow->key.in_port;
memcpy(ofs->match.dl_src, flow->key.dl_src, ETH_ALEN);
memcpy(ofs->match.dl_dst, flow->key.dl_dst, ETH_ALEN);
ofs->match.nw_src = flow->key.nw_src;
ofs->match.nw_dst = flow->key.nw_dst;
ofs->match.nw_proto = flow->key.nw_proto;
- memset(ofs->match.pad, 0, sizeof ofs->match.pad);
+ ofs->match.pad = 0;
ofs->match.tp_src = flow->key.tp_src;
ofs->match.tp_dst = flow->key.tp_dst;
ofs->duration = htonl((jiffies - flow->init_time) / HZ);
void *body, int *body_len)
{
struct ofp_table_stats *ots;
- int nbytes = dp->chain->n_tables * sizeof *ots;
+ int n_bytes = dp->chain->n_tables * sizeof *ots;
int i;
- if (nbytes > *body_len)
+ if (n_bytes > *body_len)
return -ENOBUFS;
- *body_len = nbytes;
+ *body_len = n_bytes;
for (i = 0, ots = body; i < dp->chain->n_tables; i++, ots++) {
struct sw_table_stats stats;
dp->chain->tables[i]->stats(dp->chain->tables[i], &stats);