RE: [EXT] Re: [net-next, 1/2] enetc: Configure the Time-Aware Scheduler via tc-taprio offload
From: Po Liu
Date: Tue Nov 12 2019 - 01:49:09 EST
Hi David,
Br,
Po Liu
> -----Original Message-----
> From: David Miller <davem@xxxxxxxxxx>
> Sent: 2019年11月12日 13:51
> To: Po Liu <po.liu@xxxxxxx>
> Cc: Claudiu Manoil <claudiu.manoil@xxxxxxx>; linux-kernel@xxxxxxxxxxxxxxx;
> netdev@xxxxxxxxxxxxxxx; vinicius.gomes@xxxxxxxxx; Vladimir Oltean
> <vladimir.oltean@xxxxxxx>; Alexandru Marginean
> <alexandru.marginean@xxxxxxx>; Xiaoliang Yang
> <xiaoliang.yang_1@xxxxxxx>; Roy Zang <roy.zang@xxxxxxx>; Mingkai Hu
> <mingkai.hu@xxxxxxx>; Jerry Huang <jerry.huang@xxxxxxx>; Leo Li
> <leoyang.li@xxxxxxx>
> Subject: [EXT] Re: [net-next, 1/2] enetc: Configure the Time-Aware Scheduler via
> tc-taprio offload
>
> Caution: EXT Email
>
> 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.
I get it. Thanks!
>
> ...
> > +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
> >