goto err_free_dp;
dp->dp_idx = dp_idx;
- dp->id = get_datapath_id(dp->netdev);
dp->chain = chain_create(dp);
if (dp->chain == NULL)
goto err_destroy_dp_dev;
#ifdef SUPPORT_SNAT
/* Check if this packet needs early SNAT processing. */
if (snat_pre_route(skb)) {
- kfree_skb(skb);
return;
}
#endif
fill_features_reply(struct datapath *dp, struct ofp_switch_features *ofr)
{
struct net_bridge_port *p;
+ uint64_t dpid = get_datapath_id(dp->netdev);
int port_count = 0;
- ofr->datapath_id = cpu_to_be64(dp->id);
+ ofr->datapath_id = cpu_to_be64(dpid);
ofr->n_buffers = htonl(N_PKT_BUFFERS);
ofr->n_tables = dp->chain->n_tables;
if (!info->attrs[DP_GENL_A_DP_IDX])
return -EINVAL;
- dp = dp_get(nla_get_u32((info->attrs[DP_GENL_A_DP_IDX])));
+ dp = dp_get(nla_get_u32(info->attrs[DP_GENL_A_DP_IDX]));
if (!dp)
err = -ENOENT;
else {
{
struct sw_table *table = dp->chain->tables[s->table_idx];
- error = table->iterate(table, &match_key, &s->position,
- flow_stats_dump_callback, s);
+ error = table->iterate(table, &match_key, s->rq->out_port,
+ &s->position, flow_stats_dump_callback, s);
if (error)
break;
struct sw_table *table = dp->chain->tables[table_idx];
int error;
- error = table->iterate(table, &match_key, &position,
+ error = table->iterate(table, &match_key, rq->out_port, &position,
aggregate_stats_dump_callback, rpy);
if (error)
return error;