lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <20230412131636.qh2mwyoaujrgagp5@skbuf> Date: Wed, 12 Apr 2023 16:16:36 +0300 From: Vladimir Oltean <vladimir.oltean@....com> To: Köry Maincent <kory.maincent@...tlin.com> Cc: netdev@...r.kernel.org, kuba@...nel.org, glipus@...il.com, maxime.chevallier@...tlin.com, vadim.fedorenko@...ux.dev, richardcochran@...il.com, gerhard@...leder-embedded.com, thomas.petazzoni@...tlin.com, krzysztof.kozlowski+dt@...aro.org, robh+dt@...nel.org, linux@...linux.org.uk Subject: Re: [PATCH net-next RFC v4 1/5] net: ethtool: Refactor identical get_ts_info implementations. On Thu, Apr 06, 2023 at 07:33:04PM +0200, Köry Maincent wrote: > From: Richard Cochran <richardcochran@...il.com> > > The vlan, macvlan and the bonding drivers call their "real" device driver > in order to report the time stamping capabilities. Provide a core > ethtool helper function to avoid copy/paste in the stack. > > Signed-off-by: Richard Cochran <richardcochran@...il.com> > Signed-off-by: Kory Maincent <kory.maincent@...tlin.com> > --- > static netdev_features_t macvlan_fix_features(struct net_device *dev, > diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h > index 798d35890118..a21302032dfa 100644 > --- a/include/linux/ethtool.h > +++ b/include/linux/ethtool.h > @@ -1042,6 +1042,14 @@ static inline int ethtool_mm_frag_size_min_to_add(u32 val_min, u32 *val_add, > return -EINVAL; > } > > +/** > + * ethtool_get_ts_info_by_layer - Obtains time stamping capabilities from the MAC or PHY layer. > + * @dev: pointer to net_device structure > + * @info: buffer to hold the result > + * Returns zero on sauces, non-zero otherwise. Not sure if I'm missing some joke with the sauces here. > + */ > +int ethtool_get_ts_info_by_layer(struct net_device *dev, struct ethtool_ts_info *info); > + > /** > * ethtool_sprintf - Write formatted string to ethtool string data > * @data: Pointer to start of string to update
Powered by blists - more mailing lists