Re: [net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload

From: David Miller
Date: Tue Nov 12 2019 - 00:51:00 EST


From: Po Liu <po.liu@xxxxxxx>
Date: Mon, 11 Nov 2019 04:41:26 +0000

> +fsl-enetc-$(CONFIG_NET_SCH_TAPRIO) += enetc_qos.o

Code is Kconfig guarded.
> + case TC_SETUP_QDISC_TAPRIO:
> + return enetc_setup_tc_taprio(ndev, type_data);

Yet invoked unconditionally.

I can see just by reading your code that various configurations will
result in link errors.

...
> +int enetc_setup_tc_taprio(struct net_device *ndev, void *type_data)
> +{
> + struct tc_taprio_qopt_offload *taprio = type_data;
> + struct enetc_ndev_priv *priv = netdev_priv(ndev);
> + int i;
> +
> + for (i = 0; i < priv->num_tx_rings; i++)
> + enetc_set_bdr_prio(&priv->si->hw,
> + priv->tx_ring[i]->index,
> + taprio->enable ? i : 0);
> +
> + return enetc_setup_taprio(ndev, taprio);
> +}
> --
> 2.17.1
>