mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
switchdev: introduce transaction item queue for attr_set and obj_add
Now, the memory allocation in prepare/commit state is done separatelly in each driver (rocker). Introduce the similar mechanism in generic switchdev code, in form of queue. That can be used not only for memory allocations, but also for different items. Abort item destruction is handled as well. Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
69f5df491e
commit
7ea6eb3f56
5 changed files with 146 additions and 20 deletions
|
@ -456,7 +456,8 @@ static int dsa_slave_stp_update(struct net_device *dev, u8 state)
|
|||
}
|
||||
|
||||
static int dsa_slave_port_attr_set(struct net_device *dev,
|
||||
struct switchdev_attr *attr)
|
||||
struct switchdev_attr *attr,
|
||||
struct switchdev_trans *trans)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
@ -474,7 +475,8 @@ static int dsa_slave_port_attr_set(struct net_device *dev,
|
|||
}
|
||||
|
||||
static int dsa_slave_port_obj_add(struct net_device *dev,
|
||||
struct switchdev_obj *obj)
|
||||
struct switchdev_obj *obj,
|
||||
struct switchdev_trans *trans)
|
||||
{
|
||||
int err;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue