summaryrefslogtreecommitdiff
path: root/net/dsa
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2015-09-24 10:02:41 +0200
committerDavid S. Miller <davem@davemloft.net>2015-09-24 22:59:21 -0700
commit7ea6eb3f56f45cf4babae8b9a7421868e5005f17 (patch)
treee5e4d816edc8e6254f35ffc689678b9cd59185db /net/dsa
parent69f5df491e0becb75d2d795add7481a35218d657 (diff)
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>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/slave.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 7f50b7443402..ac76fd15ad8b 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -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;