Re: [RFC PATCH net-next 04/10] ethtool: Add link extended state

2020-06-09 Thread Amit Cohen
On 07-Jun-20 21:17, Florian Fainelli wrote: > > > On 6/7/2020 7:59 AM, Amit Cohen wrote: >> Currently, drivers can only tell whether the link is up/down using >> LINKSTATE_GET, but no additional information is given. >> >> Add attributes to LINKSTATE_GET command in order to allow drivers >> to ex

RE: [RFC PATCH net-next 04/10] ethtool: Add link extended state

2020-06-08 Thread Amit Cohen
Andrew Lunn writes: >> +/** >> + * enum ethtool_ext_substate_cable_issue - more information in >> + * addition to ETHTOOL_EXT_STATE_CABLE_ISSUE. >> + */ >> +enum ethtool_ext_substate_cable_issue { >> +ETHTOOL_EXT_SUBSTATE_UNSUPPORTED_CABLE = 1, >> +ETHTOOL_EXT_SUBSTATE_SHORTED_CABLE, >> +

Re: [RFC PATCH net-next 04/10] ethtool: Add link extended state

2020-06-07 Thread Florian Fainelli
On 6/7/2020 7:59 AM, Amit Cohen wrote: > Currently, drivers can only tell whether the link is up/down using > LINKSTATE_GET, but no additional information is given. > > Add attributes to LINKSTATE_GET command in order to allow drivers > to expose the user more information in addition to link st

Re: [RFC PATCH net-next 04/10] ethtool: Add link extended state

2020-06-07 Thread Andrew Lunn
On Sun, Jun 07, 2020 at 05:59:39PM +0300, Amit Cohen wrote: > Currently, drivers can only tell whether the link is up/down using > LINKSTATE_GET, but no additional information is given. > > Add attributes to LINKSTATE_GET command in order to allow drivers > to expose the user more information in a

Re: [RFC PATCH net-next 04/10] ethtool: Add link extended state

2020-06-07 Thread Andrew Lunn
> +static void linkstate_get_ext_state(struct net_device *dev, > + struct linkstate_reply_data *data) > +{ > + int err; > + > + if (!dev->ethtool_ops->get_ext_state) > + return; > + > + err = dev->ethtool_ops->get_ext_state(dev, > &data->etht

Re: [RFC PATCH net-next 04/10] ethtool: Add link extended state

2020-06-07 Thread Andrew Lunn
> @@ -108,6 +131,12 @@ static int linkstate_reply_size(const struct > ethnl_req_info *req_base, > if (data->sqi_max != -EOPNOTSUPP) > len += nla_total_size(sizeof(u32)); > > + if (data->ext_state_provided) > + len += sizeof(u8); /* LINKSTATE_EXT_STATE */ > + >

Re: [RFC PATCH net-next 04/10] ethtool: Add link extended state

2020-06-07 Thread Andrew Lunn
> +/** > + * enum ethtool_ext_substate_cable_issue - more information in > + * addition to ETHTOOL_EXT_STATE_CABLE_ISSUE. > + */ > +enum ethtool_ext_substate_cable_issue { > + ETHTOOL_EXT_SUBSTATE_UNSUPPORTED_CABLE = 1, > + ETHTOOL_EXT_SUBSTATE_SHORTED_CABLE, > +}; I'm not too happy about

[RFC PATCH net-next 04/10] ethtool: Add link extended state

2020-06-07 Thread Amit Cohen
Currently, drivers can only tell whether the link is up/down using LINKSTATE_GET, but no additional information is given. Add attributes to LINKSTATE_GET command in order to allow drivers to expose the user more information in addition to link state to ease the debug process, for example, reason f