mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
net: dsa: Pass ndo_setup_tc slave callback to drivers
DSA currently handles shared block filters (for the classifier-action qdisc) in the core due to what I believe are simply pragmatic reasons - hiding the complexity from drivers and offerring a simple API for port mirroring. Extend the dsa_slave_setup_tc function by passing all other qdisc offloads to the driver layer, where the driver may choose what it implements and how. DSA is simply a pass-through in this case. Signed-off-by: Vladimir Oltean <[email protected]> Acked-by: Kurt Kanzenbach <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Acked-by: Ilias Apalodimas <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
9c66d15646
commit
47d23af292
2 changed files with 10 additions and 4 deletions
|
|
@ -1035,12 +1035,16 @@ static int dsa_slave_setup_tc_block(struct net_device *dev,
|
|||
static int dsa_slave_setup_tc(struct net_device *dev, enum tc_setup_type type,
|
||||
void *type_data)
|
||||
{
|
||||
switch (type) {
|
||||
case TC_SETUP_BLOCK:
|
||||
struct dsa_port *dp = dsa_slave_to_port(dev);
|
||||
struct dsa_switch *ds = dp->ds;
|
||||
|
||||
if (type == TC_SETUP_BLOCK)
|
||||
return dsa_slave_setup_tc_block(dev, type_data);
|
||||
default:
|
||||
|
||||
if (!ds->ops->port_setup_tc)
|
||||
return -EOPNOTSUPP;
|
||||
}
|
||||
|
||||
return ds->ops->port_setup_tc(ds, dp->index, type, type_data);
|
||||
}
|
||||
|
||||
static void dsa_slave_get_stats64(struct net_device *dev,
|
||||
|
|
|
|||
Loading…
Reference in a new issue