Re: [PATCH net-next v3 5/7] net: devmem: add ring parameter filtering

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 3 Oct 2024 11:49:50 -0700 Mina Almasry wrote:
> > > +       dev->ethtool_ops->get_ringparam(dev, &ringparam,
> > > +                                       &kernel_ringparam, extack);
> > > +       if (kernel_ringparam.tcp_data_split != ETHTOOL_TCP_DATA_SPLIT_ENABLED ||
> > > +           kernel_ringparam.tcp_data_split_thresh) {
> > > +               NL_SET_ERR_MSG(extack,
> > > +                              "tcp-header-data-split is disabled or threshold is not zero");
> > > +               return -EINVAL;
> > > +       }
> > > +  
> > Maybe just my personal opinion, but IMHO these checks should be separate
> > so the error message can be more concise/clear.
> >  
> 
> Good point. The error message in itself is valuable.

If you mean that the error message is more intuitive than debugging why
PP_FLAG_ALLOW_UNREADABLE_NETMEM isn't set - I agree :)

I vote to keep the patch, FWIW. Maybe add a comment that for now drivers
should not set PP_FLAG_ALLOW_UNREADABLE_NETMEM, anyway, but this gives
us better debuggability, and in the future we may find cases where
doing a copy is cheaper than buffer circulation (and therefore may lift
this check).




[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux