Messages in this thread | | | From | Vinicius Costa Gomes <> | Subject | Re: [PATCH v2 net-next 7/9] net: netdevsim: mimic tc-taprio offload | Date | Tue, 01 Aug 2023 11:06:46 -0700 |
| |
Vladimir Oltean <vladimir.oltean@nxp.com> writes:
> On Tue, Aug 01, 2023 at 10:39:23AM -0700, Vinicius Costa Gomes wrote: >> Hi Vladimir, >> >> Vladimir Oltean <vladimir.oltean@nxp.com> writes: >> >> > On Wed, Jun 14, 2023 at 05:06:24PM -0700, Vinicius Costa Gomes wrote: >> >> > +static int nsim_setup_tc_taprio(struct net_device *dev, >> >> > + struct tc_taprio_qopt_offload *offload) >> >> > +{ >> >> > + int err = 0; >> >> > + >> >> > + switch (offload->cmd) { >> >> > + case TAPRIO_CMD_REPLACE: >> >> > + case TAPRIO_CMD_DESTROY: >> >> > + break; >> >> >> >> I was thinking about how useful would proper validation of the >> >> parameters be? Thinking that we could detect "driver API" breakages >> >> earlier, and we want it documented that the drivers should check for the >> >> things that it supports. >> >> >> >> Makes sense? >> > >> > Sorry, I lack imagination as to what the netdevsim driver may check for. >> > The taprio offload parameters should always be valid, properly speaking, >> > otherwise the Qdisc wouldn't be passing them on to the driver. At least >> > that would be the intention. The rest are hardware specific checks for >> > hardware specific limitations. Here there is no hardware. >> > >> >> Trying to remember what was going through my mind when I said that. >> >> What I seem to recall is something that would help us "keep honest": >> I was worrying about someone (perhaps myself ;-) sneaking a new feature >> in taprio and forgetting to update other drivers. >> >> I thought that adding a check for the existing parameters would help >> detect those kind of things. If anything unknown was there in the >> offload struct, netdevsim would complain loudly. >> >> Perhaps I was worrying too much. And the way to solve that is to keep >> active attention against that during review. > > Ok, so I'm not making any change to the patch set as a result of this > comment, would you agree?
Agreed.
Cheers, -- Vinicius
| |