slave.c (82e94d4144d7a29e6e955e4b2ea681ed3f16d689) slave.c (0148bb50b8fd51baf357de8b237c0c6011506540)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * net/dsa/slave.c - Slave device handling
4 * Copyright (c) 2008-2009 Marvell Semiconductor
5 */
6
7#include <linux/list.h>
8#include <linux/etherdevice.h>

--- 1159 unchanged lines hidden (view full) ---

1168 return NULL;
1169}
1170
1171static int
1172dsa_slave_add_cls_matchall_mirred(struct net_device *dev,
1173 struct tc_cls_matchall_offload *cls,
1174 bool ingress)
1175{
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * net/dsa/slave.c - Slave device handling
4 * Copyright (c) 2008-2009 Marvell Semiconductor
5 */
6
7#include <linux/list.h>
8#include <linux/etherdevice.h>

--- 1159 unchanged lines hidden (view full) ---

1168 return NULL;
1169}
1170
1171static int
1172dsa_slave_add_cls_matchall_mirred(struct net_device *dev,
1173 struct tc_cls_matchall_offload *cls,
1174 bool ingress)
1175{
1176 struct netlink_ext_ack *extack = cls->common.extack;
1176 struct dsa_port *dp = dsa_slave_to_port(dev);
1177 struct dsa_slave_priv *p = netdev_priv(dev);
1178 struct dsa_mall_mirror_tc_entry *mirror;
1179 struct dsa_mall_tc_entry *mall_tc_entry;
1180 struct dsa_switch *ds = dp->ds;
1181 struct flow_action_entry *act;
1182 struct dsa_port *to_dp;
1183 int err;

--- 21 unchanged lines hidden (view full) ---

1205 mall_tc_entry->type = DSA_PORT_MALL_MIRROR;
1206 mirror = &mall_tc_entry->mirror;
1207
1208 to_dp = dsa_slave_to_port(act->dev);
1209
1210 mirror->to_local_port = to_dp->index;
1211 mirror->ingress = ingress;
1212
1177 struct dsa_port *dp = dsa_slave_to_port(dev);
1178 struct dsa_slave_priv *p = netdev_priv(dev);
1179 struct dsa_mall_mirror_tc_entry *mirror;
1180 struct dsa_mall_tc_entry *mall_tc_entry;
1181 struct dsa_switch *ds = dp->ds;
1182 struct flow_action_entry *act;
1183 struct dsa_port *to_dp;
1184 int err;

--- 21 unchanged lines hidden (view full) ---

1206 mall_tc_entry->type = DSA_PORT_MALL_MIRROR;
1207 mirror = &mall_tc_entry->mirror;
1208
1209 to_dp = dsa_slave_to_port(act->dev);
1210
1211 mirror->to_local_port = to_dp->index;
1212 mirror->ingress = ingress;
1213
1213 err = ds->ops->port_mirror_add(ds, dp->index, mirror, ingress);
1214 err = ds->ops->port_mirror_add(ds, dp->index, mirror, ingress, extack);
1214 if (err) {
1215 kfree(mall_tc_entry);
1216 return err;
1217 }
1218
1219 list_add_tail(&mall_tc_entry->list, &p->mall_tc_list);
1220
1221 return err;

--- 1815 unchanged lines hidden ---
1215 if (err) {
1216 kfree(mall_tc_entry);
1217 return err;
1218 }
1219
1220 list_add_tail(&mall_tc_entry->list, &p->mall_tc_list);
1221
1222 return err;

--- 1815 unchanged lines hidden ---