return __rocker_port_mem_alloc(rocker_port, trans, n * size);
}
-static void rocker_port_kfree(struct rocker_port *rocker_port,
- enum switchdev_trans trans, const void *mem)
+static void rocker_port_kfree(enum switchdev_trans trans, const void *mem)
{
struct list_head *elem;
return wait;
}
-static void rocker_wait_destroy(struct rocker_port *rocker_port,
- enum switchdev_trans trans,
+static void rocker_wait_destroy(enum switchdev_trans trans,
struct rocker_wait *wait)
{
- rocker_port_kfree(rocker_port, trans, wait);
+ rocker_port_kfree(trans, wait);
}
static bool rocker_wait_event_timeout(struct rocker_wait *wait,
rocker_desc_gen_clear(desc_info);
out:
- rocker_wait_destroy(rocker_port, trans, wait);
+ rocker_wait_destroy(trans, wait);
return err;
}
match->cookie = found->cookie;
if (trans != SWITCHDEV_TRANS_PREPARE)
hash_del(&found->entry);
- rocker_port_kfree(rocker_port, trans, found);
+ rocker_port_kfree(trans, found);
found = match;
found->cmd = ROCKER_TLV_CMD_TYPE_OF_DPA_FLOW_MOD;
} else {
spin_unlock_irqrestore(&rocker->flow_tbl_lock, flags);
- rocker_port_kfree(rocker_port, trans, match);
+ rocker_port_kfree(trans, match);
if (found) {
err = rocker_cmd_exec(rocker, rocker_port, trans,
rocker_cmd_flow_tbl_del,
found, NULL, NULL);
- rocker_port_kfree(rocker_port, trans, found);
+ rocker_port_kfree(trans, found);
}
return err;
return NULL;
}
-static void rocker_group_tbl_entry_free(struct rocker_port *rocker_port,
- enum switchdev_trans trans,
+static void rocker_group_tbl_entry_free(enum switchdev_trans trans,
struct rocker_group_tbl_entry *entry)
{
switch (ROCKER_GROUP_TYPE_GET(entry->group_id)) {
case ROCKER_OF_DPA_GROUP_TYPE_L2_FLOOD:
case ROCKER_OF_DPA_GROUP_TYPE_L2_MCAST:
- rocker_port_kfree(rocker_port, trans, entry->group_ids);
+ rocker_port_kfree(trans, entry->group_ids);
break;
default:
break;
}
- rocker_port_kfree(rocker_port, trans, entry);
+ rocker_port_kfree(trans, entry);
}
static int rocker_group_tbl_add(struct rocker_port *rocker_port,
if (found) {
if (trans != SWITCHDEV_TRANS_PREPARE)
hash_del(&found->entry);
- rocker_group_tbl_entry_free(rocker_port, trans, found);
+ rocker_group_tbl_entry_free(trans, found);
found = match;
found->cmd = ROCKER_TLV_CMD_TYPE_OF_DPA_GROUP_MOD;
} else {
spin_unlock_irqrestore(&rocker->group_tbl_lock, flags);
- rocker_group_tbl_entry_free(rocker_port, trans, match);
+ rocker_group_tbl_entry_free(trans, match);
if (found) {
err = rocker_cmd_exec(rocker, rocker_port, trans,
rocker_cmd_group_tbl_del,
found, NULL, NULL);
- rocker_group_tbl_entry_free(rocker_port, trans, found);
+ rocker_group_tbl_entry_free(trans, found);
}
return err;
entry->group_ids = rocker_port_kcalloc(rocker_port, trans, group_count,
sizeof(u32));
if (!entry->group_ids) {
- rocker_port_kfree(rocker_port, trans, entry);
+ rocker_port_kfree(trans, entry);
return -ENOMEM;
}
memcpy(entry->group_ids, group_ids, group_count * sizeof(u32));
be32_to_cpu(entry->ip_addr));
}
-static void _rocker_neigh_del(struct rocker_port *rocker_port,
- enum switchdev_trans trans,
+static void _rocker_neigh_del(enum switchdev_trans trans,
struct rocker_neigh_tbl_entry *entry)
{
if (trans == SWITCHDEV_TRANS_PREPARE)
return;
if (--entry->ref_count == 0) {
hash_del(&entry->entry);
- rocker_port_kfree(rocker_port, trans, entry);
+ rocker_port_kfree(trans, entry);
}
}
_rocker_neigh_add(rocker, trans, entry);
} else if (removing) {
memcpy(entry, found, sizeof(*entry));
- _rocker_neigh_del(rocker_port, trans, found);
+ _rocker_neigh_del(trans, found);
} else if (updating) {
_rocker_neigh_update(found, trans, eth_dst, true);
memcpy(entry, found, sizeof(*entry));
err_out:
if (!adding)
- rocker_port_kfree(rocker_port, trans, entry);
+ rocker_port_kfree(trans, entry);
return err;
}
*index = entry->index;
resolved = false;
} else if (removing) {
- _rocker_neigh_del(rocker_port, trans, found);
+ _rocker_neigh_del(trans, found);
} else if (updating) {
_rocker_neigh_update(found, trans, NULL, false);
resolved = !is_zero_ether_addr(found->eth_dst);
spin_unlock_irqrestore(&rocker->neigh_tbl_lock, lock_flags);
if (!adding)
- rocker_port_kfree(rocker_port, trans, entry);
+ rocker_port_kfree(trans, entry);
if (err)
return err;
"Error (%d) port VLAN l2 flood group\n", err);
no_ports_in_vlan:
- rocker_port_kfree(rocker_port, trans, group_ids);
+ rocker_port_kfree(trans, group_ids);
return err;
}
call_switchdev_notifiers(SWITCHDEV_FDB_ADD,
lw->rocker_port->dev, &info.info);
- rocker_port_kfree(lw->rocker_port, lw->trans, work);
+ rocker_port_kfree(lw->trans, work);
}
static int rocker_port_fdb_learn(struct rocker_port *rocker_port,
lw->vid = rocker_port_vlan_to_vid(rocker_port, vlan_id);
if (trans == SWITCHDEV_TRANS_PREPARE)
- rocker_port_kfree(rocker_port, trans, lw);
+ rocker_port_kfree(trans, lw);
else
schedule_work(&lw->work);
found = rocker_fdb_tbl_find(rocker, fdb);
if (removing && found) {
- rocker_port_kfree(rocker_port, trans, fdb);
+ rocker_port_kfree(trans, fdb);
if (trans != SWITCHDEV_TRANS_PREPARE)
hash_del(&found->entry);
} else if (!removing && !found) {
/* Check if adding and already exists, or removing and can't find */
if (!found != !removing) {
- rocker_port_kfree(rocker_port, trans, fdb);
+ rocker_port_kfree(trans, fdb);
if (!found && removing)
return 0;
/* Refreshing existing to update aging timers */